diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2018-01-22 14:58:57 -0600 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-01-22 19:07:08 -0600 |
commit | 5f74972ce69fdc6473f74253283408af75a3be15 (patch) | |
tree | 0353784ed4e95a7a32e159ba9b66d1f697317680 /arch/m68k | |
parent | 66e0f26315ce7dd3f4efdbdee63f30dac643763f (diff) | |
download | linux-5f74972ce69fdc6473f74253283408af75a3be15.tar.bz2 |
signal: Don't use structure initializers for struct siginfo
The siginfo structure has all manners of holes with the result that a
structure initializer is not guaranteed to initialize all of the bits.
As we have to copy the structure to userspace don't even try to use
a structure initializer. Instead use clear_siginfo followed by initializing
selected fields. This gives a guarantee that uninitialized kernel memory
is not copied to userspace.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/mm/fault.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index 127d7c1f2090..03253c4f8e6a 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c @@ -21,8 +21,9 @@ extern void die_if_kernel(char *, struct pt_regs *, long); int send_fault_sig(struct pt_regs *regs) { - siginfo_t siginfo = { 0, 0, 0, }; + siginfo_t siginfo; + clear_siginfo(&siginfo); siginfo.si_signo = current->thread.signo; siginfo.si_code = current->thread.code; siginfo.si_addr = (void *)current->thread.faddr; |