]> git.baikalelectronics.ru Git - kernel.git/commit
net-sysfs: remove possible sleep from an RCU read-side critical section
authorAntoine Tenart <atenart@kernel.org>
Mon, 22 Mar 2021 15:43:29 +0000 (16:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2021 20:28:13 +0000 (13:28 -0700)
commit544824b94b4c0a0015e70c36cf597941854bb79b
tree03bbb4e258ee7272db0ca7885503207a03c0a04f
parent557833d76c26a4a32663b10eb81a4a6c1b5b7061
net-sysfs: remove possible sleep from an RCU read-side critical section

xps_queue_show is mostly made of an RCU read-side critical section and
calls bitmap_zalloc with GFP_KERNEL in the middle of it. That is not
allowed as this call may sleep and such behaviours aren't allowed in RCU
read-side critical sections. Fix this by using GFP_NOWAIT instead.

Fixes: 069a3c1d53d5 ("net: embed nr_ids in the xps maps")
Reported-by: kernel test robot <oliver.sang@intel.com>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net-sysfs.c