Received: by 10.192.165.148 with SMTP id m20csp2478259imm; Sun, 22 Apr 2018 07:53:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+OSbX+kuQh6VjkB/RhDB8bBZHldhau4tmsKZG+2rD0XT8uTZjrC1SidOzLR3nX8GMHlBNz X-Received: by 10.98.54.134 with SMTP id d128mr16787410pfa.39.1524408818370; Sun, 22 Apr 2018 07:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524408818; cv=none; d=google.com; s=arc-20160816; b=tTvD5XvJ521dnH7ACHnTv5g6OguRsLyxSsWmRSWhbMugQeJ2n1jEuwX/cAPz23P+8U 5pWaHHmpaplZbqAJvTHZjdnDTq4+ObVwqFsTXIVJutw3rQ+ZkSsvDA9ZiH1WnpqOh5RH EiPolKjJJIeLwLvhvfzyy3fJUaBTMYv76doGMZOIFSceDKjBabbndSaf/qv0bxRzsjxG 1ddXySGSetcmvfOm3A9BkX94HdEfzfuep1tHeePPEX2XRZkGoaLnRe9I9AH0wOpjdrN+ o8x0UKn55bzkyXn+yiOrd+nbjjp0CP4jqT9LG8jcyjgk4o/X0BYjeksrAF4bGrON/aeT oycQ== 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=Czj8SMdKL4OV0WUXIT6eVVsHDtJOgUljPlh/okAlfTE=; b=IvHuw75MTPb/4/9j8UJXeCaLTFtYk/nvY06GI9ycuh16hjHMn7O8XA5ioNZG7jhmTM /mQKUW4twkbfRA6hDjvI/2footNMJUZRGYssE+1qYcqBsbDzVaAWvv+JOVHCPoW3ssnn YU7lyJI7Ph1eJysd/a5TlmAU5AZaoEp7CF6rLN6o/xDgXMMsB8v7c1FXF+ORF7QU8zE3 AAJe+dDaSBR4FSyC0tNQ885eYKaZp9cSxx3f8D4ePLiB4CuLS7jLCSJjjahtjNBlEnCJ GtfeLnTGGy/WiRgrRffKMdevVJnFWU0bQ9snDhpI+PyoonnaJBJDvCAwJ8hh9dnTM8rc z69g== 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 p13-v6si10059269pll.416.2018.04.22.07.53.24; Sun, 22 Apr 2018 07:53:38 -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 S1757445AbeDVOwX (ORCPT + 99 others); Sun, 22 Apr 2018 10:52:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56580 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932072AbeDVOOt (ORCPT ); Sun, 22 Apr 2018 10:14:49 -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 0058B949; Sun, 22 Apr 2018 14:14:48 +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 4.9 89/95] rpc_pipefs: fix double-dput() Date: Sun, 22 Apr 2018 15:53:58 +0200 Message-Id: <20180422135214.068435004@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135210.432103639@linuxfoundation.org> References: <20180422135210.432103639@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 4.9-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(d_inode(clnt_dir), pipe_dentry); __rpc_depopulate(clnt_dir, gssd_dummy_info_file, 0, 1); __rpc_depopulate(gssd_dir, gssd_dummy_clnt_dir, 0, 1);