From: "Michał Nazarewicz" <m.nazarewicz@samsung.com>
To: Greg KH <gregkh@suse.de>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
Frederic Weisbecker <fweisbec@gmail.com>,
John Kacur <jkacur@redhat.com>, Andi Kleen <andi@firstfloor.org>,
David Brownell <dbrownell@users.sourceforge.net>
Subject: Re: [PATCH 5/6] usb/gadget: Do not take BKL for gadget->ops->ioctl
Date: Fri, 18 Jun 2010 15:59:17 +0200 [thread overview]
Message-ID: <op.veh043ad7p4s8u@pikus> (raw)
In-Reply-To: <1275426285-9088-6-git-send-email-arnd@arndb.de>
On Tue, 01 Jun 2010 23:04:44 +0200, Arnd Bergmann <arnd@arndb.de> wrote:
> There is no gadget driver in the tree that
> actually implements the ioctl operation, so
> obviously it is not necessary to hold the
> BKL around the call.
Should the callback in ops be renamed to unlocked_ioctl then as to not
create confusion? Just a thought.
> --- a/drivers/usb/gadget/f_fs.c
> +++ b/drivers/usb/gadget/f_fs.c
> @@ -714,9 +714,7 @@ static long ffs_ep0_ioctl(struct file *file, unsigned code, unsigned long value)
> struct ffs_function *func = ffs->func;
> ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV;
> } else if (gadget->ops->ioctl) {
> - lock_kernel();
> ret = gadget->ops->ioctl(gadget, code, value);
> - unlock_kernel();
> } else {
> ret = -ENOTTY;
> }
> --- a/drivers/usb/gadget/inode.c
> +++ b/drivers/usb/gadget/inode.c
> @@ -1299,11 +1299,9 @@ static long dev_ioctl (struct file *fd, unsigned code, unsigned long value)
> struct usb_gadget *gadget = dev->gadget;
> long ret = -ENOTTY;
>- if (gadget->ops->ioctl) {
> - lock_kernel();
> + if (gadget->ops->ioctl)
> ret = gadget->ops->ioctl (gadget, code, value);
> - unlock_kernel();
> - }
> +
> return ret;
> }
--
Best regards, _ _
| Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o
| Computer Science, Michał "mina86" Nazarewicz (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--
next prev parent reply other threads:[~2010-06-18 13:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-01 21:04 [PATCH 0/6] USB: BKL removal Arnd Bergmann
2010-06-01 21:04 ` [PATCH 1/6] USB-BKL: Remove lock_kernel in usbfs update_sb() Arnd Bergmann
2010-06-01 21:04 ` [PATCH 2/6] USB-BKL: Convert usb_driver ioctl to unlocked_ioctl Arnd Bergmann
2010-06-01 21:04 ` [PATCH 3/6] USB-BKL: Remove BKL use for usb serial driver probing Arnd Bergmann
2010-06-01 21:04 ` [PATCH 4/6] USB-BKL: Remove BKL use in uhci-debug Arnd Bergmann
2010-06-02 10:11 ` Sergei Shtylyov
2010-06-17 17:44 ` Greg KH
2010-06-02 13:47 ` Alan Stern
2010-06-17 17:43 ` Greg KH
2010-06-01 21:04 ` [PATCH 5/6] usb/gadget: Do not take BKL for gadget->ops->ioctl Arnd Bergmann
2010-06-18 13:59 ` Michał Nazarewicz [this message]
2010-06-18 18:22 ` Arnd Bergmann
2010-06-29 14:08 ` David Brownell
2010-06-01 21:04 ` [PATCH 6/6] usb/mon: kill BKL usage Arnd Bergmann
2010-06-17 17:46 ` [PATCH 0/6] USB: BKL removal Greg KH
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=op.veh043ad7p4s8u@pikus \
--to=m.nazarewicz@samsung.com \
--cc=andi@firstfloor.org \
--cc=arnd@arndb.de \
--cc=dbrownell@users.sourceforge.net \
--cc=fweisbec@gmail.com \
--cc=gregkh@suse.de \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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.