]> Git Repo - linux.git/commitdiff
PCI/P2PDMA: Fix a sleeping issue in a RCU read section
authorChristophe JAILLET <[email protected]>
Thu, 4 Jan 2024 19:52:35 +0000 (20:52 +0100)
committerBjorn Helgaas <[email protected]>
Thu, 8 Feb 2024 21:31:43 +0000 (15:31 -0600)
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: ae21f835a5bd ("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]>
drivers/pci/p2pdma.c

index 0c361561b855c1bde88c43266baa04afb9554622..4f47a13cb500ff5339cde426b6ccb020fcd74ae7 100644 (file)
@@ -661,7 +661,7 @@ done:
        p2pdma = rcu_dereference(provider->p2pdma);
        if (p2pdma)
                xa_store(&p2pdma->map_types, map_types_idx(client),
-                        xa_mk_value(map_type), GFP_KERNEL);
+                        xa_mk_value(map_type), GFP_ATOMIC);
        rcu_read_unlock();
        return map_type;
 }
This page took 0.052342 seconds and 4 git commands to generate.