Skip to contentSkip to conversation

drivers/video/ps3fb: fix memset size error

PATCH In review Li Zefan 3 participants 4 messages Nov 5, 2007 – Nov 14, 2007

Subsystems (3)
lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 5/6 drivers/video/ps3fb: fix memset size error

The size passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

---
 drivers/video/ps3fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/ps3fb.c +1 -1
index b3463dd..75836aa 100644
@@ -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;
 }
Signature · 1 line
1.5.3.rc7
Acked-by on v1 5/6
#1 lore raw
Quoted 3 lines · Li Zefan

The size passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

Quoted 9 lines
---
 drivers/video/ps3fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/ps3fb.c +0 -0
index b3463dd..75836aa 100644

drivers/video/ps3fb.c static int ps3fb_blank(int blank, struct fb_info *info) · line 733

Quoted 8 lines
drivers/video/ps3fb.c +1 -1
@@ -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:   [email protected]	
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

#2 lore raw
Quoted 6 lines · Geert Uytterhoeven
Quoted 3 lines · Li Zefan

The size passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

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

Quoted 10 lines
Quoted 10 lines
---
 drivers/video/ps3fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/ps3fb.c +0 -0
index b3463dd..75836aa 100644
@@ -727,7 +727,7 @@ static int ps3fb_blank(int blank, struct fb_info *info)
 
Quoted 7 lines

drivers/video/ps3fb.c static int ps3fb_blank(int blank, struct fb_info *info) · line 733

Quoted 7 lines
drivers/video/ps3fb.c +1 -1
 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:   [email protected]	
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

#3 lore raw
Quoted 10 lines · Geert Uytterhoeven
Quoted 6 lines · Geert Uytterhoeven
Quoted 3 lines · Li Zefan

The size passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

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 [email protected] when it goes into his tree?

thanks,

greg k-h