tun: Use memdup_user() rather than duplicating its implementation
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 20 Aug 2016 06:54:15 +0000 (08:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Aug 2016 02:11:33 +0000 (19:11 -0700)
commit28e8190d2fb3918b5d46acafeb1968cd26e30dad
tree125705e420781a355423c14d6c159f21e059612d
parent4825a4e42c7e61520038c7d7d3efb4ffbbbd7091
tun: Use memdup_user() rather than duplicating its implementation

Reuse existing functionality from memdup_user() instead of keeping
duplicate source code.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c