Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 715a4801 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

Staging: hv: netvsc: Fix a dereferencing issue



net_dev is being de-referenced without proper checking; fix it.

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 92ae4ebd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 - "