]> git.baikalelectronics.ru Git - kernel.git/commit
net: sysfs: ethtool_ops can be NULL
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 26 Oct 2009 01:23:33 +0000 (01:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Oct 2009 10:59:46 +0000 (03:59 -0700)
commit768b5881ec66a2a5ab19f87c21ea8426bae07f0b
treec6c56403289c8bff16884592dc76d276444e9f04
parent09f108e0142a8e51c236e0d45c2d77ac35234081
net: sysfs: ethtool_ops can be NULL

commit 2b76588fbf709d2482e79ad637cd307a4a18a1b5
(net: export device speed and duplex via sysfs)
made the wrong assumption that netdev->ethtool_ops was always set.

This makes possible to crash kernel and let rtnl in locked state.

modprobe dummy
ip link set dummy0 up
(udev runs and crash)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net-sysfs.c