Hello all, Is the following code valid ??? foo() { ........... spin_lock(lock); ptr = kzalloc(size, GFP_KERNEL); spin_unlock(lock); ..... } I guess the answer is no, but would like to confirm. Detailed/all possible reasons for not doing so are welcome. IIRC, I was getting a kernel crash with similar code with error message as "spinlock bug : unlocked on wrong CPU" which looked like it was getting locked on one cpu and due to memory allocation was getting unlocked from another cpu. -- Thanks - Manish ================================== [$\*.^ -- I miss being one of them ================================== -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ