kernel-fxtec-pro1x/drivers/media/dvb/dvb-core
Julia Lawall c6cfe05532 V4L/DVB: drivers/media: 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: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 15:20:28 -03:00
..
demux.h
dmxdev.c dvb: Push down BKL into ioctl functions 2010-05-17 05:27:04 +02:00
dmxdev.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
dvb_ca_en50221.c dvb: Push down BKL into ioctl functions 2010-05-17 05:27:04 +02:00
dvb_ca_en50221.h V4L/DVB (9054): implement proper locking in the dvb ca en50221 driver 2009-01-29 08:35:37 -02:00
dvb_demux.c V4L/DVB: drivers/media: Use memdup_user 2010-08-02 15:20:28 -03:00
dvb_demux.h V4L/DVB (13271): TS speed check. Logging transport stream speed in Kbits per second 2009-12-05 18:41:11 -02:00
dvb_filter.c
dvb_filter.h
dvb_frontend.c Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
dvb_frontend.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
dvb_math.c
dvb_math.h
dvb_net.c V4L/DVB: dvb-core: Fix ULE decapsulation bug 2010-06-01 01:24:21 -03:00
dvb_net.h
dvb_ringbuffer.c V4L/DVB: DVB: Export dvb_ringbuffer_flush() again 2010-02-26 15:10:54 -03:00
dvb_ringbuffer.h
dvbdev.c dvb: Push down BKL into ioctl functions 2010-05-17 05:27:04 +02:00
dvbdev.h dvb: Push down BKL into ioctl functions 2010-05-17 05:27:04 +02:00
Makefile