Skip to content

Commit 1e5c66a

Browse files
tititiou36bjorn-helgaas
authored andcommitted
PCI/P2PDMA: Fix a sleeping issue in a RCU read section
It is not allowed to sleep within a RCU read section, so use GFP_ATOMIC instead of GFP_KERNEL here. Link: https://lore.kernel.org/r/02d9ec4a10235def0e764ff1f5be881ba12e16e8.1704397858.git.christophe.jaillet@wanadoo.fr Fixes: ae21f83 ("PCI/P2PDMA: Finish RCU conversion of pdev->p2pdma") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Logan Gunthorpe <[email protected]>
1 parent 6613476 commit 1e5c66a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/p2pdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ calc_map_type_and_dist(struct pci_dev *provider, struct pci_dev *client,
661661
p2pdma = rcu_dereference(provider->p2pdma);
662662
if (p2pdma)
663663
xa_store(&p2pdma->map_types, map_types_idx(client),
664-
xa_mk_value(map_type), GFP_KERNEL);
664+
xa_mk_value(map_type), GFP_ATOMIC);
665665
rcu_read_unlock();
666666
return map_type;
667667
}

0 commit comments

Comments
 (0)