[PATCH] Fix get_compat_sigevent()
authorDavid S. Miller <davem@davemloft.net>
Sat, 16 Apr 2005 22:24:01 +0000 (15:24 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 16 Apr 2005 22:24:01 +0000 (15:24 -0700)
I have no idea how a bug like this lasted so long.  Anyways, obvious
memset()'ing of incorrect pointer.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/compat.c

index dad10656bf144ea4b9c9e792b2e2186db88e7c07..ddfcaaa86623a0c02b68bc93a62c3d54bbe51762 100644 (file)
@@ -640,7 +640,7 @@ long compat_sys_clock_nanosleep(clockid_t which_clock, int flags,
 int get_compat_sigevent(struct sigevent *event,
                const struct compat_sigevent __user *u_event)
 {
-       memset(&event, 0, sizeof(*event));
+       memset(event, 0, sizeof(*event));
        return (!access_ok(VERIFY_READ, u_event, sizeof(*u_event)) ||
                __get_user(event->sigev_value.sival_int,
                        &u_event->sigev_value.sival_int) ||