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-10-09 13:08:39 +02:00
2017-08-28 15:17:29 -07:00
2017-06-23 14:17:31 -04:00
2017-08-29 16:10:50 -07:00
2017-10-21 01:33:19 +01:00
2015-07-29 22:44:04 -07:00
2017-08-09 16:57:38 -07:00
2017-09-01 17:42:05 -07:00
2017-09-01 17:42:05 -07:00
2017-08-09 16:57:38 -07:00
2017-08-23 20:37:10 -07:00
2017-09-01 20:33:42 -07:00
2017-08-03 15:35:59 -07:00
2017-08-23 20:37:10 -07:00
2017-08-23 20:37:10 -07:00
2017-08-01 16:09:14 -07:00
2016-06-30 05:03:36 -04:00
2017-10-08 10:12:15 -07:00
2017-08-06 20:51:12 -07:00
2017-08-21 17:06:42 -07:00
2017-10-21 01:33:19 +01:00
2017-09-01 18:38:09 -07:00
2017-09-03 11:01:05 -07:00
2017-10-22 02:03:51 +01:00
2017-07-01 07:39:08 -07:00
2017-09-28 09:39:34 -07:00
2016-11-03 16:10:26 -04:00
2017-09-03 11:01:05 -07:00
2017-10-01 22:30:32 -07:00
2017-10-01 03:55:47 +01:00
2017-08-06 20:51:12 -07:00
2017-08-22 14:27:18 -07:00
2017-09-15 14:27:51 -07:00
2017-06-25 11:42:01 -04:00
2017-09-12 20:45:31 -07:00
2017-09-26 09:58:21 -07:00
2015-04-03 12:11:15 -04:00
2017-06-16 11:48:35 -04:00
2017-06-26 23:13:22 -04:00
2017-08-09 16:57:38 -07:00
2017-10-12 22:57:11 -07:00
2017-06-15 12:12:40 -04:00
2017-02-28 12:49:36 +01:00
2017-07-01 07:39:08 -07:00
2017-08-30 11:20:09 -07:00
2017-03-24 13:17:07 -07:00
2017-08-07 11:39:22 -07:00
2017-08-07 11:39:22 -07:00
2017-10-09 09:39:50 -07:00
2017-10-21 01:33:19 +01:00
2017-07-31 14:37:49 -07:00
2017-07-15 14:43:29 -07:00
2017-08-06 21:25:10 -07:00
2017-08-06 21:25:10 -07:00
2017-09-01 17:42:05 -07:00
2017-08-06 21:25:10 -07:00
2016-12-06 11:34:24 -05:00
2017-09-01 18:38:09 -07:00
2017-08-22 14:16:12 -07:00
2017-08-06 21:25:10 -07:00
2017-08-06 21:25:10 -07:00
2016-11-21 13:20:17 -05:00
2017-08-06 21:25:10 -07:00
2017-10-25 11:01:00 +02:00
2017-10-21 01:33:19 +01:00
2017-05-17 16:06:01 -04:00
2017-05-17 16:06:01 -04:00
2017-08-30 11:20:09 -07:00
2017-08-06 21:25:10 -07:00
2017-07-01 07:39:08 -07:00
2017-09-19 16:16:51 -07:00
2017-07-24 17:28:12 -07:00
2017-06-15 12:12:40 -04:00
2017-07-19 16:14:10 -07:00
2017-08-06 21:25:10 -07:00
2017-08-09 16:28:45 -07:00
2017-08-14 22:17:05 -07:00
2016-11-21 13:20:17 -05:00
2016-05-11 14:43:19 -04:00
2017-08-06 21:25:10 -07:00
2017-08-30 11:20:08 -07:00
2017-08-06 21:25:10 -07:00
2017-09-01 20:22:03 -07:00
2016-07-11 13:27:06 -07:00
2017-08-07 11:39:22 -07:00
2017-05-18 10:23:33 -04:00
2017-10-08 10:12:15 -07:00
2017-07-24 13:52:59 -07:00
2017-10-22 02:03:51 +01:00
2016-11-24 15:32:14 -05:00
2017-02-15 11:04:11 +01:00
2017-06-16 11:48:39 -04:00
2017-04-14 10:07:39 +02:00
2017-04-14 10:07:39 +02:00
2017-04-14 10:06:10 +02:00
2017-08-11 07:03:00 +02:00
2017-02-09 10:22:17 +01:00
2017-01-10 10:57:12 +01:00
2013-05-31 17:19:05 -07:00