]> git.baikalelectronics.ru Git - kernel.git/commit
can: fix oops caused by wrong rtnl newlink usage
authorOliver Hartkopp <oliver@hartkopp.net>
Tue, 11 Aug 2009 02:41:24 +0000 (02:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Aug 2009 23:33:01 +0000 (16:33 -0700)
commitd236a5dce6f099afdb5e08bf28fd43b268afcd8d
treef68fe3d6ab0640d9f258434ddaa4e8cf060251b0
parent1abb903fc64d3aaa06fb0b8694a9db3991cf697b
can: fix oops caused by wrong rtnl newlink usage

For 'real' hardware CAN devices the netlink interface is used to set CAN
specific communication parameters. Real CAN hardware can not be created with
the ip tool ...

The invocation of 'ip link add type can' lead to an oops as the standard rtnl
newlink function was called:

http://bugzilla.kernel.org/show_bug.cgi?id=13954

This patch adds a private newlink function for the CAN device driver interface
that unconditionally returns -EOPNOTSUPP.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Reported-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
CC: Patrick McHardy <kaber@trash.net>
CC: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/dev.c