summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEric Dumazet2014-06-30 10:26:23 +0200
committerDavid S. Miller2014-07-01 08:40:58 +0200
commit7f502361531e9eecb396cf99bdc9e9a59f7ebd7f (patch)
tree6aeca5011b3a7aaedc275e8680407bc7e77b714d /drivers
parentpowerpc: bpf: Fix the broken LD_VLAN_TAG_PRESENT test (diff)
downloadkernel-qcow2-linux-7f502361531e9eecb396cf99bdc9e9a59f7ebd7f.tar.gz
kernel-qcow2-linux-7f502361531e9eecb396cf99bdc9e9a59f7ebd7f.tar.xz
kernel-qcow2-linux-7f502361531e9eecb396cf99bdc9e9a59f7ebd7f.zip
ipv4: irq safe sk_dst_[re]set() and ipv4_sk_update_pmtu() fix
We have two different ways to handle changes to sk->sk_dst First way (used by TCP) assumes socket lock is owned by caller, and use no extra lock : __sk_dst_set() & __sk_dst_reset() Another way (used by UDP) uses sk_dst_lock because socket lock is not always taken. Note that sk_dst_lock is not softirq safe. These ways are not inter changeable for a given socket type. ipv4_sk_update_pmtu(), added in linux-3.8, added a race, as it used the socket lock as synchronization, but users might be UDP sockets. Instead of converting sk_dst_lock to a softirq safe version, use xchg() as we did for sk_rx_dst in commit e47eb5dfb296b ("udp: ipv4: do not use sk_dst_lock from softirq context") In a follow up patch, we probably can remove sk_dst_lock, as it is only used in IPv6. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Steffen Klassert <steffen.klassert@secunet.com> Fixes: 9cb3a50c5f63e ("ipv4: Invalidate the socket cached route on pmtu events if possible") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions