linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Bart Van Assche <bvanassche@acm.org>,
	James Smart <james.smart@broadcom.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Sasha Levin <sashal@kernel.org>,
	linux-scsi@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 122/205] scsi: lpfc: Fix a kernel warning triggered by lpfc_get_sgl_per_hdwq()
Date: Thu, 16 Jan 2020 11:41:37 -0500	[thread overview]
Message-ID: <20200116164300.6705-122-sashal@kernel.org> (raw)
In-Reply-To: <20200116164300.6705-1-sashal@kernel.org>

From: Bart Van Assche <bvanassche@acm.org>

[ Upstream commit 765ab6cdac3b681952da0e22184bf6cf1ae41cf8 ]

Fix the following kernel bug report:

BUG: using smp_processor_id() in preemptible [00000000] code: systemd-udevd/954

Fixes: d79c9e9d4b3d ("scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware.")
Link: https://lore.kernel.org/r/20191107052158.25788-2-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/lpfc/lpfc_sli.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 9771638b64ba..2d75be07cd6e 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -20430,7 +20430,7 @@ lpfc_get_sgl_per_hdwq(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_buf)
 		/* allocate more */
 		spin_unlock_irqrestore(&hdwq->hdwq_lock, iflags);
 		tmp = kmalloc_node(sizeof(*tmp), GFP_ATOMIC,
-				   cpu_to_node(smp_processor_id()));
+				   cpu_to_node(raw_smp_processor_id()));
 		if (!tmp) {
 			lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
 					"8353 error kmalloc memory for HDWQ "
@@ -20573,7 +20573,7 @@ lpfc_get_cmd_rsp_buf_per_hdwq(struct lpfc_hba *phba,
 		/* allocate more */
 		spin_unlock_irqrestore(&hdwq->hdwq_lock, iflags);
 		tmp = kmalloc_node(sizeof(*tmp), GFP_ATOMIC,
-				   cpu_to_node(smp_processor_id()));
+				   cpu_to_node(raw_smp_processor_id()));
 		if (!tmp) {
 			lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
 					"8355 error kmalloc memory for HDWQ "
-- 
2.20.1


  parent reply	other threads:[~2020-01-16 16:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200116164300.6705-1-sashal@kernel.org>
2020-01-16 16:39 ` [PATCH AUTOSEL 5.4 005/205] scsi: lpfc: Fix hdwq sgl locks and irq handling Sasha Levin
2020-01-16 16:39 ` [PATCH AUTOSEL 5.4 006/205] scsi: lpfc: Fix list corruption detected in lpfc_put_sgl_per_hdwq Sasha Levin
2020-01-16 16:40 ` [PATCH AUTOSEL 5.4 061/205] scsi: esas2r: unlock on error in esas2r_nvram_read_direct() Sasha Levin
2020-01-16 16:40 ` [PATCH AUTOSEL 5.4 062/205] scsi: hisi_sas: Don't create debugfs dump folder twice Sasha Levin
2020-01-16 16:40 ` [PATCH AUTOSEL 5.4 063/205] scsi: hisi_sas: Set the BIST init value before enabling BIST Sasha Levin
2020-01-16 16:41 ` [PATCH AUTOSEL 5.4 089/205] scsi: ufs: delete redundant function ufshcd_def_desc_sizes() Sasha Levin
2020-01-16 16:41 ` [PATCH AUTOSEL 5.4 095/205] scsi: core: scsi_trace: Use get_unaligned_be*() Sasha Levin
2020-01-16 16:41 ` Sasha Levin [this message]
2020-01-16 16:41 ` [PATCH AUTOSEL 5.4 136/205] scsi: hisi_sas: Return directly if init hardware failed Sasha Levin
2020-01-16 16:42 ` [PATCH AUTOSEL 5.4 156/205] scsi: qla4xxx: fix double free bug Sasha Levin
2020-01-16 16:42 ` [PATCH AUTOSEL 5.4 157/205] scsi: bnx2i: fix potential use after free Sasha Levin
2020-01-16 16:42 ` [PATCH AUTOSEL 5.4 158/205] scsi: target: core: Fix a pr_debug() argument Sasha Levin
2020-01-16 16:42 ` [PATCH AUTOSEL 5.4 166/205] scsi: scsi_transport_sas: Fix memory leak when removing devices Sasha Levin
2020-01-16 16:42 ` [PATCH AUTOSEL 5.4 177/205] scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan Sasha Levin
2020-01-16 16:42 ` [PATCH AUTOSEL 5.4 178/205] scsi: qla2xxx: Fix qla2x00_request_irqs() for MSI Sasha Levin
2020-01-16 16:42 ` [PATCH AUTOSEL 5.4 200/205] scsi: ufs: Give an unique ID to each ufs-bsg Sasha Levin
2020-01-16 16:42 ` [PATCH AUTOSEL 5.4 204/205] scsi: mpt3sas: Fix double free in attach error handling Sasha Levin

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=20200116164300.6705-122-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=bvanassche@acm.org \
    --cc=james.smart@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).