]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Tue, 3 Oct 2023 16:19:16 +0000 (12:19 -0400)
committerSasha Levin <sashal@kernel.org>
Tue, 3 Oct 2023 16:19:16 +0000 (12:19 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/nvme-pci-do-not-set-the-numa-node-of-device-if-it-ha.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/nvme-pci-do-not-set-the-numa-node-of-device-if-it-ha.patch b/queue-4.19/nvme-pci-do-not-set-the-numa-node-of-device-if-it-ha.patch
new file mode 100644 (file)
index 0000000..c21ce48
--- /dev/null
@@ -0,0 +1,37 @@
+From 6546bc7adc41ad5d36afc26d5a8a1429bb323b78 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 12 Sep 2023 17:52:49 +0200
+Subject: nvme-pci: do not set the NUMA node of device if it has none
+
+From: Pratyush Yadav <ptyadav@amazon.de>
+
+[ Upstream commit dad651b2a44eb6b201738f810254279dca29d30d ]
+
+If a device has no NUMA node information associated with it, the driver
+puts the device in node first_memory_node (say node 0). Not having a
+NUMA node and being associated with node 0 are completely different
+things and it makes little sense to mix the two.
+
+Signed-off-by: Pratyush Yadav <ptyadav@amazon.de>
+Signed-off-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index b06d2b6bd3feb..163497ef48fd7 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -2501,8 +2501,6 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+       size_t alloc_size;
+       node = dev_to_node(&pdev->dev);
+-      if (node == NUMA_NO_NODE)
+-              set_dev_node(&pdev->dev, first_memory_node);
+       dev = kzalloc_node(sizeof(*dev), GFP_KERNEL, node);
+       if (!dev)
+-- 
+2.40.1
+
index b9628140d433e24481772bf8ac763e56157f4cae..b1b05ce3b7ea64407289ab5ea8c248903a0ac1c4 100644 (file)
@@ -42,3 +42,4 @@ ring-buffer-avoid-softlockup-in-ring_buffer_resize.patch
 ata-libata-eh-do-not-clear-ata_pflag_eh_pending-in-a.patch
 bpf-clarify-error-expectations-from-bpf_clone_redire.patch
 fbdev-sh7760fb-depend-on-fb-y.patch
+nvme-pci-do-not-set-the-numa-node-of-device-if-it-ha.patch