lkml.org 
[lkml]   [2022]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2] ACPI: APEI: do not add task_work to kernel thread to avoid memory leak
Date
>>
>> - 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
\
 
 \ /
  Last update: 2022-09-26 18:34    [W:0.075 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site