Files
rockchip-kernel/arch/arm
Linus Walleij 2c932d5c7a ARM: 9431/1: mm: Pair atomic_set_release() with _read_acquire()
commit 93ee385254d53849c01dd8ab9bc9d02790ee7f0e upstream.

The code for syncing vmalloc memory PGD pointers is using
atomic_read() in pair with atomic_set_release() but the
proper pairing is atomic_read_acquire() paired with
atomic_set_release().

This is done to clearly instruct the compiler to not
reorder the memcpy() or similar calls inside the section
so that we do not observe changes to init_mm. memcpy()
calls should be identified by the compiler as having
unpredictable side effects, but let's try to be on the
safe side.

Cc: stable@vger.kernel.org
Fixes: d31e23aff0 ("ARM: mm: make vmalloc_seq handling SMP safe")
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-09 10:33:06 +01:00
..
2023-07-21 10:01:47 -07:00
2023-08-12 10:30:59 +02:00
2023-07-19 06:29:04 +00:00
2023-08-12 10:30:59 +02:00
2023-08-12 10:31:00 +02:00
2023-08-12 10:31:00 +02:00
2023-08-12 10:30:59 +02:00
2024-06-12 11:12:32 +02:00
2024-06-12 11:12:32 +02:00