kni: fix copy_from_user failure handling
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 24 Jun 2019 16:47:11 +0000 (09:47 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 15 Jul 2019 17:13:59 +0000 (19:13 +0200)
commit21dde05a95bb301d485ac2c332a80271213e67c3
tree7fee813d011d66ce7add7ad81bcbe905af238e6a
parent5cb4510c7faf5aceab25f0a6f7083eb2b237a2eb
kni: fix copy_from_user failure handling

The correct thing to return if user gives a bad data
is to return -EFAULT. Logging is also discouraged because
it could be used as a DoS attack.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
kernel/linux/kni/kni_misc.c