Peter Zijlstra
20273941f2
mm: fix race in kunmap_atomic()
...
Christoph reported a nice splat which illustrated a race in the new stack
based kmap_atomic implementation.
The problem is that we pop our stack slot before we're completely done
resetting its state -- in particular clearing the PTE (sometimes that's
CONFIG_DEBUG_HIGHMEM). If an interrupt happens before we actually clear
the PTE used for the last slot, that interrupt can reuse the slot in a
dirty state, which triggers a BUG in kmap_atomic().
Fix this by introducing kmap_atomic_idx() which reports the current slot
index without actually releasing it and use that to find the PTE and delay
the _pop() until after we're completely done.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reported-by: Christoph Hellwig <hch@infradead.org>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:05 -07:00
..
2010-09-19 16:18:37 +01:00
2010-10-24 13:41:39 -07:00
2010-10-26 11:32:47 +02:00
2010-10-26 16:52:08 -07:00
2010-10-22 10:52:56 -07:00
2010-08-03 14:31:24 -07:00
2010-10-20 00:27:46 -04:00
2010-10-26 11:32:49 +02:00
2010-10-21 16:42:32 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-25 10:59:31 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-26 16:52:12 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-21 16:42:32 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-25 14:11:37 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:33 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-21 16:42:32 -07:00
2010-10-20 00:27:46 -04:00
2010-10-22 10:52:56 -07:00
2010-10-20 00:27:46 -04:00
2010-10-22 20:30:48 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:33 -04:00
2010-10-20 00:27:46 -04:00
2010-10-25 13:46:56 -07:00
2010-10-26 10:14:23 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-25 08:32:05 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:33 -04:00
2010-10-25 08:32:05 -07:00
2009-12-09 19:43:33 -08:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-24 13:41:39 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-24 13:41:39 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-07-22 09:55:38 +01:00
2010-07-22 09:55:38 +01:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-21 18:13:10 -07:00
2010-10-21 16:42:32 -07:00
2010-10-25 07:59:01 -07:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-20 00:27:46 -04:00
2010-10-27 18:03:05 -07:00
2010-10-18 11:03:21 +02:00
2010-10-11 17:46:16 +02:00
2010-07-31 14:20:02 +01:00
2010-10-22 10:52:56 -07:00
2010-10-25 07:59:01 -07:00
2010-10-26 10:02:39 -07:00
2010-08-07 17:07:31 -07:00
2010-10-09 17:07:19 +08:00
2010-08-31 13:25:17 +01:00
2010-10-18 18:33:04 +09:00
2010-10-25 08:32:05 -07:00
2010-10-20 00:27:33 -04:00
2010-10-20 00:27:33 -04:00
2010-10-20 00:27:33 -04:00
2010-07-26 10:48:34 +01:00
2010-09-09 22:49:26 +01:00
2010-07-09 14:41:34 +01:00
2010-10-25 18:42:06 -07:00
2010-10-19 22:06:36 +01:00
2010-10-19 20:12:24 +01:00