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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 C1D9DC352A9 for ; Thu, 26 Sep 2019 22:48:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 84B2A2086A for ; Thu, 26 Sep 2019 22:48:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="j3nmnooQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84B2A2086A 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 12B166B027E; Thu, 26 Sep 2019 18:48:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DB8B6B027F; Thu, 26 Sep 2019 18:48:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F31758E0028; Thu, 26 Sep 2019 18:48:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id CBE1A6B027E for ; Thu, 26 Sep 2019 18:48:36 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 6C9CF824CA20 for ; Thu, 26 Sep 2019 22:48:36 +0000 (UTC) X-FDA: 75978562632.06.self81_10e7080fa4320 X-HE-Tag: self81_10e7080fa4320 X-Filterd-Recvd-Size: 2243 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Sep 2019 22:48:36 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C83DB207FF; Thu, 26 Sep 2019 22:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569538115; bh=rZUFsoQvVrC9Thqs802fO93uxeiJR0VRRll9tLwihFU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=j3nmnooQxycEwo1uKREgSaxDhUb/HNIkhTGY2sQ9DBbbALr/wayasTfVdTMLfPqBr xFUQXgVYpYBqRie3+IFJOKiC+MZSpcTChSGyChR50ua98i+36tz12Ft0PG+95AqL0Q iYAOxcqtx8MnvSICHVl1FMyilQt03ete43r2IpLQ= Date: Thu, 26 Sep 2019 15:48:34 -0700 From: Andrew Morton To: Vitaly Wool Cc: Linux-MM , linux-kernel@vger.kernel.org, Markus Linnala , stable@kernel.org, Dan Streetman , Vlastimil Babka Subject: Re: [PATCH] z3fold: claim page in the beginning of free Message-Id: <20190926154834.132f40363f5805a7a5cb347a@linux-foundation.org> In-Reply-To: <20190926104844.4f0c6efa1366b8f5741eaba9@gmail.com> References: <20190926104844.4f0c6efa1366b8f5741eaba9@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Thu, 26 Sep 2019 10:48:44 +0200 Vitaly Wool wrote: > There's a really hard to reproduce race in z3fold between > z3fold_free() and z3fold_reclaim_page(). z3fold_reclaim_page() > can claim the page after z3fold_free() has checked if the page > was claimed and z3fold_free() will then schedule this page for > compaction which may in turn lead to random page faults (since > that page would have been reclaimed by then). Fix that by > claiming page in the beginning of z3fold_free(). > I take it from the email headers that a Cc: was intended?