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]
Message-ID: <46D857DC-26BB-44F4-954C-A42416B474EB@oracle.com>
Date:   Fri, 5 Aug 2022 11:21:53 +0000
From:   William Kucharski <william.kucharski@...cle.com>
To:     Leon Romanovsky <leon@...nel.org>
CC:     Dongliang Mu <dzm91@...t.edu.cn>,
        Zhu Yanjun <zyjzyj2000@...il.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Dongliang Mu <mudongliangabcd@...il.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rxe: fix xa_alloc_cycle() error return value check again

I erroneously sent a duplicate of this patch last week because I didn't see the fix in the 5.19 kernel as of yet.

Do we know when it might be pulled into Linus' tree?

Thanks,
    William Kucharski

> On Jun 16, 2022, at 2:57 AM, Leon Romanovsky <leon@...nel.org> wrote:
> 
> On Thu, Jun 09, 2022 at 03:06:56PM +0800, Dongliang Mu wrote:
>> From: Dongliang Mu <mudongliangabcd@...il.com>
>> 
>> Currently rxe_alloc checks ret to indicate error, but 1 is also a valid
>> return and just indicates that the allocation succeeded with a wrap.
>> 
>> Fix this by modifying the check to be < 0.
>> 
>> Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>
>> ---
>> drivers/infiniband/sw/rxe/rxe_pool.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> I applied same fix to rxe_alloc() and added Fixes line.
> 
> Thanks, applied.
> 
>> 
>> diff --git a/drivers/infiniband/sw/rxe/rxe_pool.c b/drivers/infiniband/sw/rxe/rxe_pool.c
>> index 1cc8e847ccff..e9f3bbd8d605 100644
>> --- a/drivers/infiniband/sw/rxe/rxe_pool.c
>> +++ b/drivers/infiniband/sw/rxe/rxe_pool.c
>> @@ -167,7 +167,7 @@ int __rxe_add_to_pool(struct rxe_pool *pool, struct rxe_pool_elem *elem)
>> 
>> err = xa_alloc_cyclic(&pool->xa, &elem->index, elem, pool->limit,
>>      &pool->next, GFP_KERNEL);
>> - if (err)
>> + if (err < 0)
>> goto err_cnt;
>> 
>> return 0;
>> -- 
>> 2.25.1
>> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ