[linux-lvm] SMP bug: vmalloc() called without lock_kernel()
manfreds at colorfullife.com
Sat Mar 25 14:38:54 UTC 2000
vmalloc() is protected by the big kernel lock, but AFAICS
lvm_proc_get_info() calls vmallloc() without lock_kernel():
lvm_proc_get_info() is called by
linux/fs/proc/generic.c:proc_file_read(), and file_read runs without the
big kernel lock in 2.3.
Could you add "lock_kernel()" around vmalloc()/vfree() in
lvm_proc_get_info()? The ioctl functions are called with the kernel
locked, thus you don't need lock_kernel() in your ioctl/open functions.
Btw, your sleep_on() usage in lvm_map() seems to be wrong:
* sleep_on() is evil, processes could get stuck if the second cpu in in
lvm_do_pe_unlock() [even on i386].
* lvm_do_pe_lock_unlock() assume that the cpu won't reorder write
pe_lock_req.lock = UNLOCK_PE;
pe_lock_req.data.lv_dev = \
More information about the linux-lvm