Mark Rutland
14cd5d4a01
locking/atomics, net/netlink/netfilter: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE()
...
For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
preference to ACCESS_ONCE(), and new code is expected to use one of the
former. So far, there's been no reason to change most existing uses of
ACCESS_ONCE(), as these aren't currently harmful.
However, for some features it is necessary to instrument reads and
writes separately, which is not possible with ACCESS_ONCE(). This
distinction is critical to correct operation.
It's possible to transform the bulk of kernel code using the Coccinelle
script below. However, this doesn't handle comments, leaving references
to ACCESS_ONCE() instances which have been removed. As a preparatory
step, this patch converts netlink and netfilter code and comments to use
{READ,WRITE}_ONCE() consistently.
----
virtual patch
@ depends on patch @
expression E1, E2;
@@
- ACCESS_ONCE(E1) = E2
+ WRITE_ONCE(E1, E2)
@ depends on patch @
expression E;
@@
- ACCESS_ONCE(E)
+ READ_ONCE(E)
----
Signed-off-by: Mark Rutland <mark.rutland@arm.com >
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com >
Cc: David S. Miller <davem@davemloft.net >
Cc: Florian Westphal <fw@strlen.de >
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Pablo Neira Ayuso <pablo@netfilter.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: linux-arch@vger.kernel.org
Cc: mpe@ellerman.id.au
Cc: shuah@kernel.org
Cc: snitzer@redhat.com
Cc: thor.thayer@linux.intel.com
Cc: tj@kernel.org
Cc: viro@zeniv.linux.org.uk
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1508792849-3115-7-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-10-25 11:00:59 +02:00
..
2017-09-29 12:15:14 +02:00
2017-10-25 11:00:59 +02:00
2017-09-08 18:55:52 +02:00
2017-07-31 19:01:40 +02:00
2017-07-31 19:01:40 +02:00
2017-04-26 09:30:22 +02:00
2017-06-19 19:13:21 +02:00
2017-07-24 13:24:46 +02:00
2017-09-06 14:45:08 -07:00
2017-04-26 09:30:22 +02:00
2017-09-04 13:25:19 +02:00
2017-09-04 13:25:19 +02:00
2017-04-19 17:55:17 +02:00
2016-07-11 12:32:45 +02:00
2017-06-19 19:13:21 +02:00
2017-07-31 19:09:38 +02:00
2017-04-19 17:55:17 +02:00
2017-08-24 18:52:32 +02:00
2017-04-26 09:30:22 +02:00
2017-04-19 17:55:16 +02:00
2017-08-24 18:52:33 +02:00
2017-07-24 13:24:46 +02:00
2017-09-04 13:25:18 +02:00
2017-09-04 13:25:18 +02:00
2017-09-04 13:25:18 +02:00
2017-09-04 13:25:18 +02:00
2017-09-04 13:25:18 +02:00
2017-09-04 13:25:18 +02:00
2017-08-24 18:52:33 +02:00
2017-04-19 17:55:17 +02:00
2017-04-26 09:30:22 +02:00
2017-07-24 13:24:46 +02:00
2017-09-04 13:25:19 +02:00
2017-04-19 17:55:17 +02:00
2017-04-26 09:30:22 +02:00
2017-04-26 09:30:22 +02:00
2017-05-29 11:32:36 +02:00
2017-08-28 18:05:50 +02:00
2016-12-04 20:45:33 +01:00
2016-12-04 20:45:33 +01:00
2017-05-01 11:19:07 +02:00
2017-04-06 22:01:38 +02:00
2017-09-18 17:33:23 +02:00
2017-04-06 22:01:38 +02:00
2017-04-06 22:01:38 +02:00
2014-06-30 11:38:03 +02:00
2016-12-04 20:45:30 +01:00
2017-07-01 09:08:41 -07:00
2015-08-17 21:33:06 -07:00
2017-01-03 14:33:25 +01:00
2017-09-04 13:25:19 +02:00
2014-10-14 02:18:24 +02:00
2017-08-28 17:44:00 +02:00
2017-08-28 18:05:50 +02:00
2017-05-17 16:06:01 -04:00
2017-10-06 14:49:19 +02:00
2017-08-02 14:25:59 +02:00
2016-09-12 19:54:45 +02:00
2017-04-06 18:32:04 +02:00
2017-07-31 20:41:57 +02:00
2017-06-19 19:38:24 +02:00
2017-06-19 19:38:24 +02:00
2017-08-24 18:52:33 +02:00
2017-08-02 14:25:59 +02:00
2017-10-25 11:00:59 +02:00
2017-07-17 13:27:46 +02:00
2017-05-15 12:51:41 +02:00
2016-11-09 23:42:23 +01:00
2017-05-15 12:51:41 +02:00
2017-07-19 11:53:30 +02:00
2017-09-04 13:25:09 +02:00
2017-09-04 13:25:09 +02:00
2016-01-03 21:04:23 +01:00
2017-05-03 10:11:26 -04:00
2017-08-28 17:42:56 +02:00
2016-11-03 11:52:34 +01:00
2017-07-31 19:01:40 +02:00
2017-03-13 13:45:36 +01:00
2016-12-06 21:48:22 +01:00
2017-05-01 10:47:53 -04:00
2017-05-15 12:51:41 +02:00
2017-09-04 13:25:16 +02:00
2017-01-24 21:46:29 +01:00
2017-03-06 18:23:23 +01:00
2017-03-06 18:22:12 +01:00
2017-04-07 18:24:47 +02:00
2017-03-23 16:41:27 -07:00
2017-04-07 18:24:47 +02:00
2017-09-04 13:25:09 +02:00
2017-08-28 17:42:56 +02:00
2017-04-07 18:24:47 +02:00
2017-09-04 13:25:09 +02:00
2017-05-15 12:51:41 +02:00
2017-03-06 18:22:12 +01:00
2017-03-06 18:22:12 +01:00
2017-03-06 18:22:12 +01:00
2017-08-28 18:14:30 +02:00
2017-05-29 12:46:18 +02:00
2017-05-29 12:46:22 +02:00
2017-07-31 20:41:59 +02:00
2017-10-06 15:04:05 +02:00
2017-07-24 13:24:46 +02:00
2017-05-02 10:16:04 -04:00
2017-10-09 15:18:04 +02:00
2017-01-09 17:24:55 +01:00
2017-04-15 11:51:33 +02:00
2016-12-04 21:16:50 +01:00
2017-04-15 11:51:33 +02:00
2017-08-19 13:07:53 +02:00
2017-04-15 11:51:33 +02:00
2016-12-04 21:16:50 +01:00
2017-04-15 11:47:57 +02:00
2017-08-24 18:52:33 +02:00
2016-11-03 10:56:21 +01:00
2016-11-03 10:56:21 +01:00
2014-11-13 12:14:42 +01:00
2017-09-08 18:55:53 +02:00
2016-12-04 21:16:50 +01:00
2017-04-15 11:51:33 +02:00
2016-04-29 14:28:48 +02:00
2016-10-17 17:38:19 +02:00
2017-04-15 11:51:33 +02:00
2014-08-05 18:46:26 -07:00
2017-03-13 19:30:31 +01:00
2016-11-03 10:56:21 +01:00
2015-05-14 13:00:27 +02:00
2016-12-06 21:48:20 +01:00
2017-09-04 13:25:19 +02:00
2017-09-04 13:25:19 +02:00
2016-11-03 10:56:21 +01:00
2016-11-03 10:56:21 +01:00
2016-11-03 10:56:21 +01:00
2017-07-24 13:24:46 +02:00
2017-03-02 08:42:31 +01:00
2016-08-12 00:42:14 +02:00
2017-01-18 20:32:43 +01:00
2016-11-03 10:56:21 +01:00
2017-01-09 17:24:55 +01:00
2017-01-09 17:24:55 +01:00
2017-01-09 17:24:55 +01:00
2017-07-25 12:31:37 -07:00
2016-12-04 21:16:51 +01:00
2014-06-07 11:44:39 -07:00
2017-07-01 09:08:41 -07:00
2016-11-10 13:28:42 +01:00
2017-09-26 20:04:34 +02:00
2017-04-15 11:47:57 +02:00
2017-01-09 17:24:55 +01:00
2017-07-24 13:24:46 +02:00
2015-08-17 21:33:06 -07:00
2016-07-03 10:55:07 +02:00
2017-01-09 17:24:55 +01:00
2016-12-25 17:21:22 +01:00
2017-09-03 17:08:42 -07:00
2016-06-23 13:26:49 +02:00