Commit 2ed33b6b authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

[PATCH] ppc64: Fix 32 bits conversion of SI_TIMER signals

The current 32 bits translation of the SI_TIMER is wrong on ppc64, causing
the tst-timer4 testcase of glibc to fail in 32 bits. This patch fixes it.
Signed-off-by: default avatarOlaf Hering <olh@suse.de>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 19c631d4
...@@ -472,10 +472,14 @@ static long copy_siginfo_to_user32(compat_siginfo_t __user *d, siginfo_t *s) ...@@ -472,10 +472,14 @@ static long copy_siginfo_to_user32(compat_siginfo_t __user *d, siginfo_t *s)
&d->si_addr); &d->si_addr);
break; break;
case __SI_POLL >> 16: case __SI_POLL >> 16:
case __SI_TIMER >> 16:
err |= __put_user(s->si_band, &d->si_band); err |= __put_user(s->si_band, &d->si_band);
err |= __put_user(s->si_fd, &d->si_fd); err |= __put_user(s->si_fd, &d->si_fd);
break; break;
case __SI_TIMER >> 16:
err |= __put_user(s->si_tid, &d->si_tid);
err |= __put_user(s->si_overrun, &d->si_overrun);
err |= __put_user((u32)(u64)s->si_ptr, &d->si_ptr);
break;
case __SI_RT >> 16: /* This is not generated by the kernel as of now. */ case __SI_RT >> 16: /* This is not generated by the kernel as of now. */
case __SI_MESGQ >> 16: case __SI_MESGQ >> 16:
err |= __put_user(s->si_int, &d->si_int); err |= __put_user(s->si_int, &d->si_int);
......
...@@ -32,8 +32,10 @@ typedef struct compat_siginfo { ...@@ -32,8 +32,10 @@ typedef struct compat_siginfo {
/* POSIX.1b timers */ /* POSIX.1b timers */
struct { struct {
unsigned int _timer1; timer_t _tid; /* timer id */
unsigned int _timer2; int _overrun; /* overrun count */
compat_sigval_t _sigval; /* same as below */
int _sys_private; /* not to be passed to user */
} _timer; } _timer;
/* POSIX.1b signals */ /* POSIX.1b signals */
......
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