linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: syzbot+695726bc473f9c36a4b6@syzkaller.appspotmail.com,
	Miklos Szeredi <miklos@szeredi.hu>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	syzkaller-bugs@googlegroups.com
Subject: Re: possible deadlock in ovl_write_iter
Date: Tue, 27 Nov 2018 18:13:03 +0200	[thread overview]
Message-ID: <CAOQ4uxhjFjeQ6m6c84Hv9V73brMKEOFNsg3Q1Kjb3resSdDjyA@mail.gmail.com> (raw)
In-Reply-To: <CACT4Y+bkAcCcy3p-iKe4jAzA=ZOk-WmbZrD0yOG96sjA7o-cXA@mail.gmail.com>

> > This looks like a false positive because lockdep is not aware of
> > s_stack_depth of the file (fs) associated with the pipe.
>
> There must be some annotation to tell lockdep about this.
>

It's a long story that can be summed up as "not simple":
https://lkml.org/lkml/2017/9/21/63

Overlayfs annotates inode mutex in lockdep friendly manner.
This is why you see:
 (&ovl_i_mutex_key[depth]){+.+.}, at: inode_lock

But this does not extend to other locks that may be associated
with filesystem or blockdev objects (e.g. pipe_lock()) and does
not cover the case of stacked blockdev (e.g. loop).

Thanks,
Amir.

      reply	other threads:[~2018-11-28  3:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <00000000000074e10d0576cc48f1@google.com>
     [not found] ` <CAOQ4uxik7QbQVBQbaPWCxPG90HuJK=T0yckoyfe5NjLHhg898Q@mail.gmail.com>
2018-09-27  3:51   ` possible deadlock in ovl_write_iter Amir Goldstein
2018-11-27  7:06 ` syzbot
2018-11-27  7:44   ` Amir Goldstein
2018-11-27 14:12     ` Dmitry Vyukov
2018-11-27 15:07   ` Amir Goldstein
2018-11-27 15:48     ` Dmitry Vyukov
2018-11-27 16:13       ` Amir Goldstein [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=CAOQ4uxhjFjeQ6m6c84Hv9V73brMKEOFNsg3Q1Kjb3resSdDjyA@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=dvyukov@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=syzbot+695726bc473f9c36a4b6@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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).