[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANpmjNN0jyK0svOOHSFPAfFV9CAEUVUb+y_748Fww-sgf=3pdg@mail.gmail.com>
Date: Tue, 20 Sep 2022 21:09:42 +0200
From: Marco Elver <elver@...gle.com>
To: andrey.konovalov@...ux.dev
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andrey Konovalov <andreyknvl@...il.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
kasan-dev@...glegroups.com, linux-mm@...ck.org,
Yu Zhao <yuzhao@...gle.com>, linux-kernel@...r.kernel.org,
Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [PATCH mm] kasan: initialize read-write lock in stack ring
On Tue, 20 Sept 2022 at 20:58, <andrey.konovalov@...ux.dev> wrote:
>
> From: Andrey Konovalov <andreyknvl@...gle.com>
>
> Use __RW_LOCK_UNLOCKED to initialize stack_ring.lock.
>
> Reported-by: Yu Zhao <yuzhao@...gle.com>
> Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
>
> ---
>
> Andrew, could you please fold this patch into:
> "kasan: implement stack ring for tag-based modes".
> ---
> mm/kasan/tags.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/mm/kasan/tags.c b/mm/kasan/tags.c
> index 9d867cae1b7b..67a222586846 100644
> --- a/mm/kasan/tags.c
> +++ b/mm/kasan/tags.c
> @@ -36,7 +36,9 @@ DEFINE_STATIC_KEY_TRUE(kasan_flag_stacktrace);
> /* Non-zero, as initial pointer values are 0. */
> #define STACK_RING_BUSY_PTR ((void *)1)
>
> -struct kasan_stack_ring stack_ring;
> +struct kasan_stack_ring stack_ring = {
> + .lock = __RW_LOCK_UNLOCKED(stack_ring.lock)
> +};
Reviewed-by: Marco Elver <elver@...gle.com>
> /* kasan.stacktrace=off/on */
> static int __init early_kasan_flag_stacktrace(char *arg)
> --
> 2.25.1
>
Powered by blists - more mailing lists