Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp1613179ybh; Sun, 4 Aug 2019 05:50:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyG1brcuV/SqttfVC/Gsd0GJFeUgCNH0O/MYTWwc/9204e2UDeuHxs3Q7CgunlPeLJvindu X-Received: by 2002:a62:e815:: with SMTP id c21mr71148691pfi.244.1564923033065; Sun, 04 Aug 2019 05:50:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564923033; cv=none; d=google.com; s=arc-20160816; b=TFoDQxT/OdEyWz/l3Cng9gL4jWKcRr6iX+bL9pinUkNnHduffOMne4UbNcCbCQosG8 Ak4Aau3q/QTTT9GWI/1/vN8nNysMWbst+D1Qc7UP5t23IUSU+PapIiIfoUBcFa2E6xoL T6JWuWd2++mADFLto+3ktqRLA4/BMi86v+VqHfJbGtK7XR/wfX5ZONiVlP0kszypagV2 d8jCLIulzw6sABerESHsY8GPs/U/h003Zmk60BoolE88TjJFWiJtV5NgxYMeubN1cF41 RVhfC/Xue5wgGkfWQPcIDdXu2H+Ozm67DN8tOTQjk6xoENGK9amUNxifdzvOjQUc+AIh qmpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=yj87rjALkZsmUet+qLbuZVt6WubONCVEKfTPdchgLhE=; b=CB2/rjtgeK4/OnlEyEwy6u5/wkI1T/XK3qrZ0cvMQ6X01ndlT4qxukRMxWf8mbyy8p LVZB4owbR/A1SyxwtBXP6iqjdU7AceLUSrQs/sFwqsCecBFiWyw9A2NKcHDkMznMMVQU 3Srws0+NpEl/BXZN3eVXj1CORE8UoXr9Q+iGuuWw/6JW87orfviuUC5f9WMc1ld5GpSc KOc/zxeDmDg0HwrCU/vj5f2o849oKHLQNU55+0sEGU5FbFwtGXV9YHwxvZOFuu7Vs+aw LYAnLUlTx7L5Hubd5RpYfDI4BNzNott9W0RdfjiRiJqLWWmZIFy+54sbfvydNFQZjiWh pRNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NFs8EhQd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si8729984pgq.148.2019.08.04.05.50.04; Sun, 04 Aug 2019 05:50:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NFs8EhQd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726237AbfHDMsZ (ORCPT + 99 others); Sun, 4 Aug 2019 08:48:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:39926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbfHDMsZ (ORCPT ); Sun, 4 Aug 2019 08:48:25 -0400 Received: from localhost (unknown [193.47.165.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 29D262070D; Sun, 4 Aug 2019 12:48:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564922903; bh=yj87rjALkZsmUet+qLbuZVt6WubONCVEKfTPdchgLhE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NFs8EhQd7fZZqMybyc5Pl8gMTlCvdXe+005j54lsecueU3CN88bIy16/ibaZpxiZJ BK5KPJtVBJ6evdaHN3J2zf/ZPTFkGNTf3SUbVBvM3393pYKZhbiF5M0803FUzFgD1E 0anLtYtkw58/wPznPh52dqiVppTA55zTZEWH1eUQ= Date: Sun, 4 Aug 2019 15:48:20 +0300 From: Leon Romanovsky To: Chuhong Yuan Cc: Saeed Mahameed , "David S . Miller" , Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] Use refcount_t for refcount Message-ID: <20190804124820.GH4832@mtr-leonro.mtl.com> References: <20190802121035.1315-1-hslester96@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190802121035.1315-1-hslester96@gmail.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 02, 2019 at 08:10:35PM +0800, Chuhong Yuan wrote: > Reference counters are preferred to use refcount_t instead of > atomic_t. > This is because the implementation of refcount_t can prevent > overflows and detect possible use-after-free. > > First convert the refcount field to refcount_t in mlx5/driver.h. > Then convert the uses to refcount_() APIs. You can't do it, because you need to ensure that driver compiles and works between patches. By converting driver.h alone to refcount_t, you simply broke mlx5 driver. NAK, to be clear. And please don't sent series of patches as standalone patches. Thanks,