]> git.baikalelectronics.ru Git - kernel.git/commit
can: fix ioctl function removal
authorOliver Hartkopp <socketcan@hartkopp.net>
Mon, 29 Jul 2019 20:40:56 +0000 (22:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jul 2019 21:12:35 +0000 (14:12 -0700)
commit4cb03930d2e5f54ee74c6f48a41b243da965ad16
tree797f90f9d80608f7e7175511617de44ecdc7fbea
parent95ccb3878d410c93f79ebbf5d940402036d2aabf
can: fix ioctl function removal

Commit 73ff0debe4d ("can: remove obsolete empty ioctl() handler") replaced the
almost empty can_ioctl() function with sock_no_ioctl() which always returns
-EOPNOTSUPP.

Even though we don't have any ioctl() functions on socket/network layer we need
to return -ENOIOCTLCMD to be able to forward ioctl commands like SIOCGIFINDEX
to the network driver layer.

This patch fixes the wrong return codes in the CAN network layer protocols.

Reported-by: kernel test robot <rong.a.chen@intel.com>
Fixes: 73ff0debe4d ("can: remove obsolete empty ioctl() handler")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/can/bcm.c
net/can/raw.c