diff options
author | Jarod Wilson <[email protected]> | 2020-07-08 13:46:31 -0400 |
---|---|---|
committer | David S. Miller <[email protected]> | 2020-07-08 15:37:14 -0700 |
commit | 5cd24cbe7dca62089ac6228f1dd14729d7da6ed8 (patch) | |
tree | 6c344b7909a47fb3b8ccc2048c48e9591e7d2793 /scripts/gdb/linux/proc.py | |
parent | 32e0d42a162ade4a931f59b505c2ffb463a70e34 (diff) |
bonding: deal with xfrm state in all modes and add more error-checking
It's possible that device removal happens when the bond is in non-AB mode,
and addition happens in AB mode, so bond_ipsec_del_sa() never gets called,
which leaves security associations in an odd state if bond_ipsec_add_sa()
then gets called after switching the bond into AB. Just call add and
delete universally for all modes to keep things consistent.
However, it's also possible that this code gets called when the system is
shutting down, and the xfrm subsystem has already been disconnected from
the bond device, so we need to do some error-checking and bail, lest we
hit a null ptr deref.
Fixes: a3b658cfb664 ("bonding: allow xfrm offload setup post-module-load")
CC: Huy Nguyen <[email protected]>
CC: Saeed Mahameed <[email protected]>
CC: Jay Vosburgh <[email protected]>
CC: Veaceslav Falico <[email protected]>
CC: Andy Gospodarek <[email protected]>
CC: "David S. Miller" <[email protected]>
CC: Jeff Kirsher <[email protected]>
CC: Jakub Kicinski <[email protected]>
CC: Steffen Klassert <[email protected]>
CC: Herbert Xu <[email protected]>
CC: [email protected]
CC: [email protected]
Signed-off-by: Jarod Wilson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions