mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 00:30:52 +07:00
netpoll: fix use after free
After a bonding master reclaims the netpoll info struct, slaves could still hold a pointer to the reclaimed data. This patch fixes it: as soon as netpoll_async_cleanup is called for a slave (eg. when un-enslaved), we make sure that this slave doesn't point to the data. Signed-off-by: David Decotigny <decot@googlers.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f51de24356
commit
efa95b01da
@ -822,7 +822,8 @@ void __netpoll_cleanup(struct netpoll *np)
|
||||
|
||||
RCU_INIT_POINTER(np->dev->npinfo, NULL);
|
||||
call_rcu_bh(&npinfo->rcu, rcu_cleanup_netpoll_info);
|
||||
}
|
||||
} else
|
||||
RCU_INIT_POINTER(np->dev->npinfo, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__netpoll_cleanup);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user