Skip to content
Snippets Groups Projects
Select Git revision
  • dda08052682141e63f5860294a0831eff7ec39e8
  • passt default
  • master
  • pu
  • todo
  • next
  • maint
  • v2.8.0-rc1
  • v2.8.0-rc0
  • v2.7.2
  • v2.7.1
  • v2.7.0
  • v2.6.5
  • v2.7.0-rc3
  • v2.7.0-rc2
  • v2.7.0-rc1
  • v2.7.0-rc0
  • v2.6.4
  • v2.6.3
  • v2.6.2
  • v2.6.1
  • v2.3.10
  • v2.5.4
  • v2.4.10
  • v2.6.0
  • v2.6.0-rc3
  • v2.5.3
27 results

copy.c

user avatar
Toke Høiland-Jørgensen authored and Greg Kroah-Hartman committed
[ Upstream commit a34a9f1a ]

Sysbot discovered that the queue and stack maps can deadlock if they are
being used from a BPF program that can be called from NMI context (such as
one that is attached to a perf HW counter event). To fix this, add an
in_nmi() check and use raw_spin_trylock() in NMI context, erroring out if
grabbing the lock fails.

Fixes: f1a2e44a ("bpf: add queue and stack maps")
Reported-by: default avatarHsin-Wei Hung <hsinweih@uci.edu>
Tested-by: default avatarHsin-Wei Hung <hsinweih@uci.edu>
Co-developed-by: default avatarHsin-Wei Hung <hsinweih@uci.edu>
Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20230911132815.717240-1-toke@redhat.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
232f0ba4
History