public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Jones <davej@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: pipe/cred lockdep warning
Date: Sat, 5 Oct 2013 02:42:29 +0100	[thread overview]
Message-ID: <20131005014229.GT13318@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+55aFzrJ4JpfXxGA6LTd_fe-dEjTHhPEY2bkWEJJ=AF-FfT4Q@mail.gmail.com>

On Fri, Oct 04, 2013 at 06:25:00PM -0700, Linus Torvalds wrote:

> Any splice user has better have a fallback to a read/write loop anyway, so
> I think the default of trying to splice was likely a bad decision.

Ummm...  Point.

> That said, you're right that it's a big change. And maybe we don't really
> care enough, and we should just make sure sysfs and proc get the EINVAL
> return. So it's not like I have a really strong preference.
> 
> But I *definitely* don't want something that just sets every f_op to use
> the default splice write. That's just equivalent to our current default to
> possibly bad behavior..

Well, I meant something like this: at 3.13-rc1 we add two exported
functions calling default_file_splice_write() - fallback_file_splice_write()
and this_fucker_will_be_gone_in_3_14_rc1_splice_write().  And do a single
commit slapping the latter in those file_operations.  After that NULL means
-EINVAL.  At which point maintainers are welcome to review the damn thing and
either remove the initializer if for this instance it makes no sense, or
switch it to something that will stay.  Maybe fallback_file_splice_write(),
maybe something else - up to them.  I wouldn't be surprised if in some cases
generic_file_splice_write() would turn out to be the right answer.  In any
case, in 3.14-rc1 the function gets treatment according to its name and
those who hadn't bothered to switch are left with obvious build errors.
Should be a sufficient incentive to get off their arses and deal with that by
the time 3.14 comes...

It would work and it would avoid incompatible changes, but I agree that
anything using splice in userland ought to have a fallback...  Dunno.
It's definitely not something to be done before .13-rc1, so we have time
to discuss that anyway.

      parent reply	other threads:[~2013-10-05  1:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01 14:57 pipe/cred lockdep warning Dave Jones
2013-10-03 18:56 ` Al Viro
2013-10-04 23:27   ` Linus Torvalds
2013-10-05  0:46     ` Al Viro
     [not found]       ` <CA+55aFzrJ4JpfXxGA6LTd_fe-dEjTHhPEY2bkWEJJ=AF-FfT4Q@mail.gmail.com>
2013-10-05  1:42         ` Al Viro [this message]

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=20131005014229.GT13318@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=davej@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox