diff options
Diffstat (limited to 'arch/parisc/kernel/signal32.c')
-rw-r--r-- | arch/parisc/kernel/signal32.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c index 2cbb4af15a19..1c1a37f73053 100644 --- a/arch/parisc/kernel/signal32.c +++ b/arch/parisc/kernel/signal32.c | |||
@@ -403,7 +403,7 @@ setup_sigcontext32(struct compat_sigcontext __user *sc, struct compat_regfile __ | |||
403 | int | 403 | int |
404 | copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from) | 404 | copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from) |
405 | { | 405 | { |
406 | unsigned long tmp; | 406 | compat_uptr_t addr; |
407 | int err; | 407 | int err; |
408 | 408 | ||
409 | if (!access_ok(VERIFY_READ, from, sizeof(compat_siginfo_t))) | 409 | if (!access_ok(VERIFY_READ, from, sizeof(compat_siginfo_t))) |
@@ -426,8 +426,8 @@ copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from) | |||
426 | err |= __get_user(to->si_uid, &from->si_uid); | 426 | err |= __get_user(to->si_uid, &from->si_uid); |
427 | break; | 427 | break; |
428 | case __SI_FAULT >> 16: | 428 | case __SI_FAULT >> 16: |
429 | err |= __get_user(tmp, &from->si_addr); | 429 | err |= __get_user(addr, &from->si_addr); |
430 | to->si_addr = (void __user *) tmp; | 430 | to->si_addr = compat_ptr(addr); |
431 | break; | 431 | break; |
432 | case __SI_POLL >> 16: | 432 | case __SI_POLL >> 16: |
433 | err |= __get_user(to->si_band, &from->si_band); | 433 | err |= __get_user(to->si_band, &from->si_band); |
@@ -447,7 +447,8 @@ copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from) | |||
447 | int | 447 | int |
448 | copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from) | 448 | copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from) |
449 | { | 449 | { |
450 | unsigned int addr; | 450 | compat_uptr_t addr; |
451 | compat_int_t val; | ||
451 | int err; | 452 | int err; |
452 | 453 | ||
453 | if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t))) | 454 | if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t))) |
@@ -476,8 +477,8 @@ copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from) | |||
476 | err |= __put_user(from->si_uid, &to->si_uid); | 477 | err |= __put_user(from->si_uid, &to->si_uid); |
477 | break; | 478 | break; |
478 | case __SI_FAULT >> 16: | 479 | case __SI_FAULT >> 16: |
479 | /* avoid type-checking warnings by copying _pad[0] in lieu of si_addr... */ | 480 | addr = ptr_to_compat(from->si_addr); |
480 | err |= __put_user(from->_sifields._pad[0], &to->si_addr); | 481 | err |= __put_user(addr, &to->si_addr); |
481 | break; | 482 | break; |
482 | case __SI_POLL >> 16: | 483 | case __SI_POLL >> 16: |
483 | err |= __put_user(from->si_band, &to->si_band); | 484 | err |= __put_user(from->si_band, &to->si_band); |
@@ -486,15 +487,15 @@ copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from) | |||
486 | case __SI_TIMER >> 16: | 487 | case __SI_TIMER >> 16: |
487 | err |= __put_user(from->si_tid, &to->si_tid); | 488 | err |= __put_user(from->si_tid, &to->si_tid); |
488 | err |= __put_user(from->si_overrun, &to->si_overrun); | 489 | err |= __put_user(from->si_overrun, &to->si_overrun); |
489 | addr = (unsigned long) from->si_ptr; | 490 | val = (compat_int_t)from->si_int; |
490 | err |= __put_user(addr, &to->si_ptr); | 491 | err |= __put_user(val, &to->si_int); |
491 | break; | 492 | break; |
492 | case __SI_RT >> 16: /* Not generated by the kernel as of now. */ | 493 | case __SI_RT >> 16: /* Not generated by the kernel as of now. */ |
493 | case __SI_MESGQ >> 16: | 494 | case __SI_MESGQ >> 16: |
494 | err |= __put_user(from->si_uid, &to->si_uid); | 495 | err |= __put_user(from->si_uid, &to->si_uid); |
495 | err |= __put_user(from->si_pid, &to->si_pid); | 496 | err |= __put_user(from->si_pid, &to->si_pid); |
496 | addr = (unsigned long) from->si_ptr; | 497 | val = (compat_int_t)from->si_int; |
497 | err |= __put_user(addr, &to->si_ptr); | 498 | err |= __put_user(val, &to->si_int); |
498 | break; | 499 | break; |
499 | } | 500 | } |
500 | } | 501 | } |