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.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS 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 CDDEFC2B9F4 for ; Tue, 15 Jun 2021 02:35:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6290861059 for ; Tue, 15 Jun 2021 02:35:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6290861059 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D8A0B6B0036; Mon, 14 Jun 2021 22:35:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D39B56B006E; Mon, 14 Jun 2021 22:35:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB36C6B0070; Mon, 14 Jun 2021 22:35:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id 87AD56B0036 for ; Mon, 14 Jun 2021 22:35:32 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 13D72BBEA for ; Tue, 15 Jun 2021 02:35:32 +0000 (UTC) X-FDA: 78254392104.03.EC53638 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf09.hostedemail.com (Postfix) with ESMTP id 8D3D76000141 for ; Tue, 15 Jun 2021 02:35:26 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id E754361059; Tue, 15 Jun 2021 02:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1623724529; bh=ykYRpc0CV7DgEx3OtSOvofUtiEcwitO1lY/EJxif8eo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Z1PJwc+3YHQf2rpNJVsokoX+XM9sNUo/ZbLSK92EbJpErU18Qkpa+rN8dc333CYAb i7ZhIx9JJuaPECUtSYcsFauctPFdTFcRK9xzfhDls1KKLwQlo2TeY793mb72FjLFi0 7wZ9n3o2amA6ZLOQVPnT1X8kh1NcHAOX+5w3KRvY= Date: Mon, 14 Jun 2021 19:35:28 -0700 From: Andrew Morton To: HORIGUCHI =?UTF-8?B?TkFPWUE=?=(=?UTF-8?B?5aCA5Y+j44CA55u05Lmf?=) Cc: Naoya Horiguchi , "linux-mm@kvack.org" , Linus Torvalds , Oscar Salvador , Michal Hocko , Tony Luck , "Aneesh Kumar K.V" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3] mm/hwpoison: do not lock page again when me_huge_page() successfully recovers Message-Id: <20210614193528.c2cc50d92eb76c4bea1b40e8@linux-foundation.org> In-Reply-To: <20210611002329.GA1201351@hori.linux.bs1.fc.nec.co.jp> References: <20210609072029.74645-1-nao.horiguchi@gmail.com> <20210610165059.6618498250f60674c1bb9c03@linux-foundation.org> <20210611002329.GA1201351@hori.linux.bs1.fc.nec.co.jp> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Z1PJwc+3; spf=pass (imf09.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 8D3D76000141 X-Stat-Signature: 3efrfhwc7mpzxup1gzcew5yioe9xoyfz X-HE-Tag: 1623724526-571 Content-Transfer-Encoding: quoted-printable 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, 11 Jun 2021 00:23:29 +0000 HORIGUCHI NAOYA(=E5=A0=80=E5=8F=A3=E3=80= =80=E7=9B=B4=E4=B9=9F) wrote: > >=20 > > --- mm/memory-failure.c > > +++ mm/memory-failure.c > > @@ -1782,6 +1796,8 @@ int memory_failure(unsigned long pfn, int flags= ) > > =20 > > identify_page_state: > > res =3D identify_page_state(pfn, p, page_flags); > > + mutex_unlock(&mf_mutex); > > + return res; > > unlock_page: > > unlock_page(p); > > unlock_mutex: > >=20 > > and... That mutex_unlock() looks odd. The patch adds no matching > > mutex_lock? >=20 > Yes, memory_failure() already has one mutex_lock (introduced by > mm-memory-failure-use-a-mutex-to-avoid-memory_failure-races.patch, > sorry for not clarifying that), and the change introduces a separate > return path. But I now think that I should have used "goto unlock_mute= x" > to use existing return path. But mm-memory-failure-use-a-mutex-to-avoid-memory_failure-races.patch is part of Tony's three patch series which is not marked for -stable.=20 So it isn't appropriate that this patch be based on top of that three patch series. Should Tony's patchset also be targeted to -stable? If so then OK. If not then please let's prepare your -stable patch against current mainline, as it is higher priority than the 5.14-rc1 material in linux-next.