Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3823206ybl; Mon, 3 Feb 2020 07:12:44 -0800 (PST) X-Google-Smtp-Source: APXvYqxyUNjY2J0KIfaA0dgPQBH7YLCa6hngMPREnQSvsKZ1R80kCs4ij1O1wRXWQJo9y0mRBZ6X X-Received: by 2002:aca:af49:: with SMTP id y70mr15324555oie.162.1580742764380; Mon, 03 Feb 2020 07:12:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580742764; cv=none; d=google.com; s=arc-20160816; b=ZSx4RWz7XWyVb5NJn3p6M+Rs88o5wLSMxvPrnonjW/9ULTLB9uwlP/nAbDEr3pwezQ FWCITkqHSzh57LBkzs59BKa/4NHhHW1w4FFr3EICFvtmIZ70+zTV0CtRc/kYqYDDk3AL n+ESSfuVtrJhKkQMFG5cDLInG6hxADOdvf/eywAxmRg57a5tTH+KOy4hoFBFTeeHPgHl cdifz6ZP2WDHnVsirSIC8GWjnhIzgAfRCG9B4b2jQq098WRkguOOBrf4z/wj9gG0bGb1 g9nDxDLqOk81fivu/dEjoWawkKaYmLYaanko8whVzaaj4ioxVJU4UB9U6bVaDt0xCsQW p0Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=JqCeqPP2h85rOy9MEo9ya027nswLM/F289rlk37ND94=; b=CSdw1Y8ScZuhyWEjSbnGUkbhV9+ljdemOfyhSdiZqoDPq5/VHmG1S+R7ivM7hv9L29 DK+qfIXReQP+2sTZFejb+tzbnKhLo90YQGIvavDZ76vK82o2AIxQhzhTk+q1+cZDas+7 He4SawnrWia4YklRQMJbuuwcLlUVI0GweGh5d1FmiTlzWCOlUbfPn00e6DDPZ6GrhnJw 4IILA3ANqgW8dME2XQwEb92gLarIxPJSWbm3kX7ffVyMFHEou0QZx9phaabvJ3EQc/QK bvgjsSHQeXztS2rXBWCFUBxgDSCvAZLZW21Xcya2578gyyUx8JPdWG0zDiXuMD/JAOdm SXcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B1MsElHz; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si8434599oig.25.2020.02.03.07.12.24; Mon, 03 Feb 2020 07:12:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B1MsElHz; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728052AbgBCOVd (ORCPT + 99 others); Mon, 3 Feb 2020 09:21:33 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:44948 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728098AbgBCOVc (ORCPT ); Mon, 3 Feb 2020 09:21:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580739691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JqCeqPP2h85rOy9MEo9ya027nswLM/F289rlk37ND94=; b=B1MsElHzS2tvZ0U3skISRJSfWms9AeM/0AuBl85p22JO2XxJPtkCv6XwIQs7l0E+jDmEuA YqoBOiOSR18Z8Hr8C2qmOBO/HW1Vagyk3yIqzI9j+rv4BdA9W4/shqi9zIcDCfrQyJkoYx v2zpEonydCOauSkhrLtjmheB5hlC8IE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-166-mAq-OCIwOcOab1_ar4uEIg-1; Mon, 03 Feb 2020 09:21:26 -0500 X-MC-Unique: mAq-OCIwOcOab1_ar4uEIg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 32DF01005516; Mon, 3 Feb 2020 14:21:25 +0000 (UTC) Received: from [172.16.176.1] (ovpn-64-2.rdu2.redhat.com [10.10.64.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B3B3687B1D; Mon, 3 Feb 2020 14:21:24 +0000 (UTC) From: "Benjamin Coddington" To: "Trond Myklebust" Cc: "Anna Schumaker" , "Dai Ngo" , linux-nfs@vger.kernel.org Subject: Re: [PATCH 2/4] NFS: Directory page cache pages need to be locked when read Date: Mon, 03 Feb 2020 09:21:23 -0500 Message-ID: In-Reply-To: <20200202225356.995080-3-trond.myklebust@hammerspace.com> References: <20200202225356.995080-1-trond.myklebust@hammerspace.com> <20200202225356.995080-2-trond.myklebust@hammerspace.com> <20200202225356.995080-3-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 2 Feb 2020, at 17:53, Trond Myklebust wrote: > When a NFS directory page cache page is removed from the page cache, > its contents are freed through a call to nfs_readdir_clear_array(). > To prevent the removal of the page cache entry until after we've > finished reading it, we must take the page lock. > > Fixes: 11de3b11e08c ("NFS: Fix a memory leak in nfs_readdir") > Cc: stable@vger.kernel.org # v2.6.37+ > Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Ben