From: Al Viro <viro@ZenIV.linux.org.uk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Alexander Holler <holler@ahsoftware.de>,
Richard Weinberger <richard.weinberger@gmail.com>,
USB list <linux-usb@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>, Felipe Balbi <balbi@ti.com>
Subject: Re: gadgetfs broken since 7f7f25e8
Date: Tue, 3 Mar 2015 21:42:49 +0000 [thread overview]
Message-ID: <20150303214249.GS29656@ZenIV.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1503031042200.1655-100000@iolanthe.rowland.org>
On Tue, Mar 03, 2015 at 10:47:14AM -0500, Alan Stern wrote:
> On Tue, 3 Mar 2015, Al Viro wrote:
>
> > Looking at that thing again... why do they need to be dummy? After all,
> > those methods start with get_ready_ep(), which will fail unless we have
> > ->state == STATE_EP_ENABLED. So they'd be failing just fine until that
> > first write() anyway. Let's do the following:
>
> In addition to the changes you made, it looks like you will need the
> following or something similar (also untested). I'm not sure if this
> is race-free, but it's better than before.
Right, ep0 has the same kind of problem...
> @@ -1240,6 +1241,10 @@ static int
> ep0_fasync (int f, struct file *fd, int on)
> {
> struct dev_data *dev = fd->private_data;
> +
> + if (dev->state <= STATE_DEV_OPENED)
> + return -ENODEV;
> +
Er... What is protecting dev->state here? Matter of fact, what's the
point of that check at all? Right now you have .fasync = ep0_fasync
both in ep0_io_operations and in dev_init_operations, so your delta
changes the existing semantics...
next prev parent reply other threads:[~2015-03-03 21:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 8:28 gadgetfs broken since 7f7f25e8 Alexander Holler
2015-03-02 9:13 ` Richard Weinberger
2015-03-02 10:20 ` Al Viro
2015-03-02 11:39 ` Alexander Holler
2015-03-02 13:02 ` Alexander Holler
2015-03-02 14:31 ` Alexander Holler
2015-03-03 8:39 ` Al Viro
2015-03-03 15:47 ` Alan Stern
2015-03-03 21:42 ` Al Viro [this message]
2015-03-04 15:31 ` Alan Stern
2015-03-07 11:23 ` Alexander Holler
2015-03-07 20:03 ` Alexander Holler
2015-03-07 20:51 ` Al Viro
2015-03-07 20:59 ` Alexander Holler
2015-03-07 21:08 ` Alan Stern
2015-03-08 17:38 ` Al Viro
2015-03-08 18:35 ` Alan Stern
2015-03-08 19:20 ` Al Viro
2015-03-10 21:07 ` Felipe Balbi
2015-03-11 10:29 ` Alexander Holler
2015-03-11 10:37 ` Alexander Holler
2015-03-03 22:20 ` Al Viro
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=20150303214249.GS29656@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=balbi@ti.com \
--cc=holler@ahsoftware.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=richard.weinberger@gmail.com \
--cc=stern@rowland.harvard.edu \
/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.