mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH]: Fix get_compat_sigevent()
@ 2005-04-05  5:44 David S. Miller
  2005-04-05  7:37 ` Stephen Rothwell
  0 siblings, 1 reply; 3+ messages in thread
From: David S. Miller @ 2005-04-05  5:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds, akpm


I have no idea how a bug like this lasted so long.
Anyways, obvious memset()'ing of incorrect pointer.

Please apply, thanks.

Signed-off-by: David S. Miller <davem@davemloft.net>

===== kernel/compat.c 1.46 vs edited =====
--- 1.46/kernel/compat.c	2005-03-13 15:29:47 -08:00
+++ edited/kernel/compat.c	2005-04-04 22:36:13 -07:00
@@ -640,7 +640,7 @@
 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) ||

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]: Fix get_compat_sigevent()
  2005-04-05  5:44 [PATCH]: Fix get_compat_sigevent() David S. Miller
@ 2005-04-05  7:37 ` Stephen Rothwell
  2005-04-05  7:43   ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2005-04-05  7:37 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel, torvalds, akpm

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

On Mon, 4 Apr 2005 22:44:09 -0700 "David S. Miller" <davem@davemloft.net> wrote:
>
> I have no idea how a bug like this lasted so long.

Probably because very few programs pass sigevents into the kernel ...

> -	memset(&event, 0, sizeof(*event));
> +	memset(event, 0, sizeof(*event));

Blush :-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]: Fix get_compat_sigevent()
  2005-04-05  7:37 ` Stephen Rothwell
@ 2005-04-05  7:43   ` David S. Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2005-04-05  7:43 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-kernel, torvalds, akpm

On Tue, 5 Apr 2005 17:37:24 +1000
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> On Mon, 4 Apr 2005 22:44:09 -0700 "David S. Miller" <davem@davemloft.net> wrote:
> >
> > I have no idea how a bug like this lasted so long.
> 
> Probably because very few programs pass sigevents into the kernel ...

Perhaps, but this triggered an OOPS the first time I tried to
run the glibc testsuite on a compat platform.

Something for the LTP folks to add I guess.  :) I do run that all
the time.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-05  8:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-05  5:44 [PATCH]: Fix get_compat_sigevent() David S. Miller
2005-04-05  7:37 ` Stephen Rothwell
2005-04-05  7:43   ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®