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-05-30 17:54:47 -07:00
2014-06-04 22:46:38 -07:00
2014-02-25 07:04:17 +01:00
2014-01-02 00:08:38 -05:00
2013-12-26 13:43:21 -05:00
2014-06-11 15:39:18 -07:00
2014-05-18 21:10:29 -04:00
2014-02-25 07:04:17 +01:00
2014-04-16 15:05:11 -04:00
2013-12-28 17:01:46 -05:00
2013-12-10 17:54:23 -05:00
2014-05-07 17:14:32 -04:00
2014-06-04 15:11:41 -07:00
2014-06-04 22:46:38 -07:00
2014-06-11 15:46:13 -07:00
2014-05-13 18:35:08 -04:00
2014-06-02 11:00:41 -07:00
2014-05-14 15:31:45 -04:00
2014-01-13 22:35:46 -08:00
2014-03-06 15:28:45 -05:00
2014-05-14 16:07:23 -04:00
2013-12-29 16:34:25 -05:00
2013-10-08 23:19:24 -04:00
2014-06-12 14:27:40 -07:00
2014-05-12 14:03:41 -04:00
2014-05-05 16:02:59 +02:00
2014-06-10 22:46:42 -07:00
2014-01-27 16:22:11 -08:00
2014-04-28 13:28:43 -04:00
2014-06-02 11:00:41 -07:00
2014-02-26 15:51:00 -05:00
2014-06-04 22:46:38 -07:00
2014-06-25 17:41:44 -07:00
2014-06-11 00:30:52 -07:00
2014-02-25 07:04:17 +01:00
2014-02-14 00:14:23 -05:00
2014-06-11 16:02:55 -07:00
2014-06-02 11:00:41 -07:00
2013-09-03 21:41:43 -04:00
2014-02-25 07:04:16 +01:00
2014-02-19 11:41:25 +01:00
2014-05-08 22:50:47 -04:00
2014-05-07 16:06:05 -04:00
2013-11-28 18:47:51 -05:00
2014-06-02 11:00:41 -07:00
2014-06-02 11:00:41 -07:00
2014-05-13 18:35:09 -04:00
2014-05-14 15:31:45 -04:00
2014-05-03 19:23:07 -04:00
2014-05-03 19:23:07 -04:00
2014-05-12 13:19:14 -04:00
2012-01-11 12:56:06 -08:00
2014-06-16 21:35:00 -07:00
2014-05-03 19:23:07 -04:00
2014-05-03 19:23:07 -04:00
2014-05-03 19:23:07 -04:00
2014-05-03 19:23:07 -04:00
2014-06-19 20:50:49 -07:00
2014-05-13 18:35:09 -04:00
2014-05-03 19:23:07 -04:00
2014-05-13 12:16:21 -04:00
2014-06-05 00:49:51 -07:00
2014-05-13 17:53:02 -04:00
2014-06-04 22:46:38 -07:00
2014-06-12 14:27:40 -07:00
2014-02-26 17:08:40 -05:00
2014-05-03 19:23:07 -04:00
2014-03-03 15:58:03 -05:00
2014-05-03 19:23:07 -04:00
2013-10-19 19:12:11 -04:00
2014-05-03 19:23:07 -04:00
2014-02-13 18:22:34 -05:00
2014-05-03 19:23:07 -04:00
2014-04-20 18:18:54 -04:00
2012-03-11 23:42:51 -07:00
2013-04-19 14:57:56 -04:00
2013-10-19 19:12:11 -04:00
2014-06-11 15:46:13 -07:00
2014-06-13 15:39:24 -07:00
2014-05-23 16:28:53 -04:00
2014-02-25 07:04:16 +01:00
2013-12-26 13:43:21 -05:00
2014-06-02 11:00:41 -07:00
2014-05-24 00:32:30 -04:00
2014-03-14 07:28:07 +01:00
2014-04-29 08:41:12 +02:00
2013-12-18 16:58:20 -05:00
2013-05-31 17:19:05 -07:00