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: <DM6PR18MB3034F4D2FF41DA6D60674E27D2BF9@DM6PR18MB3034.namprd18.prod.outlook.com>
Date:   Thu, 21 Oct 2021 04:27:36 +0000
From:   Saurav Kashyap <skashyap@...vell.com>
To:     Zheyu Ma <zheyuma97@...il.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        Javed Hasan <jhasan@...vell.com>,
        GR-QLogic-Storage-Upstream <GR-QLogic-Storage-Upstream@...vell.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [EXT] [PATCH] scsi: qedf: Fix return values of the probe function

Hi Zheyu,
Thanks for the patch.

> -----Original Message-----
> From: Zheyu Ma <zheyuma97@...il.com>
> Sent: Wednesday, October 20, 2021 8:03 PM
> To: jejb@...ux.ibm.com; martin.petersen@...cle.com; Saurav Kashyap
> <skashyap@...vell.com>; Javed Hasan <jhasan@...vell.com>; GR-QLogic-
> Storage-Upstream <GR-QLogic-Storage-Upstream@...vell.com>
> Cc: linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org; Zheyu Ma
> <zheyuma97@...il.com>
> Subject: [EXT] [PATCH] scsi: qedf: Fix return values of the probe function
> 
> External Email
> 
> ----------------------------------------------------------------------
> qedf_set_fcoe_pf_param() propagates the return value to the probe
> function __qedf_probe() and then hits local_pci_probe().
> 
> During the process of driver probing, the probe function should return < 0
> for failure, otherwise, the kernel will treat value > 0 as success.
> 
> Signed-off-by: Zheyu Ma <zheyuma97@...il.com>
> ---
>  drivers/scsi/qedf/qedf_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
> index 42d0d941dba5..52f2a52bea2c 100644
> --- a/drivers/scsi/qedf/qedf_main.c
> +++ b/drivers/scsi/qedf/qedf_main.c
> @@ -3161,14 +3161,14 @@ static int qedf_set_fcoe_pf_param(struct qedf_ctx
> *qedf)
> 
>  	if (!qedf->p_cpuq) {
>  		QEDF_ERR(&(qedf->dbg_ctx), "dma_alloc_coherent failed.\n");
> -		return 1;
> +		return -ENOMEM;
>  	}
> 
>  	rval = qedf_alloc_global_queues(qedf);
>  	if (rval) {
>  		QEDF_ERR(&(qedf->dbg_ctx), "Global queue allocation "
>  			  "failed.\n");
> -		return 1;
> +		return rval;
>  	}
> 
>  	/* Calculate SQ PBL size in the same manner as in qedf_sq_alloc() */
> --
> 2.17.6

Acked-by: Saurav Kashyap <skashyap@...vell.com>

Thanks,
~Saurav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ