]> git.baikalelectronics.ru Git - kernel.git/commit
netvsc: use ERR_PTR to avoid dereference issues
authorstephen hemminger <stephen@networkplumber.org>
Wed, 19 Jul 2017 18:53:16 +0000 (11:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Jul 2017 05:20:05 +0000 (22:20 -0700)
commit52ea636677d368a1fb1110e7ef9ed447fae7befe
tree0ec6e775b34202d7725fc768cd0742f3ae6ebfcc
parenta79213653f5bf9cf1cf2c1f0e1e507aa6fdebc9a
netvsc: use ERR_PTR to avoid dereference issues

The rndis_filter_device_add function is called both in
probe context and RTNL context,and creates the netvsc_device
inner structure. It is easier to get the RTNL lock annotation
correct if it returns the object directly, rather than implicitly
by updating network device private data.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c
drivers/net/hyperv/rndis_filter.c