]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kcsan: Add example to data_race() kerneldoc header
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 10 May 2024 22:36:57 +0000 (15:36 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 30 May 2024 22:06:26 +0000 (15:06 -0700)
commit020e6c22bd6e67592f38b47d0f1926a831482560
treeb0bd5f516f5ef060840275221286e0881f426c01
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
kcsan: Add example to data_race() kerneldoc header

Although the data_race() kerneldoc header accurately states what it does,
some of the implications and usage patterns are non-obvious.  Therefore,
add a brief locking example and also state how to have KCSAN ignore
accesses while also preventing the compiler from folding, spindling,
or otherwise mutilating the access.

[ paulmck: Apply Bart Van Assche feedback. ]
[ paulmck: Apply feedback from Marco Elver. ]

Reported-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Marco Elver <elver@google.com>
Cc: Breno Leitao <leitao@debian.org>
Cc: Jens Axboe <axboe@kernel.dk>
include/linux/compiler.h
tools/memory-model/Documentation/access-marking.txt