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=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 DA1FDC4360C for ; Fri, 27 Sep 2019 07:19:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 99745217D7 for ; Fri, 27 Sep 2019 07:19:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FqR0BQvS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99745217D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6912E6B000C; Fri, 27 Sep 2019 03:19:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 641AA6B000D; Fri, 27 Sep 2019 03:19:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 556558E0001; Fri, 27 Sep 2019 03:19:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0158.hostedemail.com [216.40.44.158]) by kanga.kvack.org (Postfix) with ESMTP id 342FD6B000C for ; Fri, 27 Sep 2019 03:19:07 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id AF3A5180AD827 for ; Fri, 27 Sep 2019 07:19:06 +0000 (UTC) X-FDA: 75979849092.22.fang73_6c96985845e24 X-HE-Tag: fang73_6c96985845e24 X-Filterd-Recvd-Size: 5414 Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Sep 2019 07:19:06 +0000 (UTC) Received: by mail-lf1-f68.google.com with SMTP id 72so1118000lfh.6 for ; Fri, 27 Sep 2019 00:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rutChAMrBSR18MIpTM0KNAiBKgyVxs5qeBuC3SY9xqM=; b=FqR0BQvS9sczmzTPYh0nvmylumThlmg0nn2ZDnM0f+p86EtqM68b+JtwXyx6rctZam dCQD3HEIy2K05LfxkYdmWFJY2P/k04wmSPRQSGTsGU3bkzX0n8F87/mkwAs/ueaYYvRL OZtsacvRXBGOltsfnM3cWcp7XNTbVGoU/jH+zJiupmpWJtPJF9h4x615hM2X70N/6g/Q S1nFBcCQCsCducD5a6j+T0cJEUniGYS6Dhe+eYf8ejYFQgnpTW9rJ8trsEGkB/FFwEL2 8OcR603L65K1ahTkHEBvR5LcscoufGKLoP8wvWnH2FaolRCAeINTW8GwxUaAYZkeI/fO VcRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rutChAMrBSR18MIpTM0KNAiBKgyVxs5qeBuC3SY9xqM=; b=olGwzMusLB3AOUxyGGoLBSXM9rYWQ9sgW/s9Ihkq3zh9aDnIzTH3od4j0kzl304bNV QKf+3XGSHtzXTjqXxGtsZFfoPzsITNF2w7/Urck89omer9EY7IuqSe7oDwYmQUC18zhW Eoc7Td1dV77x78AevSfLIunFWeRUVD3gOJoLIkIYgVf5l3Thb/GTGa2Zcdg5yOq9du3e BcYxrffKcuYMivnQFQlHA9tSwYond+xw2Pqb0loWCzTpt5WuHD+v6tJQwdpANRfXPj/p maARAqnPm3tFV2ua3E8lEEeJYffZU0agys2JjmokZ0cQOWLicolFwTMgB5i8OAo4ys7F PF1g== X-Gm-Message-State: APjAAAWkD2PrkTIlcBx7vnEUBu5f95iyXGOd8gFxu9VesFlnZvyWlYYm u6K+WiKeMAhjzfD2lUPYY/2KGBAzkIzvGsesfT8= X-Google-Smtp-Source: APXvYqxtfJ7nLA+yE9zqtEFWb5YGvhsph1ela+b3lfsUGoOAeOhsej7be7cZisIRNlvR2RY4k9YUVNVebvleB3MWBPo= X-Received: by 2002:ac2:48ba:: with SMTP id u26mr1668722lfg.164.1569568744578; Fri, 27 Sep 2019 00:19:04 -0700 (PDT) MIME-Version: 1.0 References: <20190926104844.4f0c6efa1366b8f5741eaba9@gmail.com> <20190926154834.132f40363f5805a7a5cb347a@linux-foundation.org> In-Reply-To: <20190926154834.132f40363f5805a7a5cb347a@linux-foundation.org> From: Vitaly Wool Date: Fri, 27 Sep 2019 09:19:02 +0200 Message-ID: Subject: Re: [PATCH] z3fold: claim page in the beginning of free To: Andrew Morton Cc: Linux-MM , LKML , Markus Linnala , stable@kernel.org, Dan Streetman , Vlastimil Babka Content-Type: multipart/alternative; boundary="00000000000078a2ff059383b308" 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: --00000000000078a2ff059383b308 Content-Type: text/plain; charset="UTF-8" Den fre 27 sep. 2019 00:48Andrew Morton skrev: > 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? > Oh yes, thanks! ~Vitaly > --00000000000078a2ff059383b308 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Den fre 27 sep. 2019 00:48Andrew Morton <akpm@linux-foundation.org> skrev:=
On Thu, 26 Sep 2019 10:48:44 +0200= Vitaly Wool <vitalywool@gmail.com> 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: <stable@vger.kernel.org>

was intended?

Oh yes, thanks!=C2=A0

~Vitaly=C2=A0
=
--00000000000078a2ff059383b308--