Mark Rutland
a9da6f29ba
locking/atomics, net/ipv4/tcp_input.c: 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 the IPv4 TCP input 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: Linus Torvalds <torvalds@linux-foundation.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-8-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-25 11:01:00 +02:00
..
2017-04-12 22:02:40 +02:00
2017-09-04 19:05:16 -04:00
2017-06-20 13:30:14 -04:00
2017-10-04 18:16:48 -07:00
2017-06-16 11:48:40 -04:00
2017-08-09 22:43:50 -07:00
2017-07-04 22:35:19 +01:00
2017-08-09 16:28:45 -07:00
2017-09-28 13:20:32 -07:00
2017-05-02 11:46:28 -04:00
2017-10-22 01:46:32 +01:00
2017-07-01 07:39:08 -07:00
2017-10-19 13:05:54 +02:00
2017-09-19 20:34:29 +02:00
2017-10-22 02:14:18 +01:00
2017-08-09 16:57:38 -07:00
2017-10-21 01:33:19 +01:00
2017-09-03 17:08:42 -07:00
2017-10-18 09:12:40 +01:00
2017-09-28 10:12:53 -07:00
2017-06-16 11:48:40 -04:00
2017-08-22 13:40:23 -07:00
2017-09-05 20:03:35 -07:00
2017-02-03 15:16:45 -05:00
2017-10-25 11:01:00 +02:00
2017-10-22 03:22:24 +01:00
2017-07-04 22:35:17 +01:00
2017-07-03 02:31:22 -07:00
2017-09-01 17:42:05 -07:00
2017-08-15 20:23:23 -07:00
2017-10-14 18:38:56 -07:00
2017-07-04 22:35:16 +01:00
2017-07-04 22:35:15 +01:00
2017-10-16 13:02:03 +02:00
2017-06-07 15:53:24 -04:00
2017-08-09 16:57:38 -07:00
2017-10-21 01:56:38 +01:00
2017-10-25 11:00:59 +02:00
2017-04-13 13:58:22 -04:00
2017-10-18 12:22:28 +01:00
2017-07-04 22:35:17 +01:00
2017-06-23 00:38:31 +02:00
2017-08-29 15:16:52 -07:00
2017-09-12 20:37:31 -07:00
2017-10-21 01:51:34 +01:00
2017-08-09 16:57:38 -07:00
2017-06-16 11:48:39 -04:00
2017-08-09 16:57:38 -07:00
2017-09-07 20:07:13 -07:00
2017-06-13 11:07:51 +02:00
2017-03-09 18:23:27 -08:00
2017-10-22 03:05:39 +01:00
2017-10-16 21:18:59 +01:00
2017-10-20 12:53:45 +01:00
2017-09-21 15:31:03 -07:00
2017-08-24 21:57:50 -07:00
2017-10-01 18:51:30 -04:00
2017-08-07 14:48:48 -07:00
2017-10-08 21:13:23 -07:00
2017-09-14 09:55:21 -07:00
2017-08-21 17:06:42 -07:00
2017-10-21 02:21:08 +01:00
2017-10-04 14:39:21 +02:00
2017-08-03 09:13:51 -07:00
2017-09-28 09:39:05 +02:00
2017-09-20 15:36:18 -07:00
2017-09-04 13:25:20 +02:00
2017-08-29 15:16:52 -07:00
2017-08-16 11:27:52 -07:00
2017-04-16 23:42:49 -05:00