aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/videobuf-core.h
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-05-22 05:21:02 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 15:20:28 -0300
commitc6cfe05532cf6e9858d60ee699c51b906842489d (patch)
treebc3dc3f1fd92ad0100bd88ec373a9524e20205c8 /include/media/videobuf-core.h
parentV4L/DVB: cx25821: Fix bad whitespacing (diff)
downloadlinux-dev-c6cfe05532cf6e9858d60ee699c51b906842489d.tar.xz
linux-dev-c6cfe05532cf6e9858d60ee699c51b906842489d.zip
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>
Diffstat (limited to 'include/media/videobuf-core.h')
0 files changed, 0 insertions, 0 deletions