Matthew Wilcox
46437f9a55
radix-tree: fix race in gang lookup
...
If the indirect_ptr bit is set on a slot, that indicates we need to redo
the lookup. Introduce a new function radix_tree_iter_retry() which
forces the loop to retry the lookup by setting 'slot' to NULL and
turning the iterator back to point at the problematic entry.
This is a pretty rare problem to hit at the moment; the lookup has to
race with a grow of the radix tree from a height of 0. The consequences
of hitting this race are that gang lookup could return a pointer to a
radix_tree_node instead of a pointer to whatever the user had inserted
in the tree.
Fixes: cebbd29e1c2f ("radix-tree: rewrite gang lookup using iterator")
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-02-03 08:28:43 -08:00
..
2015-12-23 18:20:01 +08:00
2014-10-09 11:35:48 +03:00
2015-05-24 11:56:29 -07:00
2014-09-28 11:08:01 +02:00
2015-11-17 22:00:39 +08:00
2015-12-01 13:52:25 +11:00
2014-06-04 16:54:18 -07:00
2015-09-10 13:29:01 -07:00
2014-08-06 18:01:24 -07:00
2015-08-05 13:38:07 +01:00
2015-01-07 16:08:41 +00:00
2016-01-11 14:39:17 -08:00
2015-07-27 14:06:24 +02:00
2014-12-13 12:42:51 -08:00
2015-09-10 13:29:01 -07:00
2014-12-22 16:43:06 +00:00
2015-11-23 09:44:58 +01:00
2015-05-28 11:31:52 +09:30
2013-06-19 17:54:06 +02:00
2015-01-29 11:57:38 -08:00
2014-04-03 16:21:12 -07:00
2014-10-03 18:40:58 +01:00
2014-03-20 10:11:35 -04:00
2015-05-27 15:22:15 +02:00
2015-06-18 17:00:23 -10:00
2014-05-16 14:26:52 -04:00
2014-06-25 16:04:00 -07:00
2015-05-26 15:26:43 +02:00
2015-05-30 22:42:24 -07:00
2015-06-11 15:08:32 +02:00
2013-06-26 12:10:56 +02:00
2016-01-27 15:40:59 +01:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-07-17 16:39:54 -07:00
2015-10-05 04:49:54 +01:00
2015-10-21 15:18:36 +01:00
2015-11-16 14:42:12 -05:00
2016-01-14 16:00:49 -08:00
2014-05-05 16:07:46 -07:00
2016-01-04 10:26:58 -05:00
2015-02-12 18:54:15 -08:00
2013-08-14 23:24:01 +02:00
2015-10-23 17:55:10 +09:00
2014-04-30 19:49:37 +01:00
2015-04-17 09:03:54 -04:00
2014-01-21 23:17:20 -08:00
2014-09-08 09:51:30 +09:00
2015-02-13 21:21:35 -08:00
2015-12-22 17:10:18 -06:00
2014-08-06 18:01:25 -07:00
2015-11-06 17:50:42 -08:00
2015-11-06 17:50:42 -08:00
2014-09-13 11:14:53 -07:00
2015-11-06 17:50:42 -08:00
2014-05-05 09:09:14 +02:00
2015-02-12 18:54:15 -08:00
2016-01-20 17:09:18 -08:00
2014-04-07 16:36:11 -07:00
2015-11-05 16:34:48 -08:00
2015-04-14 16:49:04 -07:00
2015-12-06 20:42:19 -05:00
2016-01-19 15:26:55 -05:00
2015-11-06 17:50:42 -08:00
2016-01-16 11:17:27 -08:00
2016-01-23 18:45:06 -08:00
2016-01-21 12:32:08 -08:00
2015-11-05 19:34:48 -08:00
2014-11-11 09:31:52 -06:00
2016-01-20 17:09:18 -08:00
2014-08-08 15:57:25 -07:00
2015-07-28 08:50:42 +01:00
2015-02-12 18:54:15 -08:00
2015-11-06 17:50:42 -08:00
2015-09-10 13:29:01 -07:00
2015-03-31 09:45:50 -06:00
2016-01-22 11:58:43 -08:00
2016-01-15 17:56:32 -08:00
2015-06-16 14:12:35 -04:00
2015-11-06 17:50:42 -08:00
2014-10-03 06:09:30 +02:00
2015-08-12 11:59:04 +02:00
2015-11-25 09:22:02 -07:00
2016-01-23 18:45:06 -08:00
2015-02-12 18:54:15 -08:00
2014-06-25 17:45:43 -07:00
2015-12-03 11:49:23 -05:00
2015-03-31 14:07:24 -04:00
2015-10-03 16:40:51 +01:00
2015-10-08 05:26:36 -07:00
2014-01-23 16:36:55 -08:00
2015-09-08 14:35:59 -07:00
2015-05-29 07:39:34 +10:00
2015-11-06 17:50:42 -08:00
2013-11-13 12:09:11 +09:00
2014-09-24 13:31:50 -04:00
2015-02-12 18:54:16 -08:00
2015-11-23 09:44:58 +01:00
2016-02-03 08:28:43 -08:00
2015-10-08 05:26:38 -07:00
2016-01-21 17:20:51 -08:00
2014-01-23 16:37:03 -08:00
2015-05-28 11:32:04 +09:30
2014-01-21 23:17:20 -08:00
2015-12-31 18:20:10 -05:00
2015-08-17 08:12:51 -06:00
2015-12-23 14:27:20 -05:00
2015-08-24 14:28:01 -06:00
2015-03-23 22:12:08 -04:00
2015-09-08 15:35:28 -07:00
2014-04-07 16:36:14 -07:00
2015-06-25 17:00:40 -07:00
2015-02-12 18:54:16 -08:00
2016-01-20 17:09:18 -08:00
2015-11-10 16:32:11 -08:00
2015-12-17 10:05:19 -08:00
2015-12-17 10:05:19 -08:00
2015-06-25 15:22:36 -07:00
2014-04-03 16:21:06 -07:00
2015-12-18 16:04:51 -05:00
2016-01-07 13:44:22 -07:00
2016-01-20 17:09:18 -08:00
2015-11-05 19:34:48 -08:00
2014-01-23 16:36:57 -08:00
2016-01-16 11:17:29 -08:00
2015-11-23 12:36:08 -05:00
2015-08-03 11:51:12 +02:00
2015-08-05 09:53:40 +02:00
2014-01-23 16:36:57 -08:00
2015-09-10 13:29:01 -07:00
2016-02-03 08:28:43 -08:00
2014-10-14 02:18:14 +02:00
2015-04-22 17:06:49 +02:00
2016-01-20 17:09:18 -08:00
2016-01-20 17:09:18 -08:00
2016-01-16 11:17:30 -08:00