diff options
author | Sumit Garg <[email protected]> | 2021-01-22 16:35:56 +0530 |
---|---|---|
committer | Daniel Thompson <[email protected]> | 2021-02-08 13:42:50 +0000 |
commit | 93f7a6d818deef69d0ba652d46bae6fbabbf365c (patch) | |
tree | 8f6fe0ec2e9c508da4104d7abdb6a49cf3c78c08 /scripts/gdb/linux/tasks.py | |
parent | 0759d8072843fe621b4d7abb31a7b7bc84ae4159 (diff) |
kdb: Make memory allocations more robust
Currently kdb uses in_interrupt() to determine whether its library
code has been called from the kgdb trap handler or from a saner calling
context such as driver init. This approach is broken because
in_interrupt() alone isn't able to determine kgdb trap handler entry from
normal task context. This can happen during normal use of basic features
such as breakpoints and can also be trivially reproduced using:
echo g > /proc/sysrq-trigger
We can improve this by adding check for in_dbg_master() instead which
explicitly determines if we are running in debugger context.
Cc: [email protected]
Signed-off-by: Sumit Garg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Thompson <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions