Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp1709691ybh; Sun, 4 Aug 2019 07:59:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSnEAC29CzE7twzB06JQPdcQBBO225pH4L+u3l2B8+Jgb8l4rSspJvresq5BR+CHuDA9Km X-Received: by 2002:a17:90a:8b98:: with SMTP id z24mr13920727pjn.77.1564930762041; Sun, 04 Aug 2019 07:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564930762; cv=none; d=google.com; s=arc-20160816; b=mSIBowE7eGTmNCFxFbnl3Xxokx1uDfjvA6yVspdrt8uIdFhehCGnp0N1gXh2H5iBn0 Mw31YhCXnQ6v3+cJdC9D89GUYEFgLG+3KXBE5/sc942ZAVdXbCdY4Nb+4mGkQiInkNqU Y0xQtocsjTaPN2Gr6nSMO0DZPg3SYpVRFtHDuXN3ecK370hUybhc7efa3eHRWkaRFhA5 IEF8jgT+08czDaqITlylgOzZV8h7YybnJalvp7uRI8MsuL+9aLYufPf/jjcrGym6UYtp hDegtRlMPACdkNxE8Uj2RO5GErEp0BglCathnoHwPXmJhGNwDy0gWCFyo4AUlJnL76OS ENeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vxyYB1Aq9u4CCTpYWtWmXj3GAEknEiHUBIBc1JvXqZs=; b=fGKnV+zNUN6UycnQ9BiMKrL0E2TFXQkcza7szscLh/dNRe5fGxKHOxKmXsxVXnmNyx PNekxP+Mn7IuDbvn6u5JVb2BE8OmYI84BF6IoXHXbKQdA1i8E9DQhHQ/h024v1MPSnL/ xyuRtJD8ba3F3czHL571i/y7ddkUIuJMrYYXQqRBIK588RA4mRXCjFvvCv1DXCvzB9o0 KhU4CzSCDD50RSRBBXxjiPgy3HhMhx0bK2sxJsQOOdzAbSSSnlMk+zkOU60ZPDf0sPOH M4Nw5+AncbXAHVaJlP9+OHFWjFf6Ch7aOTFJJTUGc439yGh+cBUKPPxd8Oul/EQJpVk7 z7Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="daW/hpWP"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si38494441plk.166.2019.08.04.07.59.07; Sun, 04 Aug 2019 07:59:22 -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=@gmail.com header.s=20161025 header.b="daW/hpWP"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726440AbfHDO6d (ORCPT + 99 others); Sun, 4 Aug 2019 10:58:33 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:37181 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbfHDO6c (ORCPT ); Sun, 4 Aug 2019 10:58:32 -0400 Received: by mail-ed1-f67.google.com with SMTP id w13so76515821eds.4; Sun, 04 Aug 2019 07:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vxyYB1Aq9u4CCTpYWtWmXj3GAEknEiHUBIBc1JvXqZs=; b=daW/hpWPxtNOzuktRo0A4gQ2yUzkZfbJxd9czvuxIjrNDZ3kewOTxxDAPEBAFgsVPV /QWn6AF2V/LZL81XZvo4dNgUw9gdpW2Ac8OJiWkOvGs+n7myp1OAd10W65/fj57g6t+k iGyBhtmahI2Hm/8TfMWlZwMgLp+KyirFR8CMK3TNkKR/8BOoH94yyZgpNElZXf9Cr3Sm IxqCh9oVzjdSWAq5/CxJ1In77rw3DMBUgXyysW8PuzjyRqRi4JMDqs6vnqfMU5a7lH9u bWn/jbBjMkWUpowsf4M2oIlItzynJ5N1mcyGCgZqQ7QqAkaSh8mEk5JxzJaJUB1nyRWM YSTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vxyYB1Aq9u4CCTpYWtWmXj3GAEknEiHUBIBc1JvXqZs=; b=q9O6KDNeWTe+AwQM0PNmgM3VmtBDjgZwh63nNd5jBdi4gYg/bgQZCbkhmQ9kNrANfH Dq8+cxUahw8QXbuVgQMJHvOdEADIVn1qZl0RINSSx6oom2SDcJQuCopBGOmUJuBOdWFp jiRbZHt6R1oyUr+kPHkK6FXUdTXhgY+IQbMcddiY/u7+q36GbPh6Bkgsm3UCXvQezaid TmNOn/IGEh+n0sxBBZHhmuk4U0TUkcfGRu1wIlFnI5Z8EwScxt3EvxC40plK4yPJFgiV YvvDd+NNzDB2LP1cY8cwNNb5AfB4Cd4UEFhhItXXEn4XLptxzVcW6fxHYi1E3F5Pd3pJ mLDQ== X-Gm-Message-State: APjAAAVMDF3SrxptUTkUnNI9+QOGl3nC1HCZ0BPsa0G9gXZCGut0cbIV 3f+JT0QWrbk2CNPq7QEsCn5Mt2qtwTA50m030fs= X-Received: by 2002:a17:906:32c2:: with SMTP id k2mr21513931ejk.147.1564930710909; Sun, 04 Aug 2019 07:58:30 -0700 (PDT) MIME-Version: 1.0 References: <20190802121035.1315-1-hslester96@gmail.com> <20190804124820.GH4832@mtr-leonro.mtl.com> In-Reply-To: <20190804124820.GH4832@mtr-leonro.mtl.com> From: Chuhong Yuan Date: Sun, 4 Aug 2019 22:58:19 +0800 Message-ID: Subject: Re: [PATCH 0/3] Use refcount_t for refcount To: Leon Romanovsky Cc: Saeed Mahameed , "David S . Miller" , Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org, Netdev , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > 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. > Thanks,