]> git.baikalelectronics.ru Git - kernel.git/commit
netvsc: fix use after free on module removal
authorstephen hemminger <stephen@networkplumber.org>
Wed, 19 Apr 2017 22:22:02 +0000 (15:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Apr 2017 17:59:57 +0000 (13:59 -0400)
commitcd5d8c6f6117357311fe8a1f37f9d06023be0c91
treed844c765fe7dcdf2cafb136bcaa2f3cfb3569250
parent591abecdf64c41bef806236372a786e21f4796f7
netvsc: fix use after free on module removal

The NAPI data structure is embedded in the netvsc_device structure
and is freed when device is closed. There is still a reference
(in NAPI list) to this which causes a crash in netif_napi_del
when device is removed. Fix by managing NAPI instances correctly.

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