linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shuai Xue <xueshuai@linux.alibaba.com>
To: Naoya Horiguchi <naoya.horiguchi@linux.dev>
Cc: linmiaohe@huawei.com, akpm@linux-foundation.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	cuibixuan@linux.alibaba.com, baolin.wang@linux.alibaba.com,
	zhuo.song@linux.alibaba.com,
	Naoya Horiguchi <naoya.horiguchi@nec.com>
Subject: Re: [PATCH] mm,hwpoison: check mm when killing accessing process
Date: Thu, 15 Sep 2022 10:08:37 +0800	[thread overview]
Message-ID: <564a2ac1-9833-9073-b217-85efbdfc2dfb@linux.alibaba.com> (raw)
In-Reply-To: <20220915012626.GA1791458@hori.linux.bs1.fc.nec.co.jp>



在 2022/9/15 AM9:48, Naoya Horiguchi 写道:
> On Wed, Sep 14, 2022 at 02:49:35PM +0800, Shuai Xue wrote:
>> The GHES code calls memory_failure_queue() from IRQ context to queue work
>> into workqueue and schedule it on the current CPU. Then the work is
>> processed in memory_failure_work_func() by kworker and calls
>> memory_failure().
>>
>> When a page is already poisoned, commit a3f5d80ea401 ("mm,hwpoison: send
>> SIGBUS with error virutal address") make memory_failure() call
>> kill_accessing_process() that:
>>
>>     - holds mmap locking of current->mm
>>     - does pagetable walk to find the error virtual address
>>     - and sends SIGBUS to the current process with error info.
>>
>> However, the mm of kworker is not valid. Therefore, check mm when killing
>> accessing process.
>>
>> Fixes: a3f5d80ea401 ("mm,hwpoison: send SIGBUS with error virutal address")
>> Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
> 
> Thank you for the patch, the fix itself makes sense to me.
> I agree with this patch with applying comments from Andrew.
> 
> Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>

Thank you for prompt review.

Cheers,
Shuai


      reply	other threads:[~2022-09-15  2:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  6:49 Shuai Xue
2022-09-14 22:35 ` Andrew Morton
2022-09-15  1:36   ` Shuai Xue
2022-09-15  1:45 ` Miaohe Lin
2022-09-15  2:06   ` Shuai Xue
2022-09-15  1:48 ` Naoya Horiguchi
2022-09-15  2:08   ` Shuai Xue [this message]

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=564a2ac1-9833-9073-b217-85efbdfc2dfb@linux.alibaba.com \
    --to=xueshuai@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=cuibixuan@linux.alibaba.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@linux.dev \
    --cc=naoya.horiguchi@nec.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