Re: [PATCH] blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 11, 2022 at 10:20:39AM -0700, Bart Van Assche wrote:
> On 7/11/22 02:08, Ming Lei wrote:
> > blk_mq_debugfs_register_hctx() can be called by blk_mq_update_nr_hw_queues
> > when gendisk isn't added yet, such as nvme tcp.
> > 
> > Fixes the warning of 'debugfs: Directory 'hctx0' with parent '/' already present!'
> > which can be observed reliably when running blktests nvme/005.
> > 
> > Reported-by: Yi Zhang <yi.zhang@xxxxxxxxxx>
> > Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
> > ---
> >   block/blk-mq-debugfs.c | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
> > index b80fae7ab1d9..28adb01f6441 100644
> > --- a/block/blk-mq-debugfs.c
> > +++ b/block/blk-mq-debugfs.c
> > @@ -728,6 +728,9 @@ void blk_mq_debugfs_register_hctx(struct request_queue *q,
> >   	char name[20];
> >   	int i;
> > +	if (!q->debugfs_dir)
> > +		return;
> > +
> >   	snprintf(name, sizeof(name), "hctx%u", hctx->queue_num);
> >   	hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir);
> 
> Does this patch need a Fixes: tag?

Yeah,

Fixes: 6cfc0081b046 ("blk-mq: no need to check return value of debugfs_create functions")

> 
> Additionally, as one can see here, I reported this bug before Yi:
> https://bugzilla.kernel.org/show_bug.cgi?id=216191

Sorry for missing your report, and I am fine to add your reported-by.


Thanks,
Ming




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux