Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1553331ybt; Mon, 15 Jun 2020 03:23:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvlRSJ4zGvgEmar/BnOr9o+YsTMl2svhrHi++z2z1lzt5s8ZkZQxtZNhZ8f4wgMuHtQfD4 X-Received: by 2002:a50:ee8f:: with SMTP id f15mr23427747edr.168.1592216599768; Mon, 15 Jun 2020 03:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592216599; cv=none; d=google.com; s=arc-20160816; b=wkyBK5iQIwR12AcTJa94iCAwftwoSgOMPfbNzxfo6FyhkbVf77UABG6aOivJSlpgMT hXF48inPxx80cvZchsm6GEZ+cj392zMg5lyIvkhKRYtTqY1zs2dCbbKzjTsVgYpKtPBB zI5KR/vgoxgTDEBx0rUGgcoU4H8Cix5IZ7kUr8Df3kZq7fFsSQBPgrLbrpLBYA0H21sD 2w2aG+SvtLUVOROwn6pzTQk9r00vcHPznlD1M46Z1XKPnEXfGzPVCa6pY35LeqmVuMVa osNVpRb2/D6OnAWqtXGiYCE+oUFQYe0IQV/2olH40l/UdRUqo3OlWbRggAOd9GAY+jv2 Iy5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Z/Y1sS3kqs8dscDEjrk5GURIu+2XWCtiHVMRteETZdg=; b=LLXNvZ250r21DZKniNOWruLqjRxv35gzE6P74qNMiCZuEopS4OZtQO3L/vueLkqgLA F/0O/G+3HAI5wEQWSwqMecnOuRW05lcSCpDWZPLky4OzAfxU//WfxTivzrSsU2W17VnC doSVKULnzuA5zAyfuSoAuG/T0tT7yDRLgG+oYaYdVFBe1LprmLys4mn4MhneH4bSjBNp QSus/jQsJ+4VwyKq+yUa84Y/T7k2wWZUJ9zmqJE36mnp+DiihY1XWMI5QtE9dlmMRQz+ U5v+rT9xeLpAzCqEskzry9/pc9+1nMnzgvnXK2uGSO7t4yXpff+orWnbkURyPPeArSFP 5P6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg25si7992081edb.451.2020.06.15.03.22.57; Mon, 15 Jun 2020 03:23:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729051AbgFOKVK (ORCPT + 99 others); Mon, 15 Jun 2020 06:21:10 -0400 Received: from nautica.notk.org ([91.121.71.147]:53115 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728368AbgFOKVJ (ORCPT ); Mon, 15 Jun 2020 06:21:09 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 341B6C01C; Mon, 15 Jun 2020 12:21:08 +0200 (CEST) Date: Mon, 15 Jun 2020 12:20:53 +0200 From: Dominique Martinet To: Zheng Bin Cc: ericvh@gmail.com, lucho@ionkov.net, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com Subject: Re: [PATCH RESEND] 9p: Fix memory leak in v9fs_mount Message-ID: <20200615102053.GA11026@nautica> References: <20200615012153.89538-1-zhengbin13@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200615012153.89538-1-zhengbin13@huawei.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Zheng Bin wrote on Mon, Jun 15, 2020: > v9fs_mount > v9fs_session_init > v9fs_cache_session_get_cookie > v9fs_random_cachetag -->alloc cachetag > v9ses->fscache = fscache_acquire_cookie -->maybe NULL > sb = sget -->fail, goto clunk > clunk_fid: > v9fs_session_close > if (v9ses->fscache) -->NULL > kfree(v9ses->cachetag) > > Thus memleak happens. > > Signed-off-by: Zheng Bin Thanks, will run tests & queue next weekend -- Dominique