You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Julia Lawall
a51faabc66
drivers/video/via: use memdup_user
...
Use memdup_user when user data is immediately copied into the
allocated region.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/ )
// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@
- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = memdup_user(from,size);
if (
- to==NULL
+ IS_ERR(to)
|| ...) {
<+... when != goto l1;
- -ENOMEM
+ PTR_ERR(to)
...+>
}
- if (copy_from_user(to, from, size) != 0) {
- <+... when != goto l2;
- -EFAULT
- ...+>
- }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago
..
Makefile
viafb: move some modesetting functions to a seperate file
15 years ago
accel.c
viafb: move some include files to include/linux
15 years ago
accel.h
viafb: complete support for VX800/VX855 accelerated framebuffer
15 years ago
chip.h
viafb: Determine type of 2D engine and store it in chip_info
15 years ago
debug.h
…
dvi.c
viafb: move some include files to include/linux
15 years ago
dvi.h
viafb: some dvi cleanup
15 years ago
global.c
viafb: make some variables a bit less global
15 years ago
global.h
viafb: Separate global and fb-specific data
15 years ago
hw.c
viafb: move some include files to include/linux
15 years ago
hw.h
viafb: fold via_io.h into via-core.h
15 years ago
ioctl.c
viafb: iface.c, iface.h, ioctl.c, ioctl.h
17 years ago
ioctl.h
viafb: Add 1200x900 DCON/LCD panel modes for OLPC XO-1.5
15 years ago
lcd.c
viafb: move some include files to include/linux
15 years ago
lcd.h
viafb: Add 1200x900 DCON/LCD panel modes for OLPC XO-1.5
15 years ago
lcdtbl.h
viafb: lcd.c, lcd.h, lcdtbl.h
17 years ago
share.h
viafb: fold via_io.h into via-core.h
15 years ago
tbl1636.c
viafb: tbl1636.c, tbl1636.h, tblDPASetting.c, tblDPASetting.h
17 years ago
tbl1636.h
viafb: tbl1636.c, tbl1636.h, tblDPASetting.c, tblDPASetting.h
17 years ago
tblDPASetting.c
viafb: tbl1636.c, tbl1636.h, tblDPASetting.c, tblDPASetting.h
17 years ago
tblDPASetting.h
viafb: tbl1636.c, tbl1636.h, tblDPASetting.c, tblDPASetting.h
17 years ago
via-core.c
viafb: move some include files to include/linux
15 years ago
via-gpio.c
viafb: move some include files to include/linux
15 years ago
via_i2c.c
viafb: move some include files to include/linux
15 years ago
via_modesetting.c
viafb: move some include files to include/linux
15 years ago
via_modesetting.h
viafb: move some modesetting functions to a seperate file
15 years ago
via_utility.c
viafb: move some include files to include/linux
15 years ago
via_utility.h
viafb: remove dead code
15 years ago
viafbdev.c
drivers/video/via: use memdup_user
15 years ago
viafbdev.h
viafb: Separate global and fb-specific data
15 years ago
viamode.c
viafb: move some include files to include/linux
15 years ago
viamode.h
viafb: split global index up
15 years ago
vt1636.c
viafb: move some include files to include/linux
15 years ago
vt1636.h
viafb: rework the I2C support in the VIA framebuffer driver
15 years ago