commit | fccc397a120b54273388eb4278ed8febef45f499 | [log] [tgz] |
---|---|---|
author | WANG Cong <[email protected]> | Tue Jun 20 18:42:27 2017 |
committer | chrome-bot <[email protected]> | Fri Jun 23 07:51:27 2017 |
tree | 7abc2e56323ee9979891316ec953abc655bc2462 | |
parent | 9c39b90899ee9bacfb2f40d1e1e0cb25f2db8600 [diff] |
FROMLIST: ipv6: only call ip6_route_dev_notify() once for NETDEV_UNREGISTER In commit 242d3a49a2a1 ("ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf") I assumed NETDEV_REGISTER and NETDEV_UNREGISTER are paired, unfortunately, as reported by jeffy, netdev_wait_allrefs() could rebroadcast NETDEV_UNREGISTER event until all refs are gone. We have to add an additional check to avoid this corner case. For netdev_wait_allrefs() dev->reg_state is NETREG_UNREGISTERED, for dev_change_net_namespace(), dev->reg_state is NETREG_REGISTERED. So check for dev->reg_state != NETREG_UNREGISTERED. Fixes: 242d3a49a2a1 ("ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf") Reported-by: jeffy <[email protected]> Cc: David Ahern <[email protected]> Signed-off-by: Cong Wang <[email protected]> Acked-by: David Ahern <[email protected]> (am from https://patchwork.ozlabs.org/patch/778449/) BUG=b:62779588 TEST=test with SLUB_DEBUG, no more "Poison overwritten" warnings Change-Id: I23c7007fe4973177e59dee3ca63c1c7aeb6aca9e Signed-off-by: Jeffy Chen <[email protected]> Reviewed-on: https://chromium-review.googlesource.com/542117 Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Douglas Anderson <[email protected]>