Received: by 10.192.165.148 with SMTP id m20csp2458016imm; Sun, 22 Apr 2018 07:27:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx48yM1LopcdcrM+OkpICW6eo+VfUZBC39Adl1dj4QvA2p0UM8DmdgWAq1H/zzc04WB/2RHn8 X-Received: by 10.101.98.138 with SMTP id f10mr8934118pgv.6.1524407254068; Sun, 22 Apr 2018 07:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524407254; cv=none; d=google.com; s=arc-20160816; b=KBMJi38cfaCC1zGIP1IO6QJ/3K1L7bu/Gh+5Ax6h/5j2jkJiBvb3oQTEuCUz1mjPzb 4LqVCclQZ1lI61YsSztf8BJVKD0aGx/ANjjCPO5nS/J4ygX4qtqB85hbdZsgZkAV7QmW giahQWynFdmjmoAW4lw/87tPfQlfSb3ptRD7LC4ebwjbOR7QFgGqEaj5XoKAMr9izHGt +QBYagbWuRr0y0hcLPNESXJUE/WMyRf61v/gz1d8Iq0BiHeTjLDmKYvMXccuDRYfYSHS SdZG8PyA0ck1YMUndRJtXLTY/gMIflQvDfLfCdw6QKH/EragLGgp6c9Rh2kN8QnBohu4 +GFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=j5CL+78oLj3B41+FY2UoGsMtyA0jOIF6loqMvG3QqVw=; b=jIe9c8Tozirbe/xmXWp07MuyDUx5bEM5GiUqNCiola5Ti6A/XX/Fq8dSRIx53V799a kN/xg89/f9ayLKZCxHmyybELID5MYyv8z9p2IMps4bgXjpKSGjB2BiSdJLMEOD982mEP u8SMIy8oVQtSC8XhQTChp87QjBzoIJsXwYK3/bN84RH1AWh42sufFwfluMJ/NWkd8vNW /ynJo+BTf/tK+F5tsx4LlsvVAEXhYQucGWjbDFjIqSz70vj9RlSyP6ZS3PVySucP3oyK vPHSyv0m9y9A3Aw2yhFhvIUPg0EG89GQGMagXIcJYMvHYwAH1QO72Q25LhQvI4M6/rGS U2CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si2922268pgc.283.2018.04.22.07.26.57; Sun, 22 Apr 2018 07:27:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757820AbeDVOZN (ORCPT + 99 others); Sun, 22 Apr 2018 10:25:13 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33122 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757416AbeDVOVx (ORCPT ); Sun, 22 Apr 2018 10:21:53 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1C85BCF8; Sun, 22 Apr 2018 14:21:52 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable@kernel.org, Al Viro Subject: [PATCH 3.18 49/52] rpc_pipefs: fix double-dput() Date: Sun, 22 Apr 2018 15:54:22 +0200 Message-Id: <20180422135317.595399449@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135315.254787616@linuxfoundation.org> References: <20180422135315.254787616@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Al Viro commit 4a3877c4cedd95543f8726b0a98743ed8db0c0fb upstream. if we ever hit rpc_gssd_dummy_depopulate() dentry passed to it has refcount equal to 1. __rpc_rmpipe() drops it and dput() done after that hits an already freed dentry. Cc: stable@kernel.org Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- net/sunrpc/rpc_pipe.c | 1 + 1 file changed, 1 insertion(+) --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -1375,6 +1375,7 @@ rpc_gssd_dummy_depopulate(struct dentry struct dentry *clnt_dir = pipe_dentry->d_parent; struct dentry *gssd_dir = clnt_dir->d_parent; + dget(pipe_dentry); __rpc_rmpipe(clnt_dir->d_inode, pipe_dentry); __rpc_depopulate(clnt_dir, gssd_dummy_info_file, 0, 1); __rpc_depopulate(gssd_dir, gssd_dummy_clnt_dir, 0, 1);