Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3276183pxj; Mon, 14 Jun 2021 19:42:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7VMpUhJ50A1/nzbKE+9GcdQfKuwCbvsVbtTu9J2U75BYFHBUA4zsZSkQECViWk8dfyhzM X-Received: by 2002:a17:906:3a8e:: with SMTP id y14mr18433632ejd.153.1623724950292; Mon, 14 Jun 2021 19:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623724950; cv=none; d=google.com; s=arc-20160816; b=iUxlCRKioqWkUEEicg+yE7EcXuUKolD+aIrWmNUtDA0sFSiO+oy7p0YiQJOGu6428/ 2ASNLV5A7WUpmNBDaFr+sVIuGEQuBTfKus/DuioZitII9Wbh/IKuTMLSsnEtt3loExoC qxfhAzMAKMhOdEVZD+ygzMydRRPfy5TzHyoIw3FYUHJ7sxkbGJDj4P3RZ8lZKk8lvHRB tRVxqxCvDhM19LxleuHU4Np3ULXtHaeRQIle3x68eZmqvYmx0Gee37EJQjM1bXTwkxQx cwls8GRfhtiziDoBnEOiQIMaIG36hzfxFqKK0KAgGZkfLZe0qQoTcM7zqE3K4JSI2ySe WpzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=5Adhx2+e4jYD3T7tyyr4ysXi6OC8nP3dhjjWdiCn4xE=; b=g9T44RVPs5sYy5gIItSkqJI3Of4pu8bDXeGAI23VufbzDaQunkh2m8koECZs0QMCyH uwvMfvp2A/Nsrzv6PRBLR3r2q41JbKi/l4Myrs+ao0Nr0RO4r+UVizZs2TgyAczlRJyN h2BQC7dyzWSpQ1Azc37k1btiUesnXXcbkYu4uqKZoC85fkW0Xoo0j/iP5uKXPUEfg28L j0U4fmHROWOuf+O6mOjp2zTEEPt5giCEkheKBIEM7/PpMmajpzyDTnMMU8Km9zm5sieB ehLCJTGlGWRWq9mzxV2iYjRMQJ0Dd+rYLqr1MmEULmckDa1JxziqOKmVKNG2VlbWGIcp gB8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linux-foundation.org header.s=korg header.b=Z1PJwc+3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id da25si12798370edb.3.2021.06.14.19.42.03; Mon, 14 Jun 2021 19:42:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@linux-foundation.org header.s=korg header.b=Z1PJwc+3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230450AbhFOChe (ORCPT + 99 others); Mon, 14 Jun 2021 22:37:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:45202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbhFOChd (ORCPT ); Mon, 14 Jun 2021 22:37:33 -0400 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Jun 2021 00:23:29 +0000 HORIGUCHI NAOYA(堀口 直也) wrote: > > > > --- mm/memory-failure.c > > +++ mm/memory-failure.c > > @@ -1782,6 +1796,8 @@ int memory_failure(unsigned long pfn, int flags) > > > > identify_page_state: > > res = identify_page_state(pfn, p, page_flags); > > + mutex_unlock(&mf_mutex); > > + return res; > > unlock_page: > > unlock_page(p); > > unlock_mutex: > > > > and... That mutex_unlock() looks odd. The patch adds no matching > > mutex_lock? > > 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_mutex" > 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. 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.