linux/drivers/net/wan
Julia Lawall c146fc9fc9 drivers/net/wan: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-31 00:24:13 -07:00
..
lmc net: trans_start cleanups 2010-05-10 05:01:31 -07:00
.gitignore
c101.c headers: Fix build after <linux/sched.h> removal 2009-10-13 10:20:16 -07:00
cosa.c Coding style correction of some wan drivers 2010-02-04 11:55:46 +01:00
cosa.h
cycx_drv.c
cycx_main.c
cycx_x25.c X25: Use identifiers for cyclades device to x25 interface 2010-04-22 16:12:50 -07:00
dlci.c wan: Frame Relay/DLCI coding style corrections. 2009-11-29 23:42:14 -08:00
dscc4.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
farsync.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
farsync.h
hd64570.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
hd64570.h
hd64572.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
hd64572.h
hdlc_cisco.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hdlc_fr.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
hdlc_ppp.c WAN: flush tx_queue in hdlc_ppp to prevent panic on rmmod hw_driver. 2010-04-16 15:41:03 -07:00
hdlc_raw_eth.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hdlc_raw.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hdlc_x25.c X25: Use identifiers for hdlc x25 device to x25 interface 2010-04-22 16:12:51 -07:00
hdlc.c net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
hostess_sv11.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ixp4xx_hss.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
Kconfig
lapbether.c X25: Use identifiers for lapbether device to x25 interface 2010-04-22 16:12:50 -07:00
Makefile
n2.c drivers/net: request_irq - Remove unnecessary leading & from second arg 2009-11-18 23:29:17 -08:00
pc300_drv.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
pc300_tty.c net/various: remove trailing space in messages 2010-03-24 14:10:38 -07:00
pc300-falc-lh.h
pc300.h
pc300too.c drivers/net/: use DEFINE_PCI_DEVICE_TABLE() 2010-01-07 23:54:26 -08:00
pci200syn.c drivers/net/: use DEFINE_PCI_DEVICE_TABLE() 2010-01-07 23:54:26 -08:00
sbni.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sbni.h
sdla.c drivers/net/wan: Use memdup_user 2010-05-31 00:24:13 -07:00
sealevel.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wanxl.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
wanxl.h
wanxlfw.inc_shipped
wanxlfw.S
x25_asy.c X25: Use identifiers for x25 async device to x25 interface 2010-04-22 16:12:49 -07:00
x25_asy.h
z85230.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
z85230.h