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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 EA6CEC63793 for ; Thu, 22 Jul 2021 13:24:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD33E61285 for ; Thu, 22 Jul 2021 13:24:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbhGVMn2 (ORCPT ); Thu, 22 Jul 2021 08:43:28 -0400 Received: from stargate.chelsio.com ([12.32.117.8]:37727 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231924AbhGVMn2 (ORCPT ); Thu, 22 Jul 2021 08:43:28 -0400 Received: from localhost (potato2.blr.asicdesigners.com [10.193.80.129]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id 16MDNxw4014101; Thu, 22 Jul 2021 06:24:00 -0700 Date: Thu, 22 Jul 2021 18:53:59 +0530 From: Dakshaja Uppalapati To: Jason Gunthorpe Cc: dledford@redhat.com, linux-rdma@vger.kernel.org, bharat@chelsio.com, dakshaja@chelsio.com Subject: Re: [PATCH for-rc] iw_cxgb4: Fix refcount underflow while destroying cqs. Message-ID: <20210722132358.GA26076@chelsio.com> 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> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Thursday, July 07/22/21, 2021 at 10:02:31 -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. > > The issue here is that refcount_dec() cannot make the refcount zero as > it is improper use of the API. Hi Jason I didn't understood properly. Can you please tell that the current patch for cxgb4 is still wrong? Thanks Dakshaja