From: Bart Van Assche <bvanassche@acm.org>
To: Zizhi Wo <wozizhi@huaweicloud.com>,
axboe@kernel.dk, dlemoal@kernel.org, nilay@linux.ibm.com,
linux-block@vger.kernel.org, kch@nvidia.com,
johannes.thumshirn@wdc.com, kbusch@kernel.org
Cc: linux-kernel@vger.kernel.org, yangerkun@huawei.com,
chengzhihao1@huawei.com, wozizhi@huawei.com
Subject: Re: [PATCH 2/3] null_blk: give the file-scope mutex a descriptive name
Date: Mon, 6 Jul 2026 06:12:48 -0700 [thread overview]
Message-ID: <9004743e-f522-424e-a1ab-8779ecc6da02@acm.org> (raw)
In-Reply-To: <20260706123507.3809871-3-wozizhi@huaweicloud.com>
On 7/6/26 5:35 AM, Zizhi Wo wrote:
> The file-scope lock mutex mainly serializes access to the global nullb_list
> and related device setup. Rename it to "nullb_list_lock" to make its
> purpose clear. No functional change.
From commit a2db328b0839 ("null_blk: fix null-ptr-dereference while
configuring 'power' and 'submit_queues'"):
Writing 'power' and 'submit_queues' concurrently will trigger kernel
panic:
[ ... ]
Fix this problem by resuing the global mutex to protect
nullb_device_power_store() and nullb_update_nr_hw_queues() from
configfs.
This makes it clear that the "lock" mutex has a broader purpose than
only protecting nullb_list. Hence, the name nullb_list_lock is
confusing. How about using the name "nullb_lock"?
Thanks,
Bart.
next prev parent reply other threads:[~2026-07-06 13:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 12:35 [PATCH 0/3] null_blk: fix mutex initialization and configfs teardown race Zizhi Wo
2026-07-06 12:35 ` [PATCH 1/3] null_blk: use DEFINE_MUTEX for the file-scope mutex Zizhi Wo
2026-07-06 13:13 ` Bart Van Assche
2026-07-06 12:35 ` [PATCH 2/3] null_blk: give the file-scope mutex a descriptive name Zizhi Wo
2026-07-06 13:12 ` Bart Van Assche [this message]
2026-07-06 13:21 ` Zizhi Wo
2026-07-06 14:45 ` Bart Van Assche
2026-07-06 12:35 ` [PATCH 3/3] null_blk: register configfs subsystem after creating default devices Zizhi Wo
2026-07-06 13:17 ` Bart Van Assche
2026-07-06 13:34 ` Zizhi Wo
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=9004743e-f522-424e-a1ab-8779ecc6da02@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=chengzhihao1@huawei.com \
--cc=dlemoal@kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nilay@linux.ibm.com \
--cc=wozizhi@huawei.com \
--cc=wozizhi@huaweicloud.com \
--cc=yangerkun@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