Commit 10843e1
net: bonding: fix possible peer notify event loss or dup issue
If the send_peer_notif counter and the peer event notify are not synchronized.
It may cause problems such as the loss or dup of peer notify event.
Before this patch:
- If should_notify_peers is true and the lock for send_peer_notif-- fails, peer
event may be sent again in next mii_monitor loop, because should_notify_peers
is still true.
- If should_notify_peers is true and the lock for send_peer_notif-- succeeded,
but the lock for peer event fails, the peer event will be lost.
This patch locks the RTNL for send_peer_notif, events, and commit simultaneously.
Fixes: 07a4dde ("bonding: add an option to specify a delay between peer notifications")
Cc: Jay Vosburgh <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Hangbin Liu <[email protected]>
Cc: Nikolay Aleksandrov <[email protected]>
Cc: Vincent Bernat <[email protected]>
Cc: <[email protected]>
Signed-off-by: Tonghao Zhang <[email protected]>
Acked-by: Jay Vosburgh <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>1 parent c0178ee commit 10843e1
1 file changed
+18
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2874 | 2874 | | |
2875 | 2875 | | |
2876 | 2876 | | |
2877 | | - | |
| 2877 | + | |
2878 | 2878 | | |
2879 | 2879 | | |
2880 | 2880 | | |
| |||
2886 | 2886 | | |
2887 | 2887 | | |
2888 | 2888 | | |
| 2889 | + | |
2889 | 2890 | | |
2890 | 2891 | | |
2891 | | - | |
2892 | | - | |
2893 | | - | |
2894 | | - | |
2895 | | - | |
2896 | | - | |
2897 | | - | |
2898 | | - | |
2899 | | - | |
2900 | 2892 | | |
2901 | | - | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
2902 | 2896 | | |
2903 | 2897 | | |
2904 | 2898 | | |
2905 | | - | |
2906 | 2899 | | |
2907 | 2900 | | |
2908 | 2901 | | |
2909 | | - | |
2910 | | - | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
2911 | 2915 | | |
2912 | | - | |
2913 | 2916 | | |
2914 | 2917 | | |
2915 | 2918 | | |
2916 | 2919 | | |
2917 | 2920 | | |
2918 | 2921 | | |
2919 | 2922 | | |
2920 | | - | |
2921 | | - | |
2922 | | - | |
2923 | | - | |
2924 | | - | |
2925 | | - | |
2926 | | - | |
2927 | 2923 | | |
2928 | 2924 | | |
2929 | 2925 | | |
| |||
0 commit comments