Files
linux/include/linux
Will Deacon 108a7ac448 include/linux/page_ref.h: ensure page_ref_unfreeze is ordered against prior accesses
page_ref_freeze and page_ref_unfreeze are designed to be used as a pair,
wrapping a critical section where struct pages can be modified without
having to worry about consistency for a concurrent fast-GUP.

Whilst page_ref_freeze has full barrier semantics due to its use of
atomic_cmpxchg, page_ref_unfreeze is implemented using atomic_set, which
doesn't provide any barrier semantics and allows the operation to be
reordered with respect to page modifications in the critical section.

This patch ensures that page_ref_unfreeze is ordered after any critical
section updates, by invoking smp_mb() prior to the atomic_set.

Link: http://lkml.kernel.org/r/1497349722-6731-3-git-send-email-will.deacon@arm.com
Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Steve Capper <steve.capper@arm.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-07-10 16:32:31 -07:00
..
2017-04-21 10:45:01 -04:00
2017-06-03 19:29:26 +09:00
2017-07-03 01:43:45 -07:00
2017-06-08 18:52:36 -07:00
2017-07-06 16:24:33 -07:00
2017-07-01 16:15:13 -07:00
2017-07-01 16:15:13 -07:00
2017-07-03 02:22:52 -07:00
2017-03-30 09:37:20 +02:00
2017-05-24 12:43:30 -04:00
2017-06-05 16:59:12 +02:00
2017-04-18 20:41:12 +02:00
2017-06-22 15:43:47 +01:00
2017-06-09 11:52:07 +02:00
2017-05-18 10:30:19 -06:00
2017-07-10 16:32:31 -07:00
2017-07-07 20:09:10 -04:00
2017-07-07 09:49:24 +10:00
2017-04-10 17:15:02 +02:00
2017-04-27 05:13:04 -04:00
2017-07-10 16:32:31 -07:00
2017-07-07 20:09:10 -04:00
2017-06-05 16:59:10 +02:00
2017-03-21 10:15:47 +02:00
2017-05-18 10:07:41 -04:00
2017-05-18 10:07:40 -04:00
2017-06-21 14:37:12 -04:00
2017-05-08 17:15:12 -07:00
2017-05-03 15:52:10 -07:00
2017-06-04 16:53:00 +02:00
2017-02-24 17:46:57 -08:00
2017-04-24 14:30:46 -04:00
2017-04-26 13:03:04 -04:00
2017-06-05 16:59:16 +02:00
2017-05-26 10:10:37 +02:00
2017-05-18 10:07:40 -04:00
2017-06-29 10:48:57 +01:00
2017-05-03 15:52:10 -07:00
2017-06-08 10:35:49 +02:00
2017-05-08 17:15:12 -07:00
2017-07-06 16:24:30 -07:00
2017-03-26 15:09:45 +02:00
2017-06-15 12:12:40 -04:00
2017-06-08 18:52:42 -07:00
2017-06-01 14:53:04 -04:00
2017-07-10 16:32:30 -07:00
2017-03-09 15:42:33 +01:00
2017-05-09 16:43:22 +03:00
2017-06-09 11:54:54 +02:00