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: ae21f835a5 ("PCI/P2PDMA: Finish RCU conversion of pdev->p2pdma")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
This commit is contained in:
Christophe JAILLET 2024-01-04 20:52:35 +01:00 committed by Bjorn Helgaas
parent 6613476e22
commit 1e5c66afd4
1 changed files with 1 additions and 1 deletions

View File

@ -661,7 +661,7 @@ done:
p2pdma = rcu_dereference(provider->p2pdma); p2pdma = rcu_dereference(provider->p2pdma);
if (p2pdma) if (p2pdma)
xa_store(&p2pdma->map_types, map_types_idx(client), 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(); rcu_read_unlock();
return map_type; return map_type;
} }