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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 9D016C433DF for ; Mon, 8 Jun 2020 22:18:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 688B3206D5 for ; Mon, 8 Jun 2020 22:18:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 688B3206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EFDF56B0002; Mon, 8 Jun 2020 18:18:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EAE676B0005; Mon, 8 Jun 2020 18:18:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC3F36B0006; Mon, 8 Jun 2020 18:18:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id C238A6B0002 for ; Mon, 8 Jun 2020 18:18:06 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 7EB285CAB8 for ; Mon, 8 Jun 2020 22:18:06 +0000 (UTC) X-FDA: 76907458572.11.sheep49_4d00a3226dbd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 57329180FA281 for ; Mon, 8 Jun 2020 22:18:06 +0000 (UTC) X-HE-Tag: sheep49_4d00a3226dbd X-Filterd-Recvd-Size: 2632 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Mon, 8 Jun 2020 22:18:04 +0000 (UTC) IronPort-SDR: v+ZOCG0eHvu0SKjhKH6JmWjAZ94I1W2weQgBzCSWN7POJlU9ukoReGCQOK2h/34fQdkQ5rQVNt Yv7C887zQGKQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2020 15:18:01 -0700 IronPort-SDR: hbvbaEQmEUlwiQzj2NJNCnKnh5+ZjiUf6yUinAF2h8Lr1ZjBoW8WyJWaqRLdAAmv5P/NQRYoHS pIDqUaAyItRw== X-IronPort-AV: E=Sophos;i="5.73,489,1583222400"; d="scan'208";a="472756189" Received: from agluck-desk2.sc.intel.com (HELO agluck-desk2.amr.corp.intel.com) ([10.3.52.68]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2020 15:18:00 -0700 Date: Mon, 8 Jun 2020 15:17:59 -0700 From: "Luck, Tony" To: Naoya Horiguchi Cc: Andrew Morton , linux-mm@kvack.org Subject: Re: [PATCH v1 2/2] mm/memory-failure: send SIGBUS(BUS_MCEERR_AR) only to current thread Message-ID: <20200608221759.GA778@agluck-desk2.amr.corp.intel.com> References: <1591321039-22141-1-git-send-email-naoya.horiguchi@nec.com> <1591321039-22141-3-git-send-email-naoya.horiguchi@nec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1591321039-22141-3-git-send-email-naoya.horiguchi@nec.com> X-Rspamd-Queue-Id: 57329180FA281 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jun 05, 2020 at 10:37:19AM +0900, Naoya Horiguchi wrote: > Action Required memory error should happen only when a processor is > about to access to a corrupted memory, so it's synchronous and only > affects current process/thread. Recently commit 872e9a205c84 ("mm, > memory_failure: don't send BUS_MCEERR_AO for action required error") > fixed the issue that Action Required memory could unnecessarily send > SIGBUS to the processes which share the error memory. But we still have > another issue that we could send SIGBUS to a wrong thread. > > This is because collect_procs() and task_early_kill() fails to add the > current process to "to-kill" list. So this patch is suggesting to fix > it. With this fix, SIGBUS(BUS_MCEERR_AR) is never sent to non-current > process/thread. Does the new code now send SIGBUS(BUS_MCEERR_AO) to all the other threads of a multi-threaded process? It looks like it might (and I don't have some handy multi-threaded test case to try it out). If it does, is that what we want? -Tony