Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp579604img; Fri, 22 Mar 2019 04:27:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqysbEP3JdskK5Y8t78/GF4LmVxlpwE62qHlljGBPFoqbd9PpN/onWHNief/Pyx85YIIMOiF X-Received: by 2002:a17:902:1e6:: with SMTP id b93mr8930446plb.325.1553254051584; Fri, 22 Mar 2019 04:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553254051; cv=none; d=google.com; s=arc-20160816; b=OxSMyjJRUZYndjRm/CQAkTEb+gUooHfv7JLFBqwkA9UjXHNJSjzbmwG/Js9LIi66Ua YVUYtQFKnHeNcMUGEdXFWiC4We7lnR7MOlrBbKA8UXhSnnHXSlT0UnxFpb2hMuubpKqo vskv8MHZFF52Pbq+DvPC5Z0cVbdIeRYsB4YMk6y3v7ljzgcJ35hPwLuO1Omak45QE3hL b+zYS0+8eHClSRjxCCu82BdOtgFrC7mlH8evJnuXfGGvYdZBFUzAye+I8lfu55s35X1V X1U9p8MK9MqrNR9FhleULa3DoaGMLSDYx3LEO1t+fPcdNGXkaKXxaIKNGqKkh5iphIDQ q89A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WrwqI1fbDuhxdlfXlVbns8m6faMpqwJqZW+PY9x+JA4=; b=j0jPKiZyTD+VAnYhA8hR6zkt6t5Wx2ZZlbJ1UH21e601NRXrz7fVqHeFKBN7HTgCLI cFFwg6tO/nODAU8MMnYdqosME44mnlaq66UUoTuFf6KuxEcYnp5zCCSfmyfZuroKeco3 F7M34Z6LKw/7SGNmkmuvOKkCDE77Gjkvj7wBog/ixGS6EOn/ocM1qkflDXA1gfHLH1xY NKvVqTH7PtOHia/IbYtPbDM6N3vGkFokDtVeHYU1667pGho4CAvMTpiS++SdzLgDkmlT Kx4Q6Dd9/L88ip5mGKGpgkunUexU1N3y9oDXr3nPuVPs8tGU2455ZisWGhrNhwZH7HAv 26xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lci8Lr7l; 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 c11si6587388pga.350.2019.03.22.04.27.13; Fri, 22 Mar 2019 04:27:31 -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; dkim=pass header.i=@kernel.org header.s=default header.b=lci8Lr7l; 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 S1729271AbfCVLZY (ORCPT + 99 others); Fri, 22 Mar 2019 07:25:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:52710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728646AbfCVLZV (ORCPT ); Fri, 22 Mar 2019 07:25:21 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D7A6F20657; Fri, 22 Mar 2019 11:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253921; bh=dXSPNAw77WfAI319AqADIh4yUh+iD1Dj9jp9CJOd2bk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lci8Lr7lHPm8kk5b8K2C8KorJIvp+3IvSyTUJI0WY1p9LKsSb7KFbKtO0DPQ+twCs swoDEf9NTqbYkBlqAZLGzbcDUs+8H3KB3XuF7uZJLGNn0cPFx7olx82UyV42v6jC+D AutjhwE4NOrbHGgdyd6O1eQUvSR2h0m7Pndp0pgU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , zhengbin , Dominique Martinet Subject: [PATCH 3.18 095/134] 9p/net: fix memory leak in p9_client_create Date: Fri, 22 Mar 2019 12:15:08 +0100 Message-Id: <20190322111217.032973286@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: zhengbin commit bb06c388fa20ae24cfe80c52488de718a7e3a53f upstream. If msize is less than 4096, we should close and put trans, destroy tagpool, not just free client. This patch fixes that. Link: http://lkml.kernel.org/m/1552464097-142659-1-git-send-email-zhengbin13@huawei.com Cc: stable@vger.kernel.org Fixes: 574d356b7a02 ("9p/net: put a lower bound on msize") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Dominique Martinet Signed-off-by: Greg Kroah-Hartman --- net/9p/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/9p/client.c +++ b/net/9p/client.c @@ -1065,7 +1065,7 @@ struct p9_client *p9_client_create(const p9_debug(P9_DEBUG_ERROR, "Please specify a msize of at least 4k\n"); err = -EINVAL; - goto free_client; + goto close_trans; } err = p9_client_version(clnt);