public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Anatol Pomozov <anatol.pomozov@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Ayan George <ayan@ayan.net>, stable <stable@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Theodore Ts'o" <tytso@mit.edu>, Salman Qazi <sqazi@google.com>,
	Guo Chao <yan@linux.vnet.ibm.com>
Subject: Re: [PATCH] loop: prevent bdev freeing while device in use
Date: Tue, 2 Apr 2013 07:08:04 +0100	[thread overview]
Message-ID: <20130402060804.GI21522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAOMFOmUDuBomyp-kVRc3m9FuJSwkpg25MNYKo5ckbWuOExsn=g@mail.gmail.com>

On Mon, Apr 01, 2013 at 10:58:55PM -0700, Anatol Pomozov wrote:
> >>
> >> loop_set_fd/loop_clr_fd (and any other loop ioctl) is called under
> >> loop_device->lo_ctl_mutex.
> >
> > Ok, good enough for me, I applied it, and it's commit
> > c1681bf8a7b1b98edee8b862a42c19c4e53205fd in my tree.
> >
> > I assume it should go to stable too, because none of this is new, is
> > it? Did you check how far back this applies? I assume this goes back
> > pretty much forever, no?
> 
> I bisected kernel using test from my commit and it points to
> 4c823cc3d568277aa6340d8df6981e34f4c4dee5 (appeared in kernel 3.2).
> 
> But even despite i cannot repro the crash on 3.0-stable, the
> underlying issue (block_device is not locked) still exists there. So I
> think patch should go to stable as well.

... except that you are doing invalidate *after* having done bdput.  Which
is probably valid (we have the same bdev pinned down by opened file used
to issue the ioclt), but it's a really bad style; this should be in opposite
order.

  reply	other threads:[~2013-04-02  6:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01 11:58 [PATCH] loop: prevent bdev freeing while device in use Anatol Pomozov
2013-04-01 15:16 ` Linus Torvalds
2013-04-01 17:00   ` Anatol Pomozov
2013-04-01 22:53     ` Linus Torvalds
2013-04-02  5:58       ` Anatol Pomozov
2013-04-02  6:08         ` Al Viro [this message]
2013-04-01 16:28 ` Al Viro
2013-04-01 16:49   ` Anatol Pomozov
2013-04-01 16:47 ` Anatol Pomozov

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=20130402060804.GI21522@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=anatol.pomozov@gmail.com \
    --cc=ayan@ayan.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sqazi@google.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=yan@linux.vnet.ibm.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