hv_netvsc: Fix accessing freed memory in netvsc_change_mtu()
authorHaiyang Zhang <haiyangz@microsoft.com>
Wed, 23 Mar 2016 16:43:09 +0000 (09:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Mar 2016 18:38:55 +0000 (14:38 -0400)
commitd212b4633c3a99561939f2d423eacf3263850bcd
treed5bc5a90517956c625b52bfbf92fb16bc7b9fc3f
parent1f461dcdd296eecedaffffc6bae2bfa90bd7eb89
hv_netvsc: Fix accessing freed memory in netvsc_change_mtu()

struct netvsc_device is freed in rndis_filter_device_remove(). So we save
the nvdev->num_chn into a temp variable for later usage.

(Please also include this patch into stable branch.)

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c