lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191028165436.GA18470@ziepe.ca>
Date:   Mon, 28 Oct 2019 13:54:36 -0300
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     Colin King <colin.king@...onical.com>
Cc:     Lijun Ou <oulijun@...wei.com>, Wei Hu <xavier.huwei@...wei.com>,
        Doug Ledford <dledford@...hat.com>,
        Tao Tian <tiantao6@...wei.com>,
        Leon Romanovsky <leon@...nel.org>,
        Yangyang Li <liyangyang20@...wei.com>,
        linux-rdma@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] RDMA/hns: fix memory leak on 'context' on error
 return path

On Thu, Oct 24, 2019 at 02:10:34PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently, the error return path when the call to function
> dev->dfx->query_cqc_info fails will leak object 'context'. Fix this
> by making the error return path via 'err' return return codes rather
> than -EMSGSIZE, set ret appropriately for all error return paths and
> for the memory leak now return via 'err' with -EINVAL rather than
> just returning without freeing context.
> 
> Addresses-Coverity: ("Resource leak")
> Fixes: e1c9a0dc2939 ("RDMA/hns: Dump detailed driver-specific CQ")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_restrack.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)

Applied to for-next with the note to remove the EINVAL return

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ