Commit 3ce82b1
net: bonding: fix possible peer notify event loss or dup issue
commit 10843e1 upstream.
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 <jv@jvosburgh.net>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Hangbin Liu <liuhangbin@gmail.com>
Cc: Nikolay Aleksandrov <razor@blackwall.org>
Cc: Vincent Bernat <vincent@bernat.ch>
Cc: <stable@vger.kernel.org>
Signed-off-by: Tonghao Zhang <tonghao@bamaicloud.com>
Acked-by: Jay Vosburgh <jv@jvosburgh.net>
Link: https://patch.msgid.link/20251021050933.46412-1-tonghao@bamaicloud.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 3f307a9 commit 3ce82b1
1 file changed
+18
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2951 | 2951 | | |
2952 | 2952 | | |
2953 | 2953 | | |
2954 | | - | |
| 2954 | + | |
2955 | 2955 | | |
2956 | 2956 | | |
2957 | 2957 | | |
| |||
2963 | 2963 | | |
2964 | 2964 | | |
2965 | 2965 | | |
| 2966 | + | |
2966 | 2967 | | |
2967 | 2968 | | |
2968 | | - | |
2969 | | - | |
2970 | | - | |
2971 | | - | |
2972 | | - | |
2973 | | - | |
2974 | | - | |
2975 | | - | |
2976 | | - | |
2977 | 2969 | | |
2978 | | - | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
2979 | 2973 | | |
2980 | 2974 | | |
2981 | 2975 | | |
2982 | | - | |
2983 | 2976 | | |
2984 | 2977 | | |
2985 | 2978 | | |
2986 | | - | |
2987 | | - | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
2988 | 2992 | | |
2989 | | - | |
2990 | 2993 | | |
2991 | 2994 | | |
2992 | 2995 | | |
2993 | 2996 | | |
2994 | 2997 | | |
2995 | 2998 | | |
2996 | 2999 | | |
2997 | | - | |
2998 | | - | |
2999 | | - | |
3000 | | - | |
3001 | | - | |
3002 | | - | |
3003 | | - | |
3004 | 3000 | | |
3005 | 3001 | | |
3006 | 3002 | | |
| |||
0 commit comments