Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4826798ybl; Wed, 22 Jan 2020 05:28:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzZ5qwEXE34HTFiCWjIVgz5OfDAduFQluLGzpkE9nwlLvF3H53JDqva8eLSt3QxPtID/LgF X-Received: by 2002:a05:6808:618:: with SMTP id y24mr6494277oih.86.1579699735052; Wed, 22 Jan 2020 05:28:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699735; cv=none; d=google.com; s=arc-20160816; b=bP3w3atQTuww85RCltn7O4bGCx706JbvWKn8sDQ4S0UjU/cRCVPNM5XPD/zdvRGuh9 dWSFxF7SytS9VV7D2rouPNl/rIwvuRzCF1jiKBih8a7LoXiEliDugDFYcGDU3lkpHGtV 9pR3cOqW9zf+rVCeJuLaRaRPTqrKRXwNdf51KFW4cEmsdjZ1Cvz9jfcuKQYCz+GxSP1c KmvHyKdp0RPpCS38jcAwnRRqQXStEJL8Ocvkr8AFcHqjvNvQ2ZlxUZY06H8LZJJxHFle iqcN0dszxPjyjP3x8eFQEo5OTkuAmyDUSb655Zkyn8xYfprFtbkOSmefItLA8SDYSbIM UBlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aIYYI511GrHLVpC8Zvnc75MQsjHv5XxqvifYMZ1GKOI=; b=aQnneWLZmsziKkiO4KhvVholKbXRGTjc7aO93ZeVBN7JYuGuomedTZr5Si02nl3i8v nv1SpgrVUe5I+rOuEatxkjYymlL1cOsCdHWVdrqW7wdvg/820cGEwyS/zZZepF8MmNbI BtS37kNzWOwxHp+U8slQQ+AkrdL+uHqIwqKrQkFPm7DgFcS3pd4gbtEF0QSZZMZ+RW5D pgJd6ttoPBZgUR34MNbfQCIzEPdvk9C4itkHwzY0z+FH40uXOHNmi6CK18bsc1jfLmn1 CMmQwSRWCzaQWkKLsaO5e+6lf0Uod332y2E9Uq8WymCPIBgchEDVxlgHReKlEXQeZ16e FZgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="F04G8oM/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si22443912oti.152.2020.01.22.05.28.43; Wed, 22 Jan 2020 05:28:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="F04G8oM/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731893AbgAVN1v (ORCPT + 99 others); Wed, 22 Jan 2020 08:27:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:49496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731806AbgAVN1s (ORCPT ); Wed, 22 Jan 2020 08:27:48 -0500 Received: from localhost (unknown [84.241.205.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D8AEE20678; Wed, 22 Jan 2020 13:27:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699668; bh=rMJpW72a9e+MfLrCZdg2hQqhumhsVPzcIB18p64kLCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F04G8oM/3SRN6vvlVStdbW5p+ji/m6k/O/sQNQHKDxDf2hnatoavWCHqqrm6Jk0s+ de36taq7k5XhAsRhfj/wczd/OTR36t5Wr+23USp9o+5KQPy+okIkScg5Cw04S5S2gJ d7FQsTxB8uaR5ERrPWzbL29TqskB6Wp16x+gNw0c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bart Van Assche , James Smart , "Martin K. Petersen" Subject: [PATCH 5.4 213/222] scsi: lpfc: Fix a kernel warning triggered by lpfc_get_sgl_per_hdwq() Date: Wed, 22 Jan 2020 10:29:59 +0100 Message-Id: <20200122092848.944976380@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bart Van Assche commit 765ab6cdac3b681952da0e22184bf6cf1ae41cf8 upstream. 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 Reviewed-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/lpfc/lpfc_sli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- 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 *p /* 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 lpf /* 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 "