public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Dave Jones <davej@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	ebiederm@xmission.com,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: pipe/cred lockdep warning
Date: Thu, 3 Oct 2013 19:56:30 +0100	[thread overview]
Message-ID: <20131003185630.GJ13318@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20131001145755.GA22729@redhat.com>

On Tue, Oct 01, 2013 at 10:57:55AM -0400, Dave Jones wrote:
> I seem to recall hitting this quite a while ago. Does it look familiar ?
> Either it didn't get fixed, or it's back..

> [ 2836.628506] trinity-child0/30759 is trying to acquire lock:
> [ 2836.628544]  (&sig->cred_guard_mutex){+.+.+.}, at: [<ffffffff81239045>] proc_pid_attr_write+0xf5/0x140
> [ 2836.628624] 
> but task is already holding lock:
> [ 2836.628664]  (&pipe->mutex/1){+.+.+.}, at: [<ffffffff811ccf66>] pipe_lock+0x26/0x30
> [ 2836.628734] 

splice to /proc/<pid>/attr/<something> [cred_guard shite under pipe->mutex]

vs.

splice from XFS [pipe->mutex under exclusive iolock]

vs.

read from XFS in execve() [shared iolock under cred_guard]

Note, BTW, that splice to /proc/<pid>/attr/<something> is broken.
proc_pid_attr_write() is *not* supposed to allow partial writes at all.
Frankly, I'd consider adding a ->splice_write() instance that would
simply return -EINVAL there...

  reply	other threads:[~2013-10-03 18:56 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 [this message]
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

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=20131003185630.GJ13318@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