forked from Minki/linux
Staging: hv: netvsc: Fix a dereferencing issue
net_dev is being de-referenced without proper checking; fix it. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
92ae4ebdaa
commit
715a4801e7
@ -368,11 +368,11 @@ int rndis_filter_receive(struct hv_device *dev,
|
||||
struct rndis_message *rndis_hdr;
|
||||
struct net_device *ndev;
|
||||
|
||||
ndev = net_dev->ndev;
|
||||
|
||||
if (!net_dev)
|
||||
return -EINVAL;
|
||||
|
||||
ndev = net_dev->ndev;
|
||||
|
||||
/* Make sure the rndis device state is initialized */
|
||||
if (!net_dev->extension) {
|
||||
netdev_err(ndev, "got rndis message but no rndis device - "
|
||||
|
Loading…
Reference in New Issue
Block a user