From: Christian Brauner <brauner@kernel.org>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: hch@lst.de, axboe@kernel.dk, dsterba@suse.com, hare@suse.de,
jinpu.wang@ionos.com, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, yukuai3@huawei.com,
yi.zhang@huawei.com, yangerkun@huawei.com
Subject: Re: [PATCH -next v2] block: fix wrong mode for blkdev_get_by_dev() from disk_scan_partitions()
Date: Tue, 20 Jun 2023 11:54:47 +0200 [thread overview]
Message-ID: <20230620-hektar-ansah-4ab1a6108a82@brauner> (raw)
In-Reply-To: <20230618140402.7556-1-yukuai1@huaweicloud.com>
On Sun, Jun 18, 2023 at 10:04:02PM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@huawei.com>
>
> After commit 2736e8eeb0cc ("block: use the holder as indication for
> exclusive opens"), blkdev_get_by_dev() will warn if holder is NULL and
> mode contains 'FMODE_EXCL'.
>
> holder from blkdev_get_by_dev() from disk_scan_partitions() is always NULL,
> hence it should not use 'FMODE_EXCL', which is broben by the commit. For
> consequence, WARN_ON_ONCE() will be triggered from blkdev_get_by_dev()
> if user scan partitions with device opened exclusively.
>
> Fix this problem by removing 'FMODE_EXCL' from disk_scan_partitions(),
> as it used to be.
>
> Reported-by: syzbot+00cd27751f78817f167b@syzkaller.appspotmail.com
> Link: https://syzkaller.appspot.com/bug?extid=00cd27751f78817f167b
> Fixes: 2736e8eeb0cc ("block: use the holder as indication for exclusive opens")
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> ---
Looks good to me,
Reviewed-by: Christian Brauner <brauner@kernel.org>
next prev parent reply other threads:[~2023-06-20 9:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-18 14:04 Yu Kuai
2023-06-19 4:59 ` Christoph Hellwig
2023-06-20 9:54 ` Christian Brauner [this message]
2023-06-20 13:18 ` 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=20230620-hektar-ansah-4ab1a6108a82@brauner \
--to=brauner@kernel.org \
--cc=axboe@kernel.dk \
--cc=dsterba@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jinpu.wang@ionos.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@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
all inboxes | Powered by JetHome®