diff options
| author | Eric Dumazet <[email protected]> | 2015-08-01 10:14:33 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2015-08-04 05:16:50 +0000 |
| commit | 10e2eb878f3ca07ac2f05fa5ca5e6c4c9174a27a (patch) | |
| tree | 69bf946cc397f31aa7cbfc8d19c04b50d6f0fc76 /drivers/net/xen-netback/interface.c | |
| parent | 3c59x: Fix resource leaks in vortex_open (diff) | |
| download | kernel-10e2eb878f3ca07ac2f05fa5ca5e6c4c9174a27a.tar.gz kernel-10e2eb878f3ca07ac2f05fa5ca5e6c4c9174a27a.zip | |
udp: fix dst races with multicast early demux
Multicast dst are not cached. They carry DST_NOCACHE.
As mentioned in commit f8864972126899 ("ipv4: fix dst race in
sk_dst_get()"), these dst need special care before caching them
into a socket.
Caching them is allowed only if their refcnt was not 0, ie we
must use atomic_inc_not_zero()
Also, we must use READ_ONCE() to fetch sk->sk_rx_dst, as mentioned
in commit d0c294c53a771 ("tcp: prevent fetching dst twice in early demux
code")
Fixes: 421b3885bf6d ("udp: ipv4: Add udp early demux")
Tested-by: Gregory Hoggarth <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Gregory Hoggarth <[email protected]>
Reported-by: Alex Gartrell <[email protected]>
Cc: Michal Kubeček <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions
