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 X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D957AC6377D for ; Thu, 22 Jul 2021 14:01:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B20D96128C for ; Thu, 22 Jul 2021 14:01:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232170AbhGVNU7 (ORCPT ); Thu, 22 Jul 2021 09:20:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:36686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232138AbhGVNU7 (ORCPT ); Thu, 22 Jul 2021 09:20:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E10D161244; Thu, 22 Jul 2021 14:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626962494; bh=eiDxxd//gnTbTNSR24XDd8/FL9m8NuhTNJPdqWZj7iY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OhpD7MPGE8Mux2cJOYR9tnhkNrpjHxjAj+cIha8er718rnErTvOM0XsI56POTzNOL DI5sqzSpg2gh+s4k/pZOhzLQPpZ7SLuyOozq3HzHyWrVtrcR+M/UwEqH9VznuPLg+t StoU0Z9/mRBVdH+PY/99jB6APmLuE4L4cgfx3pYy2lepHzFHlZOp289t3TusVLfD4b t+sLRvKikaRXCy6Zn+qm9TJOkye7xzVuHPRobYI9Du7Tlj04zSQGHzkWoFd4pw//xv l2l1f8QUy47qNwhjIJfuFLVjIrr6YPWSA3x9UW0PaWhzOMJcOcYcnJnUTx8WpiPSzG DS/dMEnb+MPxA== Date: Thu, 22 Jul 2021 17:01:30 +0300 From: Leon Romanovsky To: Jason Gunthorpe Cc: Dakshaja Uppalapati , dledford@redhat.com, linux-rdma@vger.kernel.org, bharat@chelsio.com Subject: Re: [PATCH for-rc] iw_cxgb4: Fix refcount underflow while destroying cqs. Message-ID: References: <1626866515-17895-1-git-send-email-dakshaja@chelsio.com> <20210722120607.GE1117491@nvidia.com> <20210722130231.GI1117491@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210722130231.GI1117491@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Thu, Jul 22, 2021 at 10:02:31AM -0300, Jason Gunthorpe wrote: > On Thu, Jul 22, 2021 at 03:57:39PM +0300, Leon Romanovsky wrote: > > > We are talking about two different issues that this refcount_read patch pointed. > > You are focused on wrong usage of completion, I saw useless compare of > > refcount_t with 0 that can't be. > > It can be zero. Anything that does refcount_dec_and_test() can make > the refcount be zero. It can be, but it is not the case at least for iwpm. Thanks