Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8991960ybi; Tue, 23 Jul 2019 19:37:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYZeENySPnqXyfgM6cKTeico3+YXGKhWGkxzR7/shijjLjBKCm2Zagq7o27umaW0qxQxT4 X-Received: by 2002:a65:5c4b:: with SMTP id v11mr36356953pgr.62.1563935822295; Tue, 23 Jul 2019 19:37:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563935822; cv=none; d=google.com; s=arc-20160816; b=U19FFW8SUSpABrELmgSHQ6maTHg83mI43HQKeKBkp+YsBZRF0BhIRlZ+76jXSW6+/l u4Um+FmZ4oY88znUzVdWlK9b9xoIy8wz8MQpFG343lj0gxVlsXPRjx+PwMdaavRLL++T vHwodh/hOLo2y6vexSzL5i8V6M2zbL7kd2Yt8XNIY1E6qaOtv4Sft64J48rxoBX0Ar0E eMO6RHB94FbaIQYkCmCZrzAiDz4ufr1oXs4DvhzO7lcfpIsJnzuNs7I0rfDSc9GMXONI w4IIT/lf3hEIerP3t1lKeVhGRk++l5w99sxxV8Xdi6YVasbPPsHBp+2HcWsRWsg3CIZa ylEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AFwPz9F7BR2KO7EHQe4D2tuUr0dHyiHUKqAqUScb/5k=; b=0W35EZ2AtlX7YORPJyLfmz62SkHzxmQX67tsoBESesr2uqLvZLdpXl5YruCcM3zfDz Gmk1GQskVGhGGmYGiBKOvnfoTrVSRzrGdBcQf/dLl8tZIVEPIjQZ4Vy8U3FTBfmxEFQ3 Pbs2irXwVNZxq/tUnX3KcPxlB4iyPURU3fF5iMZsO4w0MAN1mpfGVUHWhbsiibPch/YQ +18/yIQitZuloxycnByGCpS5lQbx0tzWzYbaBvBOgkgLI/WhUk2AlQjq7FRxU+9bPg67 z3n4NOEZP5Ia0oiwIXbU+ADYT2clFIyG7FnGddgZKAJvuzjpaGypbc2UfNJFHbvpsUCO Pjwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=RULrgcX4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z197si12950814pgz.267.2019.07.23.19.36.48; Tue, 23 Jul 2019 19:37:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=RULrgcX4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728354AbfGXBio (ORCPT + 99 others); Tue, 23 Jul 2019 21:38:44 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57932 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727363AbfGXBio (ORCPT ); Tue, 23 Jul 2019 21:38:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AFwPz9F7BR2KO7EHQe4D2tuUr0dHyiHUKqAqUScb/5k=; b=RULrgcX43IxPsdqZAr6lzCNtc zncXOGdm5at73wpugQrjVm/0D5jAFMwnWKMKvNEA4wlnwbE6pgoawegICLrGsEQBv3zxPp/3b/kuy irE/ozw1NZOQwzdR1gpTm0V1AtY6m0TW83pVr89t+9aWKmjX7SJCi7nfKmLroTQsKWOB+LVwEItZC qlFd1a/r5p9/fZ+bovKzNcmCrBIXwIgFiTVdaetrzDdeLU1VPV7tJXwY4XA7Gr5jj19De7QnjImV2 +emEkD2xFmY7RB4rzv8jQmLp24bAE5Y8MPNZ8EYASJsS1q40hA7KT+nJarwSVQNPfOCF6U0kNje1W SSuCf5tTg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hq6Eq-0008Ul-UO; Wed, 24 Jul 2019 01:38:40 +0000 Date: Tue, 23 Jul 2019 18:38:40 -0700 From: Matthew Wilcox To: Jane Chu Cc: n-horiguchi@ah.jp.nec.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org Subject: Re: [PATCH] mm/memory-failure: Poison read receives SIGKILL instead of SIGBUS if mmaped more than once Message-ID: <20190724013840.GS363@bombadil.infradead.org> References: <1563925110-19359-1-git-send-email-jane.chu@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1563925110-19359-1-git-send-email-jane.chu@oracle.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 23, 2019 at 05:38:30PM -0600, Jane Chu wrote: > @@ -331,16 +330,21 @@ static void add_to_kill(struct task_struct *tsk, struct page *p, > tk->size_shift = compound_order(compound_head(p)) + PAGE_SHIFT; > > /* > - * In theory we don't have to kill when the page was > - * munmaped. But it could be also a mremap. Since that's > - * likely very rare kill anyways just out of paranoia, but use > - * a SIGKILL because the error is not contained anymore. > + * Indeed a page could be mmapped N times within a process. And it's possible You should run this patch through checkpatch.pl so I don't have to tell you whats wrong with the trivial aspects of it ;-)