[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Locking Convenctions



Hi,

Is there some way to tell whether a function is always called with locks or whether it is allowed to sleep or not. Furthermore, is there some source to check whether a function will sleep or not? (A list of sleeping functions, etc.?)
I am wondering whether vmalloc and copy_to_user in particular can sleep (I'm pretty sure they both can), which would mean that they could not be called from the read and write function of a block device because the device spinlock is acquired before those functions are called.


Thanks,
Can Sar


-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/