Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp1615509ybh; Sun, 4 Aug 2019 05:54:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRDe5jLuw+CDKuZO7T2CgU5WxKGbxZ6fg55LGsEeaghgiokc4UvzV4mlMJ6eZSlYnOzMtz X-Received: by 2002:a17:902:a60d:: with SMTP id u13mr141244649plq.144.1564923246885; Sun, 04 Aug 2019 05:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564923246; cv=none; d=google.com; s=arc-20160816; b=oQYkrL5GyI1fHZnIvV87wowZGgikU8SA6xY54ETxug5hrhN3d8YOGMbFdu5UUAK4xi cXGmylyjNpFP0H+qqpMuH7hnmtxjKVI0bH3bffWtSJ/5CQ8f8VsVK9gtLGkKuSjiBL3U V7zE/xyI8qCf84SrNL/B2hviTqNdoo07Eq3CvmfH6tj3Ms9Zn8OKIesU529QkEL6NsAA 5oE+mgarJci3c8D+Qc4qSryps/2i+DKLFO1Qtdm51SfIaNvcp5WGc0ZKYESg1ierbdaD sW3wDH0Zr+Qso+9eYks3mRaszJZx546aTbRFraRfIjB/t8280h5R5B979Ckeg+9H3Qn5 76BQ== 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=20vYG+ljgiKaXahymCdfC2494ou8CPYTL2EkGApzmWA=; b=c7TGE64WxbAtQrRyQ5BCH7J9ub52zui8+sx29tPyh2dpVPcoMOHW2P1DRd5PoGELGW DcSDS5xbiIfIKkcNj9z2gECbhqzbsB3GYvK4Lq4UL4Xw1NyIE7OAwvUSZlO9dfAInl6R y+YTN6Ob2ev2y1jnTf9NjbBVikFyKzMt49bNw/XmvNFwNivjHXP6vOqW5VgGcJXZ2Ulp usTH2Ct3bPrvU6282FKFpfZ5O9N0VqKYqb8G2udDY9gjDZQsFYuu71zA0b3OGkbTjAg2 RzzsfdY/JrDE6kaP9U318VSGlCbOSjcNwct4XPTMqmGrpaksMDOoQuv22vKwsFyw//Y3 HKXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rsE8Cs+e; 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 i198si41730321pfe.228.2019.08.04.05.53.51; Sun, 04 Aug 2019 05:54:06 -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=rsE8Cs+e; 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 S1726333AbfHDMwx (ORCPT + 99 others); Sun, 4 Aug 2019 08:52:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:41546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726039AbfHDMwx (ORCPT ); Sun, 4 Aug 2019 08:52:53 -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 C4E70206C1; Sun, 4 Aug 2019 12:52:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564923172; bh=CUiOp/mIeBCbY/ngTZBhtLw3Og7NrQM1xMiLk8WCzZo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rsE8Cs+eR48j5AKhlQbv+yGh7FBBQttX0No0RCfXq9MrsfUU4vb7Tq7xMk5Odoir7 SUaaEbaqJxjcEklT4piX/1eXsI7Kor7FCcI8iI3Pgb3vtaevBihmLacRZ0riMKMpoF 6/2VSuqAEtPyJT/sNi12M83G2zTuLUsSlY4MVEpY= Date: Sun, 4 Aug 2019 15:52:49 +0300 From: Leon Romanovsky To: Chuhong Yuan Cc: Saeed Mahameed , "David S . Miller" , Doug Ledford , Jason Gunthorpe , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] Use refcount_t for refcount Message-ID: <20190804125249.GI4832@mtr-leonro.mtl.com> References: <20190802172334.8305-1-hslester96@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190802172334.8305-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 Sat, Aug 03, 2019 at 01:23:34AM +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. > > Changelog: > > v1 -> v2: > - Add #include in include/linux/mlx5/driver.h. The same NAK as for version v0. Thanks