From: Christoph Hellwig <hch@lst.de>
To: Christoph Hellwig <hch@lst.de>,
akpm@osdl.org, schwidefsky@de.ibm.com, linux390@de.ibm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] dasd: cleanup dasd_ioctl
Date: Sun, 12 Feb 2006 19:12:55 +0100 [thread overview]
Message-ID: <20060212181255.GA26799@lst.de> (raw)
In-Reply-To: <20060212180308.GA24896@wavehammer.waldi.eu.org>
On Sun, Feb 12, 2006 at 07:03:08PM +0100, Bastian Blank wrote:
> On Sun, Feb 12, 2006 at 06:38:55PM +0100, Christoph Hellwig wrote:
> > static int
> > -dasd_ioctl_api_version(struct block_device *bdev, int no, long args)
> > +dasd_ioctl_api_version(void __user *argp)
> > {
> > int ver = DASD_API_VERSION;
> > - return put_user(ver, (int __user *) args);
> > + return put_user(ver, (int *)argp);
> > }
>
> Doesn't this need to be "int __user *"?
Yes.
> > +long
> > +dasd_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> > {
> > - int i;
> > + int rval;
> >
> > - for (i = 0; dasd_ioctls[i].no != -1; i++)
> > - dasd_ioctl_no_unregister(NULL, dasd_ioctls[i].no,
> > - dasd_ioctls[i].fn);
> > + lock_kernel();
> > + rval = dasd_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
> > + unlock_kernel();
>
> The lock_kernel looks spurious.
dasd_compat_ioctl just moved down unchanged to the end of the file so it
can call dasd_ioctl without a forward-prototype. When I introduced this
function a while ago I added the lock_kernel because that the BKL is
held when dasd_ioctl is called directly and I wanted to avoid different
locks from different codepathes. Once we can switch dasd to
->unlocked_ioctl it could probably go away.
next prev parent reply other threads:[~2006-02-12 18:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-12 17:38 [PATCH 1/5] dasd: cleanup dasd_ioctl Christoph Hellwig
2006-02-12 18:03 ` Bastian Blank
2006-02-12 18:12 ` Christoph Hellwig [this message]
2006-02-13 9:53 ` Bastian Blank
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=20060212181255.GA26799@lst.de \
--to=hch@lst.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=schwidefsky@de.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.