OSDN Git Service

staging: lustre: use memdup_user to allocate memory and copy from user
authorDafna Hirschfeld <dafna3@gmail.com>
Mon, 19 Feb 2018 19:57:37 +0000 (21:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Feb 2018 08:03:42 +0000 (09:03 +0100)
commit2baddf262e98762b36b0866065c21452fff1beda
treeb0e1af90e63f16e8034c54ce0ec4b1726c8ea14b
parentf1345b2f21e6f827a6445a3ea873336e540458cd
staging: lustre: use memdup_user to allocate memory and copy from user

Replace a call to kmalloc and a call to copy_from_user with a
call to memdup_user to simplify the code.
Issue found with coccicheck.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/selftest/conctl.c