linux_old1/drivers/net/wireless/prism54
Julia Lawall a906b060b0 drivers/net/wireless/prism54: 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: John W. Linville <linville@tuxdriver.com>
2010-06-02 16:13:32 -04:00
..
Makefile
isl_38xx.c
isl_38xx.h
isl_ioctl.c drivers/net/wireless/prism54: Use memdup_user 2010-06-02 16:13:32 -04:00
isl_ioctl.h
isl_oid.h
islpci_dev.c drivers/net: remove useless semicolons 2010-05-17 22:47:34 -07:00
islpci_dev.h
islpci_eth.c net: trans_start cleanups 2010-05-10 05:01:31 -07:00
islpci_eth.h wireless: convert drivers to netdev_tx_t 2009-09-01 01:14:04 -07:00
islpci_hotplug.c drivers/net/: use DEFINE_PCI_DEVICE_TABLE() 2010-01-07 23:54:26 -08:00
islpci_mgt.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-04-15 16:21:34 -04:00
islpci_mgt.h 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
oid_mgt.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-04-15 16:21:34 -04:00
oid_mgt.h
prismcompat.h