Andrey Konovalov f16de0bcdb kasan: test: avoid corrupting memory in kasan_rcu_uaf
kasan_rcu_uaf() writes to freed memory via kasan_rcu_reclaim(), which is
only safe with the GENERIC mode (as it uses quarantine).  For other modes,
this test corrupts kernel memory, which might result in a crash.

Turn the write into a read.

Link: https://lkml.kernel.org/r/b6f2c3bf712d2457c783fa59498225b66a634f62.1628779805.git.andreyknvl@gmail.com
Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-09-03 09:58:15 -07:00
..
2021-07-08 11:48:20 -07:00
2020-08-09 14:10:26 -07:00
2021-07-01 11:06:05 -07:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2021-05-06 19:24:12 -07:00
2021-07-05 11:48:14 -07:00
2018-08-16 12:14:42 -07:00
2021-01-21 14:06:00 -07:00
2021-06-05 08:58:12 -07:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2021-01-03 20:05:18 -05:00
2020-10-20 14:39:37 -07:00
2021-02-26 09:41:05 -08:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2018-10-16 13:45:44 +02:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2021-08-08 13:00:20 +01:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2019-07-11 15:17:41 -07:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2021-07-01 11:06:05 -07:00
2021-06-18 11:43:09 +02:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:20 -07:00
2018-10-15 16:31:29 -04:00
2021-09-03 09:58:15 -07:00
2021-07-08 11:48:20 -07:00
2021-06-29 12:07:18 -07:00
2021-07-08 11:48:20 -07:00
2021-02-26 09:41:05 -08:00
2021-02-26 09:41:05 -08:00