* [linux-lvm] SMP bug: vmalloc() called without lock_kernel()
@ 2000-03-25 14:38 Manfred Spraul
0 siblings, 0 replies; only message in thread
From: Manfred Spraul @ 2000-03-25 14:38 UTC (permalink / raw)
To: linux-LVM, linux-LVM
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].
add_wait_queue();
wait_again:
set_current_state(TASK_UNINTERRUPTIBLE);
if(we_must_wait_and_someone_will_wake_us_up) {
schedule();
goto wait_again;
}
remove_wait_queue();
goto retry;
* lvm_do_pe_lock_unlock() assume that the cpu won't reorder write
instructions,
pe_lock_req.lock = UNLOCK_PE;
+ wmb();
pe_lock_req.data.lv_dev = \
--
Manfred
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-03-25 14:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-25 14:38 [linux-lvm] SMP bug: vmalloc() called without lock_kernel() Manfred Spraul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox