From: Sedat Dilek <sedat.dilek@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jason Yan <yanaijie@huawei.com>, Jan Kara <jack@suse.cz>,
Markus Elfring <Markus.Elfring@web.de>,
linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
hulkci@huawei.com, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH v2] block: Fix use-after-free in blkdev_get()
Date: Fri, 5 Jun 2020 13:10:57 +0200 [thread overview]
Message-ID: <CA+icZUVFQaXGVtfGEO2=covaaRR2iKOTASsLEXv7+CsV5ibShQ@mail.gmail.com> (raw)
In-Reply-To: <20200605094353.GS30374@kadam>
On Fri, Jun 5, 2020 at 11:46 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> A lot of maintainers have blocked Markus and asked him to stop trying
> to help people write commit message. Saying "bdev" instead of "block
> device" is more clear so your original message was better.
>
> The Fixes tag is a good idea though:
>
> Fixes: 89e524c04fa9 ("loop: Fix mount(2) failure due to race with LOOP_SET_FD")
>
> It broke last July. Before that, we used to check if __blkdev_get()
> failed before dereferencing "bdev".
>
> I wonder if maybe the best fix is to re-add the "if (!res) " check back
> to blkdev_get(). The __blkdev_get() looks like it can also free "whole"
> though if it calls itself recursively and I don't really know this code
> so I can't say for sure...
>
In things of Fixes: tag...
For the first hunk I found:
commit 8266602033d6adc6d10cb8811c1fd694767909b0 ("fix bdev leak in
block_dev.c do_open()")
- Sedat -
next prev parent reply other threads:[~2020-06-05 11:11 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-05 8:30 [PATCH v2] block: Fix use-after-free in blkdev_get() Markus Elfring
2020-06-05 9:05 ` Jason Yan
2020-06-05 9:43 ` Dan Carpenter
2020-06-05 10:56 ` Markus Elfring
2020-06-05 11:10 ` Dan Carpenter
2020-06-05 11:40 ` Markus Elfring
2020-06-05 11:42 ` Matthew Wilcox
2020-06-05 12:47 ` Markus Elfring
2020-06-05 12:52 ` Matthew Wilcox
2020-06-05 13:12 ` Markus Elfring
2020-06-05 15:15 ` Matthew Wilcox
2020-06-05 15:25 ` Markus Elfring
2020-06-05 11:10 ` [PATCH v2] " Matthew Wilcox
2020-06-05 11:48 ` Markus Elfring
2020-06-05 11:51 ` Matthew Wilcox
2020-06-05 13:01 ` Markus Elfring
2020-06-05 13:01 ` Markus Elfring
2020-06-05 13:04 ` Jens Axboe
2020-06-05 13:23 ` Markus Elfring
2020-06-05 11:10 ` Sedat Dilek [this message]
2020-06-05 14:42 ` [PATCH v2] " Jan Kara
2020-06-05 18:08 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2020-06-05 6:43 Jason Yan
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='CA+icZUVFQaXGVtfGEO2=covaaRR2iKOTASsLEXv7+CsV5ibShQ@mail.gmail.com' \
--to=sedat.dilek@gmail.com \
--cc=Markus.Elfring@web.de \
--cc=axboe@kernel.dk \
--cc=dan.carpenter@oracle.com \
--cc=hch@lst.de \
--cc=hulkci@huawei.com \
--cc=jack@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yanaijie@huawei.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).