https://github.com/torvalds/linux
Revision 0f05058531330854ff383237e1547044c67e5740 authored by Julia Lawall on 17 December 2009, 23:27:09 UTC, committed by Linus Torvalds on 17 December 2009, 23:45:30 UTC
sizeof(viafb_gamma_table) is just the size of the pointer.  This is changed
to the size used when calling kmalloc to initialize the pointer.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression *x;
expression f;
type T;
@@

*f(...,(T)x,...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 312ea07
History
Tip revision: 0f05058531330854ff383237e1547044c67e5740 authored by Julia Lawall on 17 December 2009, 23:27:09 UTC
drivers/video/via/viafbdev.c: correct code taking the size of a pointer
Tip revision: 0f05058
File Mode Size
Makefile -rw-r--r-- 2.3 KB
chan_kern.c -rw-r--r-- 12.8 KB
chan_user.c -rw-r--r-- 6.9 KB
cow.h -rw-r--r-- 1.8 KB
cow_sys.h -rw-r--r-- 692 bytes
cow_user.c -rw-r--r-- 11.9 KB
daemon.h -rw-r--r-- 500 bytes
daemon_kern.c -rw-r--r-- 2.4 KB
daemon_user.c -rw-r--r-- 4.3 KB
fd.c -rw-r--r-- 1.9 KB
harddog_kern.c -rw-r--r-- 4.1 KB
harddog_user.c -rw-r--r-- 2.4 KB
hostaudio_kern.c -rw-r--r-- 7.2 KB
line.c -rw-r--r-- 18.8 KB
mcast.h -rw-r--r-- 433 bytes
mcast_kern.c -rw-r--r-- 2.9 KB
mcast_user.c -rw-r--r-- 4.1 KB
mconsole_kern.c -rw-r--r-- 20.3 KB
mconsole_user.c -rw-r--r-- 5.3 KB
mmapper_kern.c -rw-r--r-- 2.9 KB
net_kern.c -rw-r--r-- 20.1 KB
net_user.c -rw-r--r-- 5.2 KB
null.c -rw-r--r-- 970 bytes
pcap_kern.c -rw-r--r-- 2.5 KB
pcap_user.c -rw-r--r-- 3.0 KB
pcap_user.h -rw-r--r-- 364 bytes
port.h -rw-r--r-- 494 bytes
port_kern.c -rw-r--r-- 6.5 KB
port_user.c -rw-r--r-- 3.7 KB
pty.c -rw-r--r-- 3.2 KB
random.c -rw-r--r-- 3.6 KB
slip.h -rw-r--r-- 419 bytes
slip_common.c -rw-r--r-- 1.1 KB
slip_common.h -rw-r--r-- 2.2 KB
slip_kern.c -rw-r--r-- 2.0 KB
slip_user.c -rw-r--r-- 5.0 KB
slirp.h -rw-r--r-- 786 bytes
slirp_kern.c -rw-r--r-- 2.6 KB
slirp_user.c -rw-r--r-- 2.2 KB
ssl.c -rw-r--r-- 5.3 KB
ssl.h -rw-r--r-- 220 bytes
stderr_console.c -rw-r--r-- 1.6 KB
stdio_console.c -rw-r--r-- 5.0 KB
stdio_console.h -rw-r--r-- 185 bytes
tty.c -rw-r--r-- 1.5 KB
ubd_kern.c -rw-r--r-- 33.1 KB
ubd_user.c -rw-r--r-- 1.2 KB
vde.h -rw-r--r-- 574 bytes
vde_kern.c -rw-r--r-- 3.0 KB
vde_user.c -rw-r--r-- 2.4 KB
xterm.c -rw-r--r-- 4.9 KB
xterm.h -rw-r--r-- 183 bytes
xterm_kern.c -rw-r--r-- 1.5 KB

back to top