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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR18MB2528CE8CB05F12BE7F23AEF1D3AA0@MN2PR18MB2528.namprd18.prod.outlook.com>
Date:   Wed, 21 Aug 2019 05:03:49 +0000
From:   Sudarsana Reddy Kalluru <skalluru@...vell.com>
To:     Wenwen Wang <wenwen@...uga.edu>
CC:     Ariel Elior <aelior@...vell.com>,
        GR-everest-linux-l2 <GR-everest-linux-l2@...vell.com>,
        "David S. Miller" <davem@...emloft.net>,
        "open list:QLOGIC QL4xxx ETHERNET DRIVER" <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] qed: Add cleanup in qed_slowpath_start()


> -----Original Message-----
> From: Wenwen Wang <wenwen@...uga.edu>
> Sent: Wednesday, August 21, 2019 10:17 AM
> To: Wenwen Wang <wenwen@...uga.edu>
> Cc: Sudarsana Reddy Kalluru <skalluru@...vell.com>; Ariel Elior
> <aelior@...vell.com>; GR-everest-linux-l2 <GR-everest-linux-
> l2@...vell.com>; David S. Miller <davem@...emloft.net>; open
> list:QLOGIC QL4xxx ETHERNET DRIVER <netdev@...r.kernel.org>; open list
> <linux-kernel@...r.kernel.org>
> Subject: [PATCH v2] qed: Add cleanup in qed_slowpath_start()
> 
> If qed_mcp_send_drv_version() fails, no cleanup is executed, leading to
> memory leaks. To fix this issue, introduce the label 'err4' to perform the
> cleanup work before returning the error.
> 
> Signed-off-by: Wenwen Wang <wenwen@...uga.edu>
> ---
>  drivers/net/ethernet/qlogic/qed/qed_main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c
> b/drivers/net/ethernet/qlogic/qed/qed_main.c
> index 829dd60..1efff7f 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_main.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
> @@ -1325,7 +1325,7 @@ static int qed_slowpath_start(struct qed_dev
> *cdev,
>  					      &drv_version);
>  		if (rc) {
>  			DP_NOTICE(cdev, "Failed sending drv version
> command\n");
> -			return rc;
> +			goto err4;
>  		}
>  	}
> 
> @@ -1333,6 +1333,8 @@ static int qed_slowpath_start(struct qed_dev
> *cdev,
> 
>  	return 0;
> 
> +err4:
> +	qed_ll2_dealloc_if(cdev);
>  err3:
>  	qed_hw_stop(cdev);
>  err2:
> --
> 2.7.4

Acked-by: Sudarsana Reddy Kalluru <skalluru@...vell.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ