]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: hold a reference to the netdevice around ethtool compat
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 26 Feb 2019 03:34:06 +0000 (19:34 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Feb 2019 16:49:05 +0000 (08:49 -0800)
commitb517dc73609ae3072db734f29b3930e4b200e833
tree8e7cc2289a7e48072dc3db8690e709828debb7d9
parentbfebc9e33273f0ff591e14d68884453f786a2099
devlink: hold a reference to the netdevice around ethtool compat

When ethtool is calling into devlink compat code make sure we have
a reference on the netdevice on which the operation was invoked.

v3: move the hold/lock logic into devlink_compat_* functions (Florian)

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c
net/core/ethtool.c