Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp156057ybx; Tue, 5 Nov 2019 21:38:16 -0800 (PST) X-Google-Smtp-Source: APXvYqyNTv0myXSuEFuPvd1M+7amvPrQBkDO8UlmUEqhiv7/MYkSMbvT3G/MzGhQ5BSnCc9x7nBO X-Received: by 2002:aa7:cd54:: with SMTP id v20mr681270edw.203.1573018696356; Tue, 05 Nov 2019 21:38:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573018696; cv=none; d=google.com; s=arc-20160816; b=E+WZvq+omJw7ZgSEKFw/jk1ybwixSFBGCx2lYWFisuhvqWcewgHrHG0uWSW/mGWO4v 9Za2p7ehs8rNSawI/0GUqLN+86ilRBP1Zxj9aroWE9ewrsz86GSOdeMEJpIx8mBGaNaX qpeCTXOyhRUDpVzsMoX63vP1uBAFb0s5lLtKUzpFSK04zdF+mu7WMu61yem/Q/vYnpq/ 9HbHTZ0BU+tNDZW/7C035b91ZzVJhwU+qAKqypoUTz189Xl+CAQGYVyeoB3Eq2By1M+B DpVUcB7jzhciIdJ6v4BFPLTanD6SrfC/Ny/Bb+/cvE5vm1u7si5aKAye7RLew0Jxu4wM 4GfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=YtzABwczyZfNxL6XzweD6I6Q63/FdFYN7U2QH0SQbdg=; b=xn7M2ZjSwi1lsQECCEWKqUYvDZCmGKxVb74uSp9FO4M1NqL+cwLcUCMBdlXvJgj/i6 0o0NVgzz9BXzr+3MGP4+AqyEYI52MUfw/G5w5f1V2gOWnJtCSOV1TXnjqZiOroLOLvZb xBHZ0p/Df+eCUW0cZSzP7YsXPOQBHgK8Xb7MYxb4CWKiJ1Qtr/4unl42L09wLUhy2XHD votwzzk3oAjdbeqjXOSpnpcEgFWBVnmutGng/2ddaUJjhImEtFtY3ucJfLOsjHp40kAo 74GIaJWxv15zCmW7IaZhAIrVZe2dXbEhEt9+Duw5U85fAQiNCWcD+uTzXAGjgwbtfxn0 KoUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eIhxf6+Y; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k24si8181829ejv.111.2019.11.05.21.37.35; Tue, 05 Nov 2019 21:38:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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=@gmail.com header.s=20161025 header.b=eIhxf6+Y; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725790AbfKFFhe (ORCPT + 99 others); Wed, 6 Nov 2019 00:37:34 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:45413 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725616AbfKFFhe (ORCPT ); Wed, 6 Nov 2019 00:37:34 -0500 Received: by mail-io1-f66.google.com with SMTP id s17so25597256iol.12; Tue, 05 Nov 2019 21:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YtzABwczyZfNxL6XzweD6I6Q63/FdFYN7U2QH0SQbdg=; b=eIhxf6+YBKxXXanCrpjy9m6LcWa7mOKSyqdsrTDJFCwvUSKKeqJU/L8V0n/6F3agP3 HqRUiotx5g/K6NiA2pddwtPSSeemhplxj00BKjVuVleZZWwL8ZRJJhuvQEXjqdyMfwa5 7rjxE996A5N2goi8Q5tFBNHeEvFnQF7XzzGqZonA2yNoSoKcPcCrblu8RdXbF1kGgji8 jyEPs0bNsGUCHolkdb67Levt7xX8tSBpcCSTS2ZLeK0qO1tivwUmFSZ9UTVLh7fA0vPp RLxKcnvBff5fqT/fkDOQRhGYW9THwF0NMb+CN/ePAIV0zd7toKnAXpv2FghzW/U2WPPO iaDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YtzABwczyZfNxL6XzweD6I6Q63/FdFYN7U2QH0SQbdg=; b=IFV7bJoOFoWwyNxyosAd2Kg/gQrWvo0HCXE8MgdO1v78aPiO8KY0fCdtgvmhNvDaUF w+sCPzXnlAn4uTBbrxd4Xeu7VR8DQNNCehrIjnNHn+6vbkG3oF1aGUqOiBVhljTSmH14 VfITP81lZt/4cltpn9XgHXf1u95SG3+bIYuGFjHK7VW+Ha85JAi9Q1hr/srTvkIoF946 E+k2W6X780N8ut33JglD0k4kH8O4u6jLJ7ZPPro0PjqEk2GoGVYdg8AbYPEq/ZixXfTg STehUAXKQhCK1KwoyY2dgYeM6xDDE2bk/6YB/BCGvw6+UuvmhgkrLHCgYprYLgYRx7XW WJLA== X-Gm-Message-State: APjAAAUos+hOwEK62sqg4tTuQAVZjrqSlKGevynT9MHaU5iRsObxTtBI 5bi1mLjmdU829Og23HsiplR+Njocmh0gpqXCENKL3g== X-Received: by 2002:a5e:9706:: with SMTP id w6mr2508377ioj.252.1573018652955; Tue, 05 Nov 2019 21:37:32 -0800 (PST) MIME-Version: 1.0 References: <20190920002232.27477-1-navid.emamdoost@gmail.com> In-Reply-To: <20190920002232.27477-1-navid.emamdoost@gmail.com> From: Navid Emamdoost Date: Tue, 5 Nov 2019 23:37:22 -0600 Message-ID: Subject: Re: [PATCH] NFSv4: fix memory leak if nfs4_begin_drain_session fails To: Anna Schumaker , Trond Myklebust Cc: Navid Emamdoost , Stephen McCamant , Kangjie Lu , linux-nfs@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Would you please review this patch? On Thu, Sep 19, 2019 at 7:22 PM Navid Emamdoost wrote: > > In nfs4_try_migration, if nfs4_begin_drain_session fails the allocated > memory should be released. > > Signed-off-by: Navid Emamdoost > --- > fs/nfs/nfs4state.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c > index cad4e064b328..124649f12067 100644 > --- a/fs/nfs/nfs4state.c > +++ b/fs/nfs/nfs4state.c > @@ -2096,7 +2096,7 @@ static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred > > status = nfs4_begin_drain_session(clp); > if (status != 0) > - return status; > + goto out; > > status = nfs4_replace_transport(server, locations); > if (status != 0) { > -- > 2.17.1 > -- Navid.