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
ctcm_dbug.h
ctcm_fsms.c
ctcm_fsms.h
ctcm_main.c
ctcm_main.h
ctcm_mpc.c
ctcm_mpc.h
ctcm_sysfs.c
fsm.c
fsm.h
Kconfig
lcs.c
lcs.h
Makefile
netiucv.c
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
smsgiucv.c
smsgiucv.h