Eric Dumazet
7f50236153
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 e47eb5dfb2 ("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: 9cb3a50c5f ("ipv4: Invalidate the socket cached route on pmtu events if possible")
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-06-30 23:40:58 -07:00
..
2014-03-25 16:38:16 -05:00
2014-05-23 11:24:04 -07:00
2013-09-23 16:29:41 -04:00
2013-12-06 12:37:56 -05:00
2013-04-08 17:16:57 -04:00
2014-06-16 13:07:44 +02:00
2014-05-14 15:31:45 -04:00
2014-05-20 00:06:04 +02:00
2012-06-17 16:29:38 -07:00
2014-06-11 12:23:17 -07:00
2014-02-12 19:23:32 -05:00
2014-04-20 18:18:55 -04:00
2014-02-12 19:23:32 -05:00
2014-04-30 13:31:26 -04:00
2014-05-16 17:23:41 -04:00
2013-07-31 17:50:01 -07:00
2013-08-10 01:16:44 -07:00
2014-05-05 13:13:50 -04:00
2011-01-13 21:48:25 -08:00
2013-12-28 17:02:46 -05:00
2011-11-30 18:51:03 -05:00
2013-07-31 17:50:02 -07:00
2014-01-13 17:39:11 +01:00
2011-08-08 14:26:29 -04:00
2014-05-22 13:58:36 -04:00
2014-05-05 15:26:29 -04:00
2013-12-10 17:56:54 -05:00
2014-02-08 10:36:58 -05:00
2014-01-21 23:17:20 -08:00
2013-09-20 14:49:32 -04:00
2014-02-09 17:32:50 -08:00
2013-12-06 12:37:56 -05:00
2013-12-06 12:37:56 -05:00
2013-12-10 21:50:00 -05:00
2013-09-20 14:49:32 -04:00
2013-09-20 14:49:32 -04:00
2013-09-20 14:49:32 -04:00
2014-02-09 17:32:49 -08:00
2014-02-09 17:32:49 -08:00
2014-04-30 13:31:25 -04:00
2013-01-09 23:59:53 -08:00
2012-07-19 10:43:03 -07:00
2014-04-15 13:47:15 -04:00
2013-11-07 19:28:58 -05:00
2014-02-04 20:19:51 -08:00
2013-09-20 14:49:33 -04:00
2013-03-26 12:32:13 -04:00
2013-10-03 15:36:37 -04:00
2014-04-16 15:05:11 -04:00
2014-02-12 07:02:11 +01:00
2013-09-20 14:49:33 -04:00
2013-09-20 14:49:33 -04:00
2014-01-06 15:51:53 -08:00
2014-06-04 22:46:38 -07:00
2013-01-27 22:46:33 -05:00
2013-09-20 14:49:33 -04:00
2014-02-06 09:34:58 +01:00
2014-05-16 17:23:42 -04:00
2014-05-15 15:51:42 -04:00
2014-03-28 16:54:50 -04:00
2014-04-15 12:58:34 -04:00
2013-10-19 19:45:34 -04:00
2013-09-21 14:01:38 -04:00
2014-04-15 12:58:34 -04:00
2014-05-07 15:30:52 -04:00
2013-10-23 17:01:41 -04:00
2014-05-14 16:07:23 -04:00
2014-05-13 18:35:09 -04:00
2014-01-17 17:56:33 -08:00
2014-06-03 23:32:12 -07:00
2014-06-04 22:46:38 -07:00
2014-03-27 15:09:07 -04:00
2014-05-24 00:32:30 -04:00
2014-01-04 20:10:24 -05:00
2013-09-21 14:01:38 -04:00
2014-04-15 13:47:15 -04:00
2014-04-18 14:20:48 +02:00
2014-06-02 11:00:41 -07:00
2010-02-16 23:05:38 -08:00
2014-06-02 11:00:41 -07:00
2014-02-09 17:32:50 -08:00
2013-09-21 14:01:39 -04:00
2013-09-21 14:01:38 -04:00
2013-04-29 15:41:56 -04:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-01-01 22:22:43 -05:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2013-09-21 14:01:38 -04:00
2014-01-03 20:56:48 -05:00
2014-05-26 11:04:41 +02:00
2014-03-14 22:15:26 -04:00
2013-12-06 12:37:56 -05:00
2013-09-04 14:53:20 -04:00
2013-10-01 17:06:14 -04:00
2013-09-21 14:01:39 -04:00
2014-01-16 11:31:58 -08:00
2014-04-24 12:36:00 -04:00
2011-05-27 13:41:33 -04:00
2013-09-21 14:01:39 -04:00
2014-01-25 11:17:34 -08:00
2013-09-21 14:01:39 -04:00
2014-02-08 10:36:58 -05:00
2013-09-21 14:01:39 -04:00
2014-03-14 22:15:26 -04:00
2013-09-21 14:01:39 -04:00
2014-01-19 19:53:18 -08:00
2014-04-27 23:42:39 -04:00
2014-06-11 15:50:59 -07:00
2014-05-23 16:28:53 -04:00
2013-09-23 01:51:08 -04:00
2013-09-23 01:51:08 -04:00
2013-09-23 01:51:08 -04:00
2014-01-21 23:17:20 -08:00
2014-04-09 10:55:34 +02:00
2013-10-10 00:08:07 -04:00
2013-09-23 01:51:08 -04:00
2014-03-24 12:45:01 -04:00
2014-02-18 18:15:42 -05:00
2014-04-27 23:42:39 -04:00
2013-09-23 01:51:09 -04:00
2014-06-02 11:00:41 -07:00
2014-05-07 16:06:05 -04:00
2014-06-30 23:40:58 -07:00
2013-12-19 18:51:20 -05:00
2013-09-23 01:51:09 -04:00
2013-10-21 18:43:02 -04:00
2014-06-10 22:30:58 -07:00
2012-06-09 14:56:12 -07:00
2014-01-19 19:53:18 -08:00
2014-05-22 14:57:15 -04:00
2014-06-15 01:00:49 -07:00
2013-09-23 16:29:40 -04:00
2013-07-27 22:14:06 -07:00
2014-06-04 22:46:39 -07:00
2013-09-23 16:29:40 -04:00
2014-05-05 15:37:55 +02:00
2014-02-17 16:42:39 -05:00
2013-09-23 16:29:41 -04:00
2010-04-22 16:12:36 -07:00
2014-04-23 08:21:04 +02:00