[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 3 Mar 2014 14:17:55 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: George Spelvin <linux@...izon.com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Update of file offset on write() etc. is non-atomic with I/O
On Mon, Mar 3, 2014 at 2:01 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
>
> The thing is, the callers in there do *not* keep struct file * at all -
> they keep struct socket * and use sock->file to get struct file * back
> when they need it.
Not a problem. Just make sockfd_lookup_light() use the broken
inefficient calling convention.
So then the networking code can continue to use the old bad interface,
without it impacting the normal users.
Something like the attached untested patch. This gets rid of
"fget_light()", and instead makes "fdget()" the native interface (same
for the "raw" version).
Totally untested patch (on top of my previous one)
Linus
View attachment "patch.diff" of type "text/plain" (3673 bytes)
Powered by blists - more mailing lists