From: Alexander Holler <holler@ahsoftware.de>
To: Al Viro <viro@ZenIV.linux.org.uk>,
Richard Weinberger <richard.weinberger@gmail.com>
Cc: USB list <linux-usb@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: gadgetfs broken since 7f7f25e8
Date: Mon, 02 Mar 2015 14:02:56 +0100 [thread overview]
Message-ID: <54F45F80.3000604@ahsoftware.de> (raw)
In-Reply-To: <54F44BDF.5080109@ahsoftware.de>
Am 02.03.2015 um 12:39 schrieb Alexander Holler:
> Am 02.03.2015 um 11:20 schrieb Al Viro:
>> On Mon, Mar 02, 2015 at 10:13:27AM +0100, Richard Weinberger wrote:
>>> On Mon, Mar 2, 2015 at 9:28 AM, Alexander Holler
>>> <holler@ahsoftware.de> wrote:
>>>> Hello.
>>>>
>>>> Commit 7f7f25e82d54870df24d415a7007fbd327da027b (introduced with
>>>> 3.16) broke
>>>> dynamic changing of file_operations->[read|write].
>>>>
>>>> At least gadgetfs is a victim.
>>>>
>>>> Feel free to ask me off-list for a patch as I don't want to end up in
>>>> annoying discussions on Linux kernel lists anymore.
>>>>
>>>> Alexander Holler
>>>
>>> CC'ing Al.
>>
>> I know. FWIW, gadgetfs is one of the very few places that tried to
>> pull that
>> crap off and it had always been seriously racy. I've posted a partial
>> analysis
>> about a month ago (<20150204190645.GJ29656@ZenIV.linux.org.uk>).
>>
>> If Alexander (or anybody else) has a patch that really fixes that thing,
>> I would certainly like to see it. If not, I'll try to cook something,
>> but I'm not very familiar with that code. I really hope that this patch
>> isn't "modify ->f_mode to match ->f_op change" - that's too racy.
>> We'll obviously need to fix the userland-visible breakage in that one,
>> but that's not the way to go...
>
> I exactly did what you've assumed, I've just fixed f_mode but not the
> already existing races which I haven't introduced. So I was right in not
> sending a patch as would have been blamed for not rewriting everything
> as so often.
Another quick solution would be to just add some dummy ops for
read/write to those file_operations which are missing it which are only
returning -EINVAL or some other error which might make sense.
But that still won't fix any existing race occuring while changing the
the ops.
next prev parent reply other threads:[~2015-03-02 13:03 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 [this message]
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
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=54F45F80.3000604@ahsoftware.de \
--to=holler@ahsoftware.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=richard.weinberger@gmail.com \
--cc=viro@ZenIV.linux.org.uk \
/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).