mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maurizio Lombardi <mlombard@redhat.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, target-devel@vger.kernel.org,
	linux-scsi@vger.kernel.org, hch@lst.de, james.smart@broadcom.com,
	martin.petersen@oracle.com
Subject: Re: [PATCH -next] scsi: efct: don't use GFP_KERNEL under spin lock
Date: Mon, 10 Jan 2022 12:19:21 +0100	[thread overview]
Message-ID: <20220110111921.GA91632@raketa> (raw)
In-Reply-To: <20220110111838.965480-1-yangyingliang@huawei.com>

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


  reply	other threads:[~2022-01-10 11:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 11:18 Yang Yingliang
2022-01-10 11:19 ` Maurizio Lombardi [this message]
2022-01-10 12:10   ` Yang Yingliang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220110111921.GA91632@raketa \
    --to=mlombard@redhat.com \
    --cc=hch@lst.de \
    --cc=james.smart@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@vger.kernel.org \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome