Re: [PATCH] scsi: target: iblock: Fix smp_processor_id BUG messages

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

 



On May 19, 2021 / 17:26, Mike Christie wrote:
> This has us use raw_smp_processor_id in iblock's plug_device callout.
> smp_processor_id is not needed here, because we are running from a per CPU
> work item that is also queued to run on a worker thread that is normally
> bound to a specific CPU. If the worker thread did end up switching CPUs
> then it's handled the same way we handle when the work got moved to a
> different CPU's worker thread, where we will just end up sending IO from
> the new CPU.
> 
> Fixes: 415ccd9811da ("scsi: target: iblock: Add backend plug/unplug
> callouts")
> Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx>

Thanks Mike. To confirm this patch, I tried to trigger the BUG message using
block backstore on kernel configured with DEBUG_PREEMPT, but I was not able to
trigger it. Having said that, I think this change prevents the potential BUG
message with the same reasoning as the other fix in target_core_transport [1].
As far as I read through the code, the code should work even when CPU switches.

[1] https://marc.info/?l=linux-scsi&m=162106219905019

-- 
Best Regards,
Shin'ichiro Kawasaki



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux