[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161020100234.GD23600@e104818-lin.cambridge.arm.com>
Date: Thu, 20 Oct 2016 11:02:34 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andy Lutomirski <luto@...nel.org>,
CAI Qian <caiqian@...hat.com>
Subject: Re: [PATCH] mm: kmemleak: Ensure that the task stack is not freed
during scanning
Hi Andrew,
On Wed, Oct 19, 2016 at 11:33:27AM -0700, Andrew Morton wrote:
> On Wed, 12 Oct 2016 10:57:03 +0100 Catalin Marinas <catalin.marinas@....com> wrote:
> > Commit 68f24b08ee89 ("sched/core: Free the stack early if
> > CONFIG_THREAD_INFO_IN_TASK") may cause the task->stack to be freed
> > during kmemleak_scan() execution, leading to either a NULL pointer
> > fault (if task->stack is NULL) or kmemleak accessing already freed
> > memory. This patch uses the new try_get_task_stack() API to ensure that
> > the task stack is not freed during kmemleak stack scanning.
> >
> > Fixes: 68f24b08ee89 ("sched/core: Free the stack early if CONFIG_THREAD_INFO_IN_TASK")
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Cc: Andy Lutomirski <luto@...nel.org>
> > Cc: CAI Qian <caiqian@...hat.com>
> > Reported-by: CAI Qian <caiqian@...hat.com>
> > Signed-off-by: Catalin Marinas <catalin.marinas@....com>
>
> I'll add
>
> Cc: <stable@...r.kernel.org> [4.8.x]
This should be 4.9.x. The commit that introduces try_get_task_stack()
was merged in 4.9-rc1: c6c314a613cd ("sched/core: Add
try_get_task_stack() and put_task_stack()").
--
Catalin
Powered by blists - more mailing lists