From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 529C9C433F5 for ; Wed, 25 May 2022 06:10:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241044AbiEYGK1 (ORCPT ); Wed, 25 May 2022 02:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240020AbiEYGKZ (ORCPT ); Wed, 25 May 2022 02:10:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1AB46EB38 for ; Tue, 24 May 2022 23:10:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E03D3B8172B for ; Wed, 25 May 2022 06:10:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2966CC385B8; Wed, 25 May 2022 06:10:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653459020; bh=ErBOykNRjfTy0nNY+gAscNbc4sXmHKb211mDR3SRUG8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Kmc2JW9KuDBPe8ZX13COLPrN3bgW0GqZkrtTFiYvdOS9sf4dB8Jk5EeQfcVx2tE0j f/hcPmievBUhaCDN7YpjtloSLW2yr5bqIhPCLpnC+qssnaPx4Vn5VLTaiC3dSn/px9 PM/FPit5QcqQjLE7G/WtvsIUKYoUyR7Y+mdICobT/24cbloNgd79U/yIc9k87dyR6U y0VE0QZ2GIgqDPSwXCmBepHKE4VfniTzwnp0VSWTEpNa2kY4XFRhw5MGjjRDe3VOdo C6iSr6ALkt3G4pBP0oktXxhWfO5oT2TIXLUSc5PfYZXVyT23tFYgFyiU21LooWc3Ld +BE05z+GWSvcw== Date: Wed, 25 May 2022 09:10:16 +0300 From: Leon Romanovsky To: Ryan Stone Cc: linux-rdma@vger.kernel.org Subject: Re: Possible bug in ipoib_reap_dead_ahs in datagram mode Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Tue, May 24, 2022 at 03:18:53PM -0400, Ryan Stone wrote: > I believe that if we never enter that if statement, then we will leak > the entries that are supposed to be cleaned up. That's better than > the use-after-free that I feared but still not good. I don't know, we are running enhanced IPoIB all the time and I never got any reports about kmemleaks/KASAN in that area. Thanks > > On Tue, May 24, 2022 at 3:08 PM Leon Romanovsky wrote: > > > > On Tue, May 24, 2022 at 09:33:52AM -0400, Ryan Stone wrote: > > > On Tue, May 24, 2022 at 3:07 AM Leon Romanovsky wrote: > > > > IPoIB in mlx5 is HW offloaded version of ulp/ipoib one. AFAIK, it doesn't > > > > change "tx_tail" and we won't enter into this if (...). > > > > > > > > Thanks > > > > > > I don't quite follow this response. Is this the if statement that you > > > mean that we won't fall into? > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/infiniband/ulp/ipoib/ipoib_ib.c#n682 > > > > Yes, I think so, maybe wrong here.