Received: by 10.192.165.148 with SMTP id m20csp2464918imm; Sun, 22 Apr 2018 07:36:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx49jI9/HOXfJ5hkm6bJBDRNDofm7NrbZcqzJb8sYMXIMpFsHtUH/fF4RLNxw7WV3qXxDshpA X-Received: by 10.98.2.72 with SMTP id 69mr16802188pfc.12.1524407763859; Sun, 22 Apr 2018 07:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524407763; cv=none; d=google.com; s=arc-20160816; b=qv7EE1EsnZZuhKU5xn9EwYiuMdj9GeA8zkpdHwoINjyuNYtfeGuFDaNyjo7l7ibmxB J/eszuUTSeDNePMRZK+tpdCSmXNIPoza2dFx5E92SHuMCbLDLND0opY60dv8HAay+MA4 XGNs4agbhhMAkWnfx3pkkgOtRc9IcX+vWJ4qkEzNnzPh8vNSXy9mVtoHEU5Fdq8jgVEt C0uK9DPS16dZoDtG9f+JsVUXZwnEPagGH6rylrFCknfqIqQ7ILzIksXts5dIrXsqTDmt lM8DzyVpDS7IDJlU+mDw0oOFFgF741PhRGE+LisbsiYlp3ZbX3vLcvBsP6JU5CqLEcDj GU6A== 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=VCYO+twLtiVRwHhrlCIs/FyM1XB0BHYXwGb+gyQDKKM=; b=tDUcFt5JL5yyO8lil87sPfA+wziIGSmDOc32FJWVkUubnXC5xTENhY3x+dUxXcs4QO w7mASsVhi9dv2ghmMQS+O1o2YQGtMwWC8NvnrbRvCLGGXh98kwQrhPhc8WIhDP7Ke4V7 lcF3rJnFjgxH0+YWsRIX3CndJUScEFi+BwBdtm1maMqW/gLSvkcdRuXCJCO0U8hbKyDH tpaz/KGDtv79kIwAVaQVi4twwOcClrQT47nmb9N6ZO7U8Uhz4/SYqOQOU60kWKivxzbH 6VHG8ngG5f7vO7AmncBuTXuOWG1GD1YpJ5aGEqc8g6+4BC0Xn2oi95/iHsG4Vl5U/jbh 5ygA== 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 y11-v6si9212092pln.525.2018.04.22.07.35.49; Sun, 22 Apr 2018 07:36:03 -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 S1756643AbeDVOTY (ORCPT + 99 others); Sun, 22 Apr 2018 10:19:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59398 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932532AbeDVOTL (ORCPT ); Sun, 22 Apr 2018 10:19:11 -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 1914315; Sun, 22 Apr 2018 14:19:10 +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.4 90/97] rpc_pipefs: fix double-dput() Date: Sun, 22 Apr 2018 15:54:08 +0200 Message-Id: <20180422135310.105770191@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135304.577223025@linuxfoundation.org> References: <20180422135304.577223025@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.4-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);