]> git.baikalelectronics.ru Git - kernel.git/commit
signal, perf: Add missing TRAP_PERF case in siginfo_layout()
authorMarco Elver <elver@google.com>
Thu, 22 Apr 2021 19:18:23 +0000 (21:18 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 23 Apr 2021 07:03:16 +0000 (09:03 +0200)
commitbef3ec4a6088252e8784576713508be79083aab4
treec104a37d1bb52459adfa6c80cce80cdd83670eb7
parentc9567d81c2c83516e76945517f3ccff3dac2fc02
signal, perf: Add missing TRAP_PERF case in siginfo_layout()

Add the missing TRAP_PERF case in siginfo_layout() for interpreting the
layout correctly as SIL_PERF_EVENT instead of just SIL_FAULT. This
ensures the si_perf field is copied and not just the si_addr field.

This was caught and tested by running the perf_events/sigtrap_threads
kselftest as a 32-bit binary with a 64-bit kernel.

Fixes: 5cc2fbb4f9d8 ("signal: Introduce TRAP_PERF si_code and si_perf to siginfo")
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210422191823.79012-2-elver@google.com
kernel/signal.c