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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 19 May 2020 15:23:35 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     ybason@...vell.com
Cc:     mkalderon@...vell.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next,v2 2/2] qed: Add XRC to RoCE

From: Yuval Basson <ybason@...vell.com>
Date: Tue, 19 May 2020 23:51:26 +0300

> @@ -1748,24 +1839,26 @@ static int qed_rdma_modify_srq(void *rdma_cxt,
>  	u16 opaque_fid, srq_id;
>  	struct qed_bmap *bmap;
>  	u32 returned_id;
> +	u16 offset;
>  	int rc;
>  
> -	bmap = &p_hwfn->p_rdma_info->srq_map;
> +	bmap = qed_rdma_get_srq_bmap(p_hwfn, in_params->is_xrc);
>  	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
>  	rc = qed_rdma_bmap_alloc_id(p_hwfn, bmap, &returned_id);
>  	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
>  
>  	if (rc) {
> -		DP_NOTICE(p_hwfn, "failed to allocate srq id\n");
> +		DP_NOTICE(p_hwfn,
> +			  "failed to allocate xrc/srq id (is_xrc=%u)\n",
> +			  in_params->is_xrc);
>  		return rc;
>  	}
>  
> -	elem_type = QED_ELEM_SRQ;
> +	elem_type = (in_params->is_xrc) ? (QED_ELEM_XRC_SRQ) : (QED_ELEM_SRQ);
>  	rc = qed_cxt_dynamic_ilt_alloc(p_hwfn, elem_type, returned_id);
>  	if (rc)
>  		goto err;

This "if (rc)" error path will leak 'returned_id' won't it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ