From: Jens Axboe <axboe@fb.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>,
Alexander Viro <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>,
Maxim Patlasov <mpatlasov@virtuozzo.com>,
Christoph Hellwig <hch@lst.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fs/block_dev: fix potential NULL ptr deref in freeze_bdev()
Date: Thu, 25 Aug 2016 08:38:45 -0600 [thread overview]
Message-ID: <1d7b94b1-f20f-f68c-8aa2-cfd2f3786b91@fb.com> (raw)
In-Reply-To: <1471967731-3465-1-git-send-email-aryabinin@virtuozzo.com>
On 08/23/2016 09:55 AM, Andrey Ryabinin wrote:
> Calling freeze_bdev() twice on the same block device without mounted
> filesystem get_super() will return NULL, which will lead to NULL-ptr
> dereference later in drop_super().
>
> Check get_super() result to fix that.
>
> Note, that this is a purely theoretical issue. We have only 3
> freeze_bdev() callers. 2 of them are in filesystem code and used on a
> device with mounted fs. The third one in lock_fs() has protection in
> upper-layer code against freezing block device the second time without
> thawing it first.
Applied, thanks.
--
Jens Axboe
next prev parent reply other threads:[~2016-08-25 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 15:55 [PATCH] fs/block_dev: fix potential NULL ptr deref in freeze_bdev() Andrey Ryabinin
2016-08-25 7:38 ` Christoph Hellwig
2016-08-25 14:38 ` Jens Axboe [this message]
2016-08-25 14:39 ` Jens Axboe
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=1d7b94b1-f20f-f68c-8aa2-cfd2f3786b91@fb.com \
--to=axboe@fb.com \
--cc=aryabinin@virtuozzo.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatlasov@virtuozzo.com \
--cc=viro@zeniv.linux.org.uk \
/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).