summaryrefslogtreecommitdiff
path: root/drivers/net/3c59x.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-05-27 01:42:32 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-27 20:12:42 +0400
commitb8d6b0d6b6882a53e4586a07e1292223d55299d1 (patch)
tree057cd0237cbd37ccd17d497a415163432a8be9b1 /drivers/net/3c59x.c
parent8fc809d17984f18fbad7ae23e47a62b195969c19 (diff)
downloadlinux-b8d6b0d6b6882a53e4586a07e1292223d55299d1.tar.xz
drivers/telephony/ixj.c: 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/3c59x.c')
0 files changed, 0 insertions, 0 deletions