Christian Borntraeger
e37c698270
mm: replace ACCESS_ONCE with READ_ONCE or barriers
...
ACCESS_ONCE does not work reliably on non-scalar types. For
example gcc 4.6 and 4.7 might remove the volatile tag for such
accesses during the SRA (scalar replacement of aggregates) step
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 )
Let's change the code to access the page table elements with
READ_ONCE that does implicit scalar accesses for the gup code.
mm_find_pmd is tricky, because m68k and sparc(32bit) define pmd_t
as array of longs. This code requires just that the pmd_present
and pmd_trans_huge check are done on the same value, so a barrier
is sufficent.
A similar case is in handle_pte_fault. On ppc44x the word size is
32 bit, but a pte is 64 bit. A barrier is ok as well.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com >
Cc: linux-mm@kvack.org
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
2014-12-18 09:54:37 +01:00
..
2014-10-18 11:53:51 -07:00
2014-10-29 16:33:15 -07:00
2014-10-09 22:26:00 -04:00
2014-01-23 16:36:50 -08:00
2014-10-14 02:18:12 +02:00
2014-10-29 16:33:13 -07:00
2014-10-09 22:25:59 -04:00
2014-10-09 22:26:00 -04:00
2014-04-07 16:36:15 -07:00
2013-03-03 22:46:22 -05:00
2013-11-06 12:40:26 +01:00
2014-10-09 22:26:00 -04:00
2014-06-06 16:08:17 -07:00
2014-06-04 16:54:07 -07:00
2014-12-18 09:54:37 +01:00
2014-08-06 18:01:22 -07:00
2014-10-29 16:33:14 -07:00
2014-08-29 16:28:16 -07:00
2014-10-09 22:25:57 -04:00
2014-08-06 18:01:19 -07:00
2014-10-09 22:25:55 -04:00
2014-10-09 22:25:57 -04:00
2014-10-09 02:39:03 -04:00
2014-10-09 22:26:01 -04:00
2012-01-10 16:30:42 -08:00
2014-10-09 22:25:50 -04:00
2014-06-06 16:08:18 -07:00
2014-06-06 16:08:17 -07:00
2014-10-09 22:26:00 -04:00
2014-04-03 16:21:01 -07:00
2014-08-06 18:01:18 -07:00
2014-10-12 09:21:57 -04:00
2014-09-10 15:42:12 -07:00
2014-10-29 16:33:15 -07:00
2014-10-29 16:33:14 -07:00
2014-09-19 09:16:23 -04:00
2014-12-18 09:54:37 +01:00
2014-10-09 22:26:02 -04:00
2014-06-06 16:08:17 -07:00
2014-10-09 22:26:01 -04:00
2014-04-03 16:21:00 -07:00
2014-10-13 15:44:12 +02:00
2014-01-27 21:02:39 -08:00
2014-10-29 16:33:14 -07:00
2014-02-21 08:50:17 +01:00
2014-09-24 14:07:58 +02:00
2013-10-09 14:47:45 +02:00
2014-10-14 02:18:28 +02:00
2014-10-09 22:26:00 -04:00
2014-07-03 09:21:53 -07:00
2014-09-10 15:42:12 -07:00
2014-09-08 09:51:29 +09:00
2014-10-21 23:44:21 +02:00
2014-10-21 23:44:21 +02:00
2014-10-29 16:33:13 -07:00
2014-06-14 19:30:48 -05:00
2013-09-11 15:57:48 -07:00
2014-10-29 16:33:15 -07:00
2014-10-09 22:25:58 -04:00
2014-09-02 14:46:05 -04:00
2014-09-02 14:46:02 -04:00
2014-10-08 12:01:52 -04:00
2014-08-29 16:28:15 -07:00
2014-05-06 17:32:49 -04:00
2014-08-06 18:01:15 -07:00
2014-12-18 09:54:37 +01:00
2014-10-24 00:14:37 +02:00
2014-10-29 16:33:15 -07:00
2014-10-14 02:18:12 +02:00
2014-10-09 22:25:51 -04:00
2014-10-09 22:25:50 -04:00
2014-10-09 22:25:51 -04:00
2014-01-21 16:19:47 -08:00
2014-04-07 16:35:54 -07:00
2014-10-09 22:25:59 -04:00
2014-10-09 22:25:59 -04:00
2014-08-08 15:57:17 -07:00
2014-10-01 21:49:18 -04:00
2014-10-09 22:25:50 -04:00
2014-06-04 16:53:57 -07:00
2014-10-09 22:25:56 -04:00
2014-02-03 13:24:01 -05:00
2014-10-09 22:25:59 -04:00
2014-10-09 22:26:02 -04:00
2014-04-03 16:21:01 -07:00
2014-10-09 22:26:03 -04:00
2014-08-29 16:28:16 -07:00
2014-10-09 22:26:03 -04:00
2014-08-08 15:57:18 -07:00