All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/6] drivers/video/ps3fb: fix memset size error
@ 2007-11-05  2:28 Li Zefan
  2007-11-05  8:30 ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Li Zefan @ 2007-11-05  2:28 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML

The size passing to memset is wrong.

Signed-off-by Li Zefan <lizf@cn.fujitsu.com>

---
 drivers/video/ps3fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
index b3463dd..75836aa 100644
--- a/drivers/video/ps3fb.c
+++ b/drivers/video/ps3fb.c
@@ -727,7 +727,7 @@ static int ps3fb_blank(int blank, struct fb_info *info)
 
 static int ps3fb_get_vblank(struct fb_vblank *vblank)
 {
-	memset(vblank, 0, sizeof(&vblank));
+	memset(vblank, 0, sizeof(*vblank));
 	vblank->flags = FB_VBLANK_HAVE_VSYNC;
 	return 0;
 }
-- 
1.5.3.rc7


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

* Re: [PATCH 5/6] drivers/video/ps3fb: fix memset size error
  2007-11-05  2:28 [PATCH 5/6] drivers/video/ps3fb: fix memset size error Li Zefan
@ 2007-11-05  8:30 ` Geert Uytterhoeven
  2007-11-05 13:00   ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2007-11-05  8:30 UTC (permalink / raw)
  To: Li Zefan; +Cc: Andrew Morton, LKML

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1325 bytes --]

On Mon, 5 Nov 2007, Li Zefan wrote:
> The size passing to memset is wrong.
> 
> Signed-off-by Li Zefan <lizf@cn.fujitsu.com>

Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>

> ---
>  drivers/video/ps3fb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
> index b3463dd..75836aa 100644
> --- a/drivers/video/ps3fb.c
> +++ b/drivers/video/ps3fb.c
> @@ -727,7 +727,7 @@ static int ps3fb_blank(int blank, struct fb_info *info)
>  
>  static int ps3fb_get_vblank(struct fb_vblank *vblank)
>  {
> -	memset(vblank, 0, sizeof(&vblank));
> +	memset(vblank, 0, sizeof(*vblank));
>  	vblank->flags = FB_VBLANK_HAVE_VSYNC;
>  	return 0;
>  }

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

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

* Re: [PATCH 5/6] drivers/video/ps3fb: fix memset size error
  2007-11-05  8:30 ` Geert Uytterhoeven
@ 2007-11-05 13:00   ` Geert Uytterhoeven
  2007-11-14 21:42     ` [stable] " Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2007-11-05 13:00 UTC (permalink / raw)
  To: stable; +Cc: Andrew Morton, LKML, Li Zefan, Geoff Levand

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1528 bytes --]

On Mon, 5 Nov 2007, Geert Uytterhoeven wrote:
> On Mon, 5 Nov 2007, Li Zefan wrote:
> > The size passing to memset is wrong.
> > 
> > Signed-off-by Li Zefan <lizf@cn.fujitsu.com>
> 
> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>

As this leaks 24 bytes of uninitialized stack to user space, probably this
should be applied to -stable, too?

> > ---
> >  drivers/video/ps3fb.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
> > index b3463dd..75836aa 100644
> > --- a/drivers/video/ps3fb.c
> > +++ b/drivers/video/ps3fb.c
> > @@ -727,7 +727,7 @@ static int ps3fb_blank(int blank, struct fb_info *info)
> >  
> >  static int ps3fb_get_vblank(struct fb_vblank *vblank)
> >  {
> > -	memset(vblank, 0, sizeof(&vblank));
> > +	memset(vblank, 0, sizeof(*vblank));
> >  	vblank->flags = FB_VBLANK_HAVE_VSYNC;
> >  	return 0;
> >  }

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

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

* Re: [stable] [PATCH 5/6] drivers/video/ps3fb: fix memset size error
  2007-11-05 13:00   ` Geert Uytterhoeven
@ 2007-11-14 21:42     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2007-11-14 21:42 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: stable, Andrew Morton, Li Zefan, LKML, Geoff Levand

On Mon, Nov 05, 2007 at 02:00:45PM +0100, Geert Uytterhoeven wrote:
> On Mon, 5 Nov 2007, Geert Uytterhoeven wrote:
> > On Mon, 5 Nov 2007, Li Zefan wrote:
> > > The size passing to memset is wrong.
> > > 
> > > Signed-off-by Li Zefan <lizf@cn.fujitsu.com>
> > 
> > Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> 
> As this leaks 24 bytes of uninitialized stack to user space, probably this
> should be applied to -stable, too?

I'll be glad to apply it, once it goes to Linus's tree.  Can you all
resend this to stable@kernel.org when it goes into his tree?

thanks,

greg k-h

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

end of thread, other threads:[~2007-11-14 21:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-05  2:28 [PATCH 5/6] drivers/video/ps3fb: fix memset size error Li Zefan
2007-11-05  8:30 ` Geert Uytterhoeven
2007-11-05 13:00   ` Geert Uytterhoeven
2007-11-14 21:42     ` [stable] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.