summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2016-06-21 16:45:47 +0300
committerSasha Levin <sasha.levin@oracle.com>2016-07-12 15:47:02 +0300
commit2eb6bd4c427ce63e87284d975f79c3e2344de27c (patch)
tree0d314ac1dae830a9623c95839667194e342001d9 /drivers/net
parentec351072a28a39ec0438e92918c20d5fab62bc22 (diff)
downloadlinux-2eb6bd4c427ce63e87284d975f79c3e2344de27c.tar.xz
can: fix oops caused by wrong rtnl dellink usage
[ Upstream commit 25e1ed6e64f52a692ba3191c4fde650aab3ecc07 ] For 'real' hardware CAN devices the netlink interface is used to set CAN specific communication parameters. Real CAN hardware can not be created nor removed with the ip tool ... This patch adds a private dellink function for the CAN device driver interface that does just nothing. It's a follow up to commit 993e6f2fd ("can: fix oops caused by wrong rtnl newlink usage") but for dellink. Reported-by: ajneu <ajneu1@gmail.com> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Cc: <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/dev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 96712b830e5e..bcefb375d232 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -930,6 +930,11 @@ static int can_newlink(struct net *src_net, struct net_device *dev,
return -EOPNOTSUPP;
}
+static void can_dellink(struct net_device *dev, struct list_head *head)
+{
+ return;
+}
+
static struct rtnl_link_ops can_link_ops __read_mostly = {
.kind = "can",
.maxtype = IFLA_CAN_MAX,
@@ -938,6 +943,7 @@ static struct rtnl_link_ops can_link_ops __read_mostly = {
.validate = can_validate,
.newlink = can_newlink,
.changelink = can_changelink,
+ .dellink = can_dellink,
.get_size = can_get_size,
.fill_info = can_fill_info,
.get_xstats_size = can_get_xstats_size,