From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F69DC433DB for ; Wed, 20 Jan 2021 06:07:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0F739217BA for ; Wed, 20 Jan 2021 06:07:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F739217BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kingsoft.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0CAD96B0005; Wed, 20 Jan 2021 01:07:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 07BDF6B0006; Wed, 20 Jan 2021 01:07:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EAD1C6B0007; Wed, 20 Jan 2021 01:07:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id CDEF36B0005 for ; Wed, 20 Jan 2021 01:07:50 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8DBBC364B for ; Wed, 20 Jan 2021 06:07:50 +0000 (UTC) X-FDA: 77725122300.22.dock59_4b0182b27558 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 66F5218038E60 for ; Wed, 20 Jan 2021 06:07:50 +0000 (UTC) X-HE-Tag: dock59_4b0182b27558 X-Filterd-Recvd-Size: 4981 Received: from mail.kingsoft.com (mail.kingsoft.com [114.255.44.145]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Wed, 20 Jan 2021 06:07:46 +0000 (UTC) X-AuditID: 0a580157-f21ff7000005df43-0f-6007c35a788a Received: from mail.kingsoft.com (localhost [10.88.1.32]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.kingsoft.com (SMG-1-NODE-87) with SMTP id B2.93.57155.A53C7006; Wed, 20 Jan 2021 13:44:58 +0800 (HKT) Received: from aili-OptiPlex-7020 (172.16.253.254) by KSBJMAIL2.kingsoft.cn (10.88.1.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 20 Jan 2021 14:07:29 +0800 Date: Wed, 20 Jan 2021 14:07:29 +0800 From: Aili Yao To: "HORIGUCHI =?UTF-8?B?TkFPWUE=?=(=?UTF-8?B?5aCA5Y+j44CA55u05Lmf?=)" CC: "linux-mm@kvack.org" , "osalvador@suse.de" , "YANGFENG1@kingsoft.com" Subject: Re: [PATCH v2] mm,hwpoison:Differentiate Action Required error in current and non current process Message-ID: <20210120140729.66d6cab5.yaoaili@kingsoft.com> In-Reply-To: <20210120000614.GA22376@hori.linux.bs1.fc.nec.co.jp> References: <20210119120956.7f901b76.yaoaili@kingsoft.com> <20210120000614.GA22376@hori.linux.bs1.fc.nec.co.jp> Organization: Kingsoft X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.16.253.254] X-ClientProxiedBy: KSBJMAIL1.kingsoft.cn (10.88.1.31) To KSBJMAIL2.kingsoft.cn (10.88.1.32) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrILMWRmVeSWpSXmKPExsXCFcGooBt1mD3B4FCLpsW9Nf9ZLS42HmC0 ODOtyIHZY9OnSeweL65uZPHYfLo6gDmKyyYlNSezLLVI3y6BK+P8uQ8sBRsEKy53NDA3MO7h 7WLk5JAQMJFY+XoXWxcjF4eQwHQmiTX3trFCOC8YJW7tvMYOUsUioCpxdvJ8VhCbDcjedW8W mC0ikCSxePZXJhCbWaCbUWLBSzkQW1ggR2Lu0W1gNbwCVhJHTz9hBrE5BRwllj7/DjSTA2hB ocSXZ4EgJr+AmMSrBmOIe+wlnv89ywzRKShxcuYTFojpmhKt23+zQ9jaEssWvgarERJQlDi8 5Bc7RK+SxJHuGWwQdqzEsnmvWCcwCs9CMmoWklGzkIxawMi8ipGlODfdcBMjJJTDdzDOa/qo d4iRiYPxEKMEB7OSCG/TX7YEId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rz6zkApgfTEktTs1NSC 1CKYLBMHp1QDU88aXWNfgYUO5yZ9d13C/8/xxZlcl5RzS+u62BvmZkVeKnHIePSyo/0l4zmX gh9Z+wvkJuVGtfGXqzsJvnj8JWWBxnJtN/4CnrNse6+tW6V7vOGZ/r+vohOYs7+9PHRz4WYe Kd5pmydP1HKWuz6xia+F7dj2vKzXJwr3Tu55u/Rjfc3/e09PyRyxLT2tu/Hx97lpAtGeKc+c 5HYfMghb7CGxPp/ruofxhW5F560rdrgoJol7/li4qU4rbu75tW585ydF3JLgrVk944UV+5HY LTqPFqUq/VC99Oxehs1vXSsTj02XTgek20r4FUascWd58L0q53eX8bdFPzx2avgo9xdHTX3j eOj72b1tzOxn/yqxFGckGmoxFxUnAgC30KMa1AIAAA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000042, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 20 Jan 2021 00:06:14 +0000 HORIGUCHI NAOYA(=E5=A0=80=E5=8F=A3=E3=80=80=E7=9B=B4=E4=B9=9F) wrote: > You don't have to add these header info into patch description because > git can get them from email headers. > # scripts/checkpatch.pl shows some warning due to these. yes, i will change this. Thanks. > > if (fail || tk->addr =3D=3D -EFAULT) { > > - pr_err("Memory failure: %#lx: forcibly killing %s:%d because of fa= ilure to unmap corrupted page\n", > > - pfn, tk->tsk->comm, tk->tsk->pid); > > - do_send_sig_info(SIGKILL, SEND_SIG_PRIV, > > + if (tk->tsk =3D=3D current) { > > + pr_err("Memory failure: %#lx: forcibly killing %s:%d because of f= ailure to unmap corrupted page\n", > > + pfn, tk->tsk->comm, tk->tsk->pid); > > + do_send_sig_info(SIGKILL, SEND_SIG_PRIV, > > tk->tsk, PIDTYPE_PID); > > + } else if (kill_proc(tk, pfn, flags) < 0) > > + pr_err("Memory failure: %#lx: Cannot send advisory machine check = signal to %s:%d\n", > > + pfn, tk->tsk->comm, tk->tsk->pid); =20 >=20 > This seems to change (maybe beyond the intent of this patch) the behavior= of > action optional events, i.e. without this patch all processes on to_kill = list > receive SIGKILL. but with patch SIGKILL is sent only to current (if it > happens to be linked to to_kill list) and any other processes on the list > receive SIGBUSs. Any justification on this change? >=20 > This code path is for failure in error handling, where we can't do anythi= ng > more. So I think that just killing all affected processes with SIGKILL as > we do now is the expected behavior. you are right, I have some misunderstanding here, we need to keep the origi= nal code. Thanks for correction > > /* > > @@ -457,8 +464,6 @@ static struct task_struct *task_early_kill(struct t= ask_struct *tsk, > > */ > > if (tsk->mm =3D=3D current->mm) > > return current; > > - else > > - return NULL; =20 >=20 > Please update the comment above this function about action required case. yes, I will add some comments here! I will submit a v3 patch. Thank you! --=20 Best Regards! Aili Yao