From: Al Viro <viro@zeniv.linux.org.uk>
To: 高翔 <gaoxiang17@xiaomi.com>
Cc: Xiang Gao <gxxa03070307@gmail.com>,
"brauner@kernel.org" <brauner@kernel.org>,
"oleg@redhat.com" <oleg@redhat.com>,
"mjguzik@gmail.com" <mjguzik@gmail.com>,
"Liam.Howlett@oracle.com" <Liam.Howlett@oracle.com>,
"joel.granados@kernel.org" <joel.granados@kernel.org>,
"lorenzo.stoakes@oracle.com" <lorenzo.stoakes@oracle.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 答复: [External Mail]Re: [PATCH] pid: Add a judgment for ns null in pid_nr_ns
Date: Sat, 2 Aug 2025 06:52:52 +0100 [thread overview]
Message-ID: <20250802055252.GU222315@ZenIV> (raw)
In-Reply-To: <15b18541f37447dd8d5dbd8012662f67@xiaomi.com>
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.
next prev parent reply other threads:[~2025-08-02 5:52 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-02 2:21 [PATCH] pid: Add a judgment for ns null in pid_nr_ns Xiang Gao
2025-08-02 2:25 ` Al Viro
2025-08-02 8:43 ` Oleg Nesterov
[not found] ` <15b18541f37447dd8d5dbd8012662f67@xiaomi.com>
2025-08-02 5:52 ` Al Viro [this message]
2025-08-02 5:54 ` 答复: [External Mail]Re: " Al Viro
[not found] ` <c7968242db914979953277226fe55fc8@xiaomi.com>
2025-08-02 8:04 ` 答复: " Al Viro
2025-08-02 8:45 ` Oleg Nesterov
[not found] ` <80be47cb31d14ffc9f9a7d8d4408ab0a@xiaomi.com>
2025-08-04 11:49 ` Oleg Nesterov
2025-08-04 12:14 ` Christian Brauner
2025-08-04 12:44 ` Oleg Nesterov
2025-08-05 12:43 ` Oleg Nesterov
2025-08-08 14:56 ` Christian Brauner
2025-08-10 15:42 ` Oleg Nesterov
[not found] ` <aa5272ddcec944e2a35ca7104f6a86bf@xiaomi.com>
2025-08-05 19:43 ` 答复: [External Mail]Re: " Oleg Nesterov
2025-08-08 14:54 ` Christian Brauner
2025-08-10 17:36 ` [PATCH 1/4] pid: make __task_pid_nr_ns(ns => NULL) safe for zombie callers Oleg Nesterov
2025-08-10 17:36 ` [PATCH 2/4] pid: introduce task_ppid_vnr() Oleg Nesterov
2025-08-10 17:36 ` [PATCH 3/4] pid: change bacct_add_tsk() to use task_ppid_nr_ns() Oleg Nesterov
2025-08-10 17:36 ` [PATCH 4/4] pid: change task_state() " Oleg Nesterov
2025-08-19 11:40 ` [PATCH] pid: Add a judgment for ns null in pid_nr_ns Christian Brauner
2025-08-19 14:25 ` Oleg Nesterov
2025-09-01 15:30 ` Oleg Nesterov
2025-09-01 15:44 ` Mateusz Guzik
2025-09-01 15:55 ` Mateusz Guzik
2025-09-02 14:37 ` Oleg Nesterov
2026-01-04 7:25 ` Qing Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250802055252.GU222315@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=Liam.Howlett@oracle.com \
--cc=brauner@kernel.org \
--cc=gaoxiang17@xiaomi.com \
--cc=gxxa03070307@gmail.com \
--cc=joel.granados@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mjguzik@gmail.com \
--cc=oleg@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox