On Wed, Mar 12, 2025 at 10:07:17AM +0200, Leon Romanovsky wrote: > On Wed, Mar 12, 2025 at 09:53:17AM +0300, Dan Carpenter wrote: > > Hello Chiara Meiohas, > > > > Commit 61e51682816d ("RDMA/uverbs: Introduce UCAP (User CAPabilities) > > API") from Mar 6, 2025 (linux-next), leads to the following Smatch > > static checker warning: > > > > drivers/infiniband/core/ucaps.c:209 ib_release_ucap() > > error: buffer overflow 'ucaps_list' 2 <= 2 (assuming for loop doesn't break) > > The thing is that we must have "break", so writing if(WARN_ON(type == > "RDMA_UCAP_MAX)) return;" instead of existing WARN_ON is very > misleading. > Ah, never mind. I got confused between kref_put() and kobject_put(). It's the kobject_release() function that can optionally do the release in another thread. Sorry for the noise. regards, dan carpenter