Eric Dumazet
f886497212
ipv4: fix dst race in sk_dst_get()
...
When IP route cache had been removed in linux-3.6, we broke assumption
that dst entries were all freed after rcu grace period. DST_NOCACHE
dst were supposed to be freed from dst_release(). But it appears
we want to keep such dst around, either in UDP sockets or tunnels.
In sk_dst_get() we need to make sure dst refcount is not 0
before incrementing it, or else we might end up freeing a dst
twice.
DST_NOCACHE set on a dst does not mean this dst can not be attached
to a socket or a tunnel.
Then, before actual freeing, we need to observe a rcu grace period
to make sure all other cpus can catch the fact the dst is no longer
usable.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dormando <dormando@rydia.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-25 17:41:44 -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-25 17:41:44 -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