lkml.org 
[lkml]   [2019]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 151/230] 9p/net: fix memory leak in p9_client_create
    Date
    4.4-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: zhengbin <zhengbin13@huawei.com>

    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 <hulkci@huawei.com>
    Signed-off-by: zhengbin <zhengbin13@huawei.com>
    Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    net/9p/client.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/9p/client.c
    +++ b/net/9p/client.c
    @@ -1058,7 +1058,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);

    \
     
     \ /
      Last update: 2019-03-22 14:10    [W:4.737 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site