[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230725-hemmschwelle-braten-481527898001@brauner>
Date: Tue, 25 Jul 2023 10:26:19 +0200
From: Christian Brauner <brauner@...nel.org>
To: Xuewen Yan <xuewen.yan@...soc.com>
Cc: jack@...e.cz, keescook@...omium.org, peterz@...radead.org,
vincent.guittot@...aro.org, linux-kernel@...r.kernel.org,
di.shen@...soc.com
Subject: Re: [PATCH] pid: Add the judgment of whether ns is NULL in the
find_pid_ns
On Thu, Jul 13, 2023 at 03:17:13PM +0800, Xuewen Yan wrote:
> There is no the judgment of whether namspace is NULL in find_pid_ns.
> But there is a corner case when ns is null, for example: if user
> call find_get_pid when current is in exiting, the following stack would
> set thread_id be null:
> release_task
> __exit_signal(p);
> __unhash_process(tsk, group_dead);
> detach_pid(p, PIDTYPE_PID);
> __change_pid(task, type, NULL);
>
> If user call find_get_pid at now, in find_vpid function, the
I fail to see how this can happen. The code you're referencing is in
release_task(). If current has gone through that then current obviously
can't call find_vpid() on itself anymore or anything else for that
matter.
Powered by blists - more mailing lists