Commit 461535b0 authored by David Mosberger's avatar David Mosberger Committed by Tony Luck

[IA64] Don't directly deref user pointers.

copy_siginfo_from_user32() directly dereferences a user-pointer, which
is a no-no.  At that point, to->si_code already has been initialized
so I think we can just use to->si_code instead.  Compile-tested (only)
patch attached.

Signed-off-by: davidm@hpl.hp.com
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent d42d159a
......@@ -78,10 +78,10 @@ copy_siginfo_from_user32 (siginfo_t *to, siginfo_t32 *from)
err |= __get_user(to->si_errno, &from->si_errno);
err |= __get_user(to->si_code, &from->si_code);
if (from->si_code < 0)
if (to->si_code < 0)
err |= __copy_from_user(&to->_sifields._pad, &from->_sifields._pad, SI_PAD_SIZE);
else {
switch (from->si_code >> 16) {
switch (to->si_code >> 16) {
case __SI_CHLD >> 16:
err |= __get_user(to->si_utime, &from->si_utime);
err |= __get_user(to->si_stime, &from->si_stime);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment