Tag: 4986f3f01aca9a332fa8e0fc9fdf3338791ee374

qeth: Use memdup_user when user data is immediately copied into the allocated region.

Author: Julia Lawall <julia@diku.dk> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ 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) || …) { } – if (copy_from_user(to, from, size) != 0) { – – } // Signed-off-by: …

Continue reading