From: "Luck, Tony" <tony.luck@intel.com>
To: Shuai Xue <xueshuai@linux.alibaba.com>,
"Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Len Brown" <lenb@kernel.org>,
"James Morse" <james.morse@arm.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Jarkko Sakkinen" <jarkko@kernel.org>,
"HORIGUCHI NAOYA(堀口 直也)" <naoya.horiguchi@nec.com>,
"linmiaohe@huawei.com" <linmiaohe@huawei.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
Stable <stable@vger.kernel.org>,
"ACPI Devel Maling List" <linux-acpi@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"cuibixuan@linux.alibaba.com" <cuibixuan@linux.alibaba.com>,
"baolin.wang@linux.alibaba.com" <baolin.wang@linux.alibaba.com>,
"zhuo.song@linux.alibaba.com" <zhuo.song@linux.alibaba.com>
Subject: RE: [PATCH v2] ACPI: APEI: do not add task_work to kernel thread to avoid memory leak
Date: Mon, 26 Sep 2022 15:20:38 +0000 [thread overview]
Message-ID: <SJ1PR11MB6083FC6B8D64933C573CAB64FC529@SJ1PR11MB6083.namprd11.prod.outlook.com> (raw)
In-Reply-To: <f0735218-7730-c275-8cee-38df9bec427d@linux.alibaba.com>
>>
>> - if (task_work_pending && current->mm != &init_mm) {
>> + if (task_work_pending && current->mm) {
>> estatus_node->task_work.func = ghes_kick_task_work;
>> estatus_node->task_work_cpu = smp_processor_id();
>> ret = task_work_add(current, &estatus_node->task_work,
It seems that you are getting errors reported while running kernel threads. This fix avoids
pointlessly adding "task_work" that will never be processed because kernel threads never
return to user mode.
But maybe something else needs to be done? The code was, and with this fix still is,
taking no action for the error. That doesn't seem right.
Are you injecting errors to create this scenario? What does your test do?
-Tony
next prev parent reply other threads:[~2022-09-26 16:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220916050535.26625-1-xueshuai@linux.alibaba.com>
2022-09-24 7:49 ` [PATCH v2] ACPI: APEI: do not add task_work to kernel thread to avoid memory leak Shuai Xue
2022-09-24 7:50 ` kernel test robot
2022-09-24 17:17 ` Rafael J. Wysocki
2022-09-26 11:35 ` Shuai Xue
2022-09-26 15:20 ` Luck, Tony [this message]
2022-09-27 3:50 ` Shuai Xue
2022-09-27 17:47 ` Luck, Tony
2022-09-29 2:33 ` Shuai Xue
2022-09-29 20:52 ` Luck, Tony
2022-09-30 2:52 ` Shuai Xue
2022-09-30 15:52 ` Luck, Tony
2022-10-04 14:07 ` Rafael J. Wysocki
2022-10-13 7:05 ` Shuai Xue
2022-10-13 17:18 ` Luck, Tony
2022-10-14 13:23 ` Shuai Xue
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=SJ1PR11MB6083FC6B8D64933C573CAB64FC529@SJ1PR11MB6083.namprd11.prod.outlook.com \
--to=tony.luck@intel.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=bp@alien8.de \
--cc=cuibixuan@linux.alibaba.com \
--cc=dave.hansen@linux.intel.com \
--cc=james.morse@arm.com \
--cc=jarkko@kernel.org \
--cc=lenb@kernel.org \
--cc=linmiaohe@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=naoya.horiguchi@nec.com \
--cc=rafael@kernel.org \
--cc=stable@vger.kernel.org \
--cc=xueshuai@linux.alibaba.com \
--cc=zhuo.song@linux.alibaba.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;
as well as URLs for NNTP newsgroup(s).