lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Jan 2022 12:19:21 +0100
From:   Maurizio Lombardi <mlombard@...hat.com>
To:     Yang Yingliang <yangyingliang@...wei.com>
Cc:     linux-kernel@...r.kernel.org, target-devel@...r.kernel.org,
        linux-scsi@...r.kernel.org, hch@....de, james.smart@...adcom.com,
        martin.petersen@...cle.com
Subject: Re: [PATCH -next] scsi: efct: don't use GFP_KERNEL under spin lock

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);

Maurizio

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ