Skip to content

Commit 7f32890

Browse files
committed
mtip32xx: fix bad use of smp_processor_id()
mtip_pci_probe() dumps the current CPU when loaded, but it does so in a preemptible context. Hence smp_processor_id() correctly warns: BUG: using smp_processor_id() in preemptible [00000000] code: systemd-udevd/155 caller is mtip_pci_probe+0x53/0x880 [mtip32xx] Switch to raw_smp_processor_id(), since it's just informational and persistent accuracy isn't important. Signed-off-by: Jens Axboe <[email protected]>
1 parent 10beafc commit 7f32890

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/mtip32xx/mtip32xx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4498,7 +4498,7 @@ static int mtip_pci_probe(struct pci_dev *pdev,
44984498
}
44994499
dev_info(&pdev->dev, "NUMA node %d (closest: %d,%d, probe on %d:%d)\n",
45004500
my_node, pcibus_to_node(pdev->bus), dev_to_node(&pdev->dev),
4501-
cpu_to_node(smp_processor_id()), smp_processor_id());
4501+
cpu_to_node(raw_smp_processor_id()), raw_smp_processor_id());
45024502

45034503
dd = kzalloc_node(sizeof(struct driver_data), GFP_KERNEL, my_node);
45044504
if (dd == NULL) {

0 commit comments

Comments
 (0)