Re: [PATCH rdma-core] librdmacm: Fix return code from rdma_create_id2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 25, 2018 at 03:19:59PM -0600, Jason Gunthorpe wrote:
> The latest tumbleweed version of gcc reports:
> 
> ../librdmacm/cma.c: In function 'rdma_create_ep':
> ../librdmacm/cma.c:2427:24: warning: 'cm_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    id_priv->connect_len = res->ai_connect_len;
> 
> And indeed if write() returns 0, then there is a problem in this function.
> Add the missing sanitizing of ret that all other places that call write()
> have.
> 
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> ---
>  librdmacm/cma.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux