kernel-fxtec-pro1x/drivers/isdn/i4l
Julia Lawall 024cb8a67f drivers/isdn: 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:15 -07:00
..
isdn_audio.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
isdn_audio.h
isdn_bsdcomp.c
isdn_common.c isdn: Push down BKL into ioctl functions 2010-05-17 05:27:05 +02:00
isdn_common.h
isdn_concap.c
isdn_concap.h
isdn_net.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
isdn_net.h isdn: fix possible circular locking dependency 2009-10-22 18:27:53 -07:00
isdn_ppp.c drivers/isdn: Use memdup_user 2010-05-31 00:24:15 -07:00
isdn_ppp.h
isdn_tty.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
isdn_tty.h
isdn_ttyfax.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
isdn_ttyfax.h
isdn_v110.c
isdn_v110.h
isdn_x25iface.c X25: Use identifiers for isdn device to x25 interface 2010-04-22 16:12:48 -07:00
isdn_x25iface.h
isdnhdlc.c ISDN: Fix isdnhdlc for one byte hdlc packets 2009-07-25 20:16:17 +02:00
Kconfig isdn: fix a few Kconfig imperfections 2010-02-22 15:45:53 -08:00
Makefile ISDN: Make isdnhdlc usable for other ISDN drivers 2009-07-25 20:15:21 +02:00