Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2860574pxv; Sun, 18 Jul 2021 03:47:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+V1J7jpgQnrZW2hTu4L5vzRIwdOEPZu+nlRk1nlzPX6KZexpvqhsltJkUYqBH/YdZgWl1 X-Received: by 2002:aa7:d98d:: with SMTP id u13mr28339722eds.238.1626605270544; Sun, 18 Jul 2021 03:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626605270; cv=none; d=google.com; s=arc-20160816; b=Gbwlge/Z9CT3xNuH1nHW3NC8vbb96XTWrsq/T5O1duWBWjHAOI/AJDAehwp8RiAmVw kSxzl4u878ltW4IZtgTzE8NNpW8HiDNIHo/3H6PAA3nIzxWupe60zMpzMIMhCR8HrYwF 1byP5lelkT+1jm8lmtJI+eoMbDezjN3MuVWwm2TGrwv37IxZoixTOgHv2XEUaxbHxlr8 kB8iyw+bnlei6zPIB+Ohl+7J8X+NtV5HWVh6Ily5HNEeSeZOUYUTuwjTxR5qS4r9lvuo CMxByui1XJ6FeCFJCtqjJ9ds/2X/m9XgyWWvMiIKC4sho11EZiEBERl3Hm1hWmxvSVQa Jfog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iY/3rfgs6FMsMr+YOe4dH11jsxGV0Qk3ngHz028ld8Q=; b=LrjI0aWkPg4x+X62MEidv0JHB9TZcD66yhRFr/6L3YWDmUbPWwn5iyYy4S8e261XBe XVpfMK0Wd8STT7Al+oO5n18fBqlVo7cqr042vJwFAUzJhRXQJY4J/5W2sVujysUBoRKl 0aZa8TaQOYPu/pUl2FmqDyNPGPJvX7vWUiqZyiZXFFiej2BTxluHX/EGVELYq33odBFO 9s3USqd1XK1hSlCllquZS3ZF1l4qt00YT+8nfKBbmSK3Sn1wA42occRQsHYP+zRtNmH6 K2z+M7SLKlYyh4zGRAILWMRFw+ebeBGm5jqtWZFeN53JW/lD+R+hqIK9vtxMyOy/GNNb eiEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NBjoiK9W; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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. [23.128.96.18]) by mx.google.com with ESMTP id nc28si16673081ejc.235.2021.07.18.03.47.13; Sun, 18 Jul 2021 03:47:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NBjoiK9W; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 S232358AbhGRKuK (ORCPT + 99 others); Sun, 18 Jul 2021 06:50:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:60136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231836AbhGRKuJ (ORCPT ); Sun, 18 Jul 2021 06:50:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 158B56100A; Sun, 18 Jul 2021 10:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626605231; bh=UK4GyKvDfMGN0HjWigqnE/GTzdduZA9HuEDZ3yQX1/U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NBjoiK9W6M7W7DapoBXfo5EzDnNXce7pTNlTSKlFFED87herxsfuw7A43gkE0H1ck Ghegt54o5zMuxWF38OedFLvLn5UPfulIG5F7ol3g8zZHSXB0ACIbOy6+85PJkunZPT hrnTNxICCLufm3YmEoAA8RbK3lOh4aurCJgk6YxnrLHWotJCJUc1PLsIxGKwrqeU1Z 7dTtuZMc2VF9jewWKwe64colsObZlGDqIhmAoiHuDDypi2VpaR7QqwTcpBHufFHwy0 3yUlHUltzUK4W6gD3NMZN2yebVG8Ao3vdSlbkZbUj7IkHnzchsiN3F1a40DBaF/Uze oBs8X0sBe/YqQ== Date: Sun, 18 Jul 2021 13:47:08 +0300 From: Leon Romanovsky To: Trond Myklebust Cc: "tanxin.ctf@gmail.com" , "xiyuyang19@fudan.edu.cn" , "davem@davemloft.net" , "chuck.lever@oracle.com" , "linux-kernel@vger.kernel.org" , "kolga@netapp.com" , "kuba@kernel.org" , "netdev@vger.kernel.org" , "bfields@fieldses.org" , "anna.schumaker@netapp.com" , "linux-nfs@vger.kernel.org" , "yuanxzhang@fudan.edu.cn" Subject: Re: [PATCH] SUNRPC: Convert from atomic_t to refcount_t on rpc_clnt->cl_count Message-ID: References: <1626517112-42831-1-git-send-email-xiyuyang19@fudan.edu.cn> <1f12b3569565fa8590b45cc2fbe7c176ca7c5184.camel@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1f12b3569565fa8590b45cc2fbe7c176ca7c5184.camel@hammerspace.com> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sat, Jul 17, 2021 at 02:43:26PM +0000, Trond Myklebust wrote: > On Sat, 2021-07-17 at 18:18 +0800, Xiyu Yang wrote: > > refcount_t type and corresponding API can protect refcounters from > > accidental underflow and overflow and further use-after-free > > situations. > > > > Have you tested this patch? As far as I remember, the reason why we > never converted is that refcount_inc() gets upset and WARNs when you > bump a zero refcount, like we do very much on purpose in > rpc_free_auth(). Is that no longer the case? It is still the case, they sent gazillion conversion patches with same mistake. Thanks > > > -- > Trond Myklebust > Linux NFS client maintainer, Hammerspace > trond.myklebust@hammerspace.com > >