From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Richard Holden <aciddeath@gmail.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: BKL still required for what functions?
Date: Tue, 7 Oct 2008 19:14:09 +0100 [thread overview]
Message-ID: <20081007191409.4a7291ff@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <786804A2-4288-46F5-82B8-3FF9B6FD196C@gmail.com>
> - lock_kernel();
> +
> mutex_lock(&phone_lock);
> p = phone_device[minor];
> if (p)
> new_fops = fops_get(p->f_op);
> if (!new_fops) {
> mutex_unlock(&phone_lock);
> + lock_kernel();
> request_module("char-major-%d-%d", PHONE_MAJOR, minor);
> + unlock_kernel();
> mutex_lock(&phone_lock);
> p = phone_device[minor];
> if (p == NULL || (new_fops = fops_get(p->f_op)) == NULL)
> @@ -81,7 +83,6 @@ static int phone_open(struct inode *inode, struct
> file *file)
> fops_put(old_fops);
> end:
> mutex_unlock(&phone_lock);
> - unlock_kernel();
> return err;
> }
Looks like the BKL can go entirely there providing phone_device[] is
always rechecked back in the phone mutex, request_module is happy nowdays
without the BKL
prev parent reply other threads:[~2008-10-07 18:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 4:24 Richard Holden
2008-10-07 6:28 ` Andi Kleen
2008-10-07 16:35 ` Alan Cox
2008-10-07 17:55 ` Richard Holden
2008-10-07 18:14 ` Alan Cox [this message]
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=20081007191409.4a7291ff@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=aciddeath@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®