From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] aacraid: BKL push down
Date: Thu, 22 May 2008 23:18:27 +0100 [thread overview]
Message-ID: <20080522231827.32e68a08@core> (raw)
In-Reply-To: <Pine.LNX.4.64.0805221454560.3694@shark.he.net>
On Thu, 22 May 2008 14:55:20 -0700 (PDT)
"Randy.Dunlap" <rdunlap@xenotime.net> wrote:
> On Thu, 22 May 2008, Alan Cox wrote:
>
> > The aacraid definitely needs the BKL internally right now so push the
> > lock take down into the driver but go no further
> >
> > Signed-off-by: Alan Cox <alan@redhat.com>
>
> Wrong patch file ??
Correct one below
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 1f7c836..f0aaee7 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -692,12 +692,16 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
* Bugs: Needs to handle hot plugging
*/
-static int aac_cfg_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long aac_cfg_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg)
{
+ long ret;
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
- return aac_do_ioctl(file->private_data, cmd, (void __user *)arg);
+ lock_kernel();
+ ret = aac_do_ioctl(file->private_data, cmd, (void __user *)arg);
+ unlock_kernel();
+ return ret;
}
#ifdef CONFIG_COMPAT
@@ -1016,7 +1020,7 @@ ssize_t aac_get_serial_number(struct device *device, char *buf)
static const struct file_operations aac_cfg_fops = {
.owner = THIS_MODULE,
- .ioctl = aac_cfg_ioctl,
+ .unlocked_ioctl = aac_cfg_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = aac_compat_cfg_ioctl,
#endif
prev parent reply other threads:[~2008-05-22 22:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 21:39 [PATCH] aacraid: BKL push down Alan Cox
2008-05-22 21:55 ` Randy.Dunlap
2008-05-22 22:18 ` 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=20080522231827.32e68a08@core \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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;
as well as URLs for NNTP newsgroup(s).