When I tried 2.6.0 kernel I found that when querying my ide cdrom drives, for
one of the drives in test3 it used to dump few stack traces and later crash.
However with test4 it dumps few stack traces
trace 1 - captured using dmesg . I
have identified the contents of the call trace dumped in the log file, which
correspond to function pointers in the stack of other functions.
trace 2 - captured using dmesg (has one part of my fix)
and then continues with its job.
So one analysing the call trace from test4 with the source and binary code, I realized that the reason this is happening is because of the spinlock no longer being a ME logic but having become a EE logic in uniprocessor configurations.
So I have come up with a solution to this problem by implementing what
I call MUTEXKS for mutual exclusion in
kernelspace. Which is nothing but integration of existing spinlock and
semaphore logics in the kernel into a single entity which behaves like a
spinlock in SMP configurations and a semaphore in UniProcessor configurations.
You can read about it in the link provided above.
Here is a dmesg log after my fix (this is a temporary hack, as the proper implementation will involve changing to many locations in the scsci layer to use mutexks where appropriate rather than spinlocks, and its better left to the people who maintain it, as they know the flow there better).