]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/stackmap: Dont trylock mmap_sem with PREEMPT_RT and interrupts disabled
authorDavid Miller <davem@davemloft.net>
Mon, 24 Feb 2020 14:01:53 +0000 (15:01 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Feb 2020 00:20:10 +0000 (16:20 -0800)
commit0f1877b99df711b6983e0ba5824ee2b97bbf5177
tree38d6b44dc8654900cfb0e735cd8d027ce00d4e53
parentea84c32eca401c6fc8ea7c116708dc1b821431ec
bpf/stackmap: Dont trylock mmap_sem with PREEMPT_RT and interrupts disabled

In a RT kernel down_read_trylock() cannot be used from NMI context and
up_read_non_owner() is another problematic issue.

So in such a configuration, simply elide the annotated stackmap and
just report the raw IPs.

In the longer term, it might be possible to provide a atomic friendly
versions of the page cache traversal which will at least provide the info
if the pages are resident and don't need to be paged in.

[ tglx: Use IS_ENABLED() to avoid the #ifdeffery, fixup the irq work
   callback and add a comment ]

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200224145644.708960317@linutronix.de
kernel/bpf/stackmap.c