udp: rescan hash2 list if chains crossed.
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | Move hash calculation inside udp4_lib_lookup2()net/ | +9 | 5 replies | |
| 2/2 | Rescan the hash2 list if the hash chains have got cross-linked.net/ | +14 | 6 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] udp: rescan hash2 list if chains crossed.
Commit ca065d0cf80fa removed the rescan of the hash2 list (local address + local port) during udp receive if the final socket wasn't on the expected hash chain.
While unusual, udp sockets can get rehashed (and without an rcu delay) without this rescan received packets can generate an unexpected ICMP port unreachable instead of being delivered to a local socket.
The rescan could be checked for every socket, but the chances of the hash chain being diverted twice and ending up in the correct list is pretty minimal.
This is the 'smoking gun' for some ICMP port unreachable messages being received on long-lived UDP sockets on 127.0.0.1. The failures are rare and being seen on AWS - so it is pretty impossible to test the patch.
David Laight (2):
Move hash calculation inside udp4_lib_lookup2() Rescan the hash2 list if the hash chains have got cross-linked.
net/ipv4/udp.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-)
Signature · 5 lines
2.17.1 - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)