linux/drivers/s390/net
Julia Lawall 4986f3f01a qeth: 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23 12:36:25 -07:00
..
claw.c claw: A claw device is a group of just 2 ccw devices 2010-07-23 12:36:24 -07:00
claw.h
ctcm_dbug.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
ctcm_dbug.h
ctcm_fsms.c
ctcm_fsms.h
ctcm_main.c drivers/s390/net: Drop memory allocation cast 2010-05-17 22:42:54 -07:00
ctcm_main.h
ctcm_mpc.c drivers/s390/net: Drop memory allocation cast 2010-05-17 22:42:54 -07:00
ctcm_mpc.h
ctcm_sysfs.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
fsm.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
fsm.h
Kconfig [S390] smsgiucv_app: deliver z/VM CP special messages (SMSG) as uevents 2010-03-08 12:26:28 +01:00
lcs.c drivers/s390/net: Drop memory allocation cast 2010-05-17 22:42:54 -07:00
lcs.h
Makefile [S390] smsgiucv_app: deliver z/VM CP special messages (SMSG) as uevents 2010-03-08 12:26:28 +01:00
netiucv.c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
qeth_core_main.c qeth: Use memdup_user when user data is immediately copied into the allocated region. 2010-07-23 12:36:25 -07:00
qeth_core_mpc.c
qeth_core_mpc.h qeth: handle missing z/VM authorization of OSX 2010-06-23 13:16:37 -07:00
qeth_core_sys.c qeth: serialize sysfs-triggered device configurations 2010-07-23 12:36:23 -07:00
qeth_core.h qeth: avoid loop if ipa command response is missing 2010-07-23 12:36:23 -07:00
qeth_l2_main.c qeth: serialize sysfs-triggered device configurations 2010-07-23 12:36:23 -07:00
qeth_l3_main.c qeth: serialize sysfs-triggered device configurations 2010-07-23 12:36:23 -07:00
qeth_l3_sys.c qeth: IP address takeover flag setting 2010-07-23 12:36:22 -07:00
qeth_l3.h qeth: IP address takeover flag setting 2010-07-23 12:36:22 -07:00
smsgiucv_app.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
smsgiucv.c smsgiucv: guarantee single iucv connect in thaw 2010-06-23 13:16:32 -07:00
smsgiucv.h [S390] smsgiucv_app: deliver z/VM CP special messages (SMSG) as uevents 2010-03-08 12:26:28 +01:00