[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190517143746.2157a759f65b4cbc73321124@linux-foundation.org>
Date: Fri, 17 May 2019 14:37:46 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Dmitry Vyukov <dvyukov@...il.com>
Cc: catalin.marinas@....com, Dmitry Vyukov <dvyukov@...gle.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kmemleak: fix check for softirq context
On Fri, 17 May 2019 19:15:07 +0200 Dmitry Vyukov <dvyukov@...il.com> wrote:
> From: Dmitry Vyukov <dvyukov@...gle.com>
>
> in_softirq() is a wrong predicate to check if we are in a softirq context.
> It also returns true if we have BH disabled, so objects are falsely
> stamped with "softirq" comm. The correct predicate is in_serving_softirq().
>
> ...
>
> --- a/mm/kmemleak.c
> +++ b/mm/kmemleak.c
> @@ -588,7 +588,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
> if (in_irq()) {
> object->pid = 0;
> strncpy(object->comm, "hardirq", sizeof(object->comm));
> - } else if (in_softirq()) {
> + } else if (in_serving_softirq()) {
> object->pid = 0;
> strncpy(object->comm, "softirq", sizeof(object->comm));
> } else {
What are the user-visible runtime effects of this change?
Powered by blists - more mailing lists