Re: [PATCH -next] scsi: efct: don't use GFP_KERNEL under spin lock

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

 



Hi,

On 2022/1/10 19:19, Maurizio Lombardi wrote:
On Mon, Jan 10, 2022 at 07:18:38PM +0800, Yang Yingliang wrote:
+	spin_lock_irqsave(&node->els_ios_lock, flags);
+
  	if (els) {
  		/* initialize fields */
  		els->els_retries_remaining = EFC_FC_ELS_DEFAULT_RETRIES;
If the els pointer is NULL you will lock the spinlock and disable the interrupts
for no reason, maybe you can just protect the list_add_tail()?

+spin_lock_irqsave(&node->els_ios_lock, flags);
  list_add_tail(&els->list_entry, &node->els_ios_list);
+spin_unlock_irqrestore(&node->els_ios_lock, flags);
Yes, it's better, I will send a v2 later.

Thanks,
Yang

Maurizio

.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux