Linux LVM users
 help / color / mirror / Atom feed
From: Manfred Spraul <manfreds@colorfullife.com>
To: linux-LVM@msede.com, linux-LVM@ez-darmstadt.telekom.de
Subject: [linux-lvm] SMP bug: vmalloc() called without lock_kernel()
Date: Sat, 25 Mar 2000 15:38:54 +0100	[thread overview]
Message-ID: <38DCCF7E.69E50306@colorfullife.com> (raw)

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

                 reply	other threads:[~2000-03-25 14:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38DCCF7E.69E50306@colorfullife.com \
    --to=manfreds@colorfullife.com \
    --cc=linux-LVM@ez-darmstadt.telekom.de \
    --cc=linux-LVM@msede.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox