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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 49388C0650F for ; Mon, 5 Aug 2019 05:57:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1821C217D9 for ; Mon, 5 Aug 2019 05:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564984652; bh=CluuMJNOmsHOA+mAZyMfZg778egHHWNYSrWjkWdY6cI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Ggxclp8raaROhODIruIazNasakvEcBM7QBcwulDMIyg7iQORC7+g2oQxw5pm/mfjf 2uo4axE65lfaxn0E/BdNkngfh/MFfKNXrAMhXqgGYL5+4/FrwVhc+hzaUmLhn5Nsbb r+WBairKrKXVdvsXgzcQ/3Cj+ujeHmh5f/78XFAA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727259AbfHEF53 (ORCPT ); Mon, 5 Aug 2019 01:57:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:44124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725951AbfHEF52 (ORCPT ); Mon, 5 Aug 2019 01:57:28 -0400 Received: from localhost (unknown [77.137.115.125]) (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 0961B20657; Mon, 5 Aug 2019 05:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564984647; bh=CluuMJNOmsHOA+mAZyMfZg778egHHWNYSrWjkWdY6cI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LEnRxcXU43u2fZXKbn6MhQzNUjxbHOrdqfVA1Y0H/3qTz5hhcdCwvvAxMtGuObd4k 6S/gfgGtA1mzMSK0vwmWmonBjHg7SeOvW1gEJc1OnMp3kZIyssFGVFqpo0g8YXmHYI y7xrk7M3Sn88ATaKkP+Ys7RbQqz5rj4Hcn2SgbcY= Date: Mon, 5 Aug 2019 08:57:23 +0300 From: Leon Romanovsky To: Chuhong Yuan Cc: Saeed Mahameed , "David S . Miller" , Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org, Netdev , LKML Subject: Re: [PATCH 0/3] Use refcount_t for refcount Message-ID: <20190805055723.GM4832@mtr-leonro.mtl.com> References: <20190802121035.1315-1-hslester96@gmail.com> <20190804124820.GH4832@mtr-leonro.mtl.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, Aug 04, 2019 at 10:58:19PM +0800, Chuhong Yuan wrote: > On Sun, Aug 4, 2019 at 8:48 PM Leon Romanovsky wrote: > > > > 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. > > > > It is my fault... I am not clear how to send patches which cross > several subsystems, so I sent them in series. > Maybe I should merge these patches together? In case of conversion patches, yes, you need to perform such change in one shot. > > > > NAK, to be clear. > > > > And please don't sent series of patches as standalone patches. > > > > Due to the reason mentioned above, I sent them seperately. Create patch, run ./scripts/get_maintainer.pl on it and send according to generated output. You are not doing kernel core changes and there is no need to worry about cross subsystem complexity as long as you will put relevant maintainers in TO: field. Thanks > > > Thanks,