aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-07-22 23:15:09 +0000
committerDavid S. Miller <davem@davemloft.net>2010-07-23 12:36:25 -0700
commit4986f3f01aca9a332fa8e0fc9fdf3338791ee374 (patch)
tree6e721db6a2ebe00901725fd0bc1889339d736943 /security
parentbbb822a8c032813148888fcec85e89edb17286d3 (diff)
qeth: 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: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions