>> But now I am getting a "BUG: spinlock recursion on CPU#0" error. What >> does this error mean ? > > yes, it actually means that the previous lock is still not released yet, and > now u are calling a function to acquire the spinlock again......and somehow, > before actually acquiring the spinlock, a check was made: > > lib/spinlock_debug.c: > > static inline void > debug_spin_lock_before(spinlock_t *lock) > { > SPIN_BUG_ON(lock->magic != SPINLOCK_MAGIC, lock, "bad magic"); > SPIN_BUG_ON(lock->owner == current, lock, "recursion"); > SPIN_BUG_ON(lock->owner_cpu == raw_smp_processor_id(), > lock, "cpu > recursion"); > } > > so now the above "recursion" was detected, as the spinlock is still residing > on the same CPU while being reacquired. so instead of going into a tight > spin, it print out the stack trace before hand. > Thanks a lot for the explanation :-) -- Regards, Sukanto Ghosh -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ