[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250802055252.GU222315@ZenIV>
Date: Sat, 2 Aug 2025 06:52:52 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: 高翔 <gaoxiang17@...omi.com>
Cc: Xiang Gao <gxxa03070307@...il.com>,
"brauner@...nel.org" <brauner@...nel.org>,
"oleg@...hat.com" <oleg@...hat.com>,
"mjguzik@...il.com" <mjguzik@...il.com>,
"Liam.Howlett@...cle.com" <Liam.Howlett@...cle.com>,
"joel.granados@...nel.org" <joel.granados@...nel.org>,
"lorenzo.stoakes@...cle.com" <lorenzo.stoakes@...cle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: 答复: [External Mail]Re:
[PATCH] pid: Add a judgment for ns null in pid_nr_ns
On Sat, Aug 02, 2025 at 04:32:39AM +0000, 高翔 wrote:
> > __task_pid_nr_ns+0x74/0xd0
> > ...
> > __handle_irq_event_percpu+0xd4/0x284
> > handle_irq_event+0x48/0xb0
>
> Huh? Just what is it doing inside an IRQ handler?
> Hell, the notion of current process is not usable in those,
> let alone any properties of such...
>
> Details, please.
>
>
> Obtain the current process pid in the ufs compl command. This scene is possible.
Nothing of that sort in the mainline (or -next, for that matter), but...
> Call trace:
> __task_pid_nr_ns+0x74/0xd0
> get_common_info+0x9c/0x1c0 [io_xxx 39b55c95a0fe9416f7d7be396be0fd1d6f590f17]
> io_monitor_global_log+0x1a0/0x294 [io_xxx 39b55c95a0fe9416f7d7be396be0fd1d6f590f17]
> cb_android_vh_ufs_compl_command+0x304/0x578 [io_xxx 39b55c95a0fe9416f7d7be396be0fd1d6f590f17]
> __traceiter_android_vh_ufs_compl_command+0x54/0x78
> ...
> __handle_irq_event_percpu+0xd4/0x284
... for asynchronous callbacks if that sort there is no such thing as the current
process. At all. Using current, let alone looking for its PID, userns, etc. in
such context is a bug. Don't do it. It's a bug in your module.
Powered by blists - more mailing lists