Re:  [PATCH] block: mark GFP_NOIO around sysfs ->store()

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

 



On Wed, Aug 06, 2025 at 10:50:49AM +0800, xu.xin16@xxxxxxxxxx wrote:
> > sysfs ->store is called with queue freezed, meantime we have several
> > ->store() callbacks(update_nr_requests, wbt, scheduler) to allocate
> > memory with GFP_KERNEL which may run into direct reclaim code path,
> > then potential deadlock can be caused.
> > 
> > Fix the issue by marking NOIO around sysfs ->store()
> > 
> > Reported-by: Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx>
> > Cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
> > ---
> >  block/blk-sysfs.c | 3 +++
> >  1 file changed, 3 insertions(+)
> 
> Excuse me, does the issue to fix comes from f1be1788a32e ("block: model freeze &
> enter queue as lock for supporting lockdep") ?

The above commit just starts to show the potential deadlock risk, which exists for
long time.

And now it becomes not necessary because blk_mq_freeze_queue() includes
memalloc_noio_save().

 
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