Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp712313pxb; Wed, 20 Jan 2021 19:36:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBrbFsTkbr6O/coMwrzHlDkppKl+SlE72TD40q+O4QkdK8R6GcN80uVxj0bRuz9EkcMR3+ X-Received: by 2002:a17:906:404a:: with SMTP id y10mr7793836ejj.331.1611200176053; Wed, 20 Jan 2021 19:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611200176; cv=none; d=google.com; s=arc-20160816; b=axBsqeLTK0APbuo2iSPfetnsyfmmrpMws5ixOg64qutquQwhaZbLufrU3/ZsyzaZcM /2b6H6hZUpKwI1lS9DSWiYtFWBKZIcA/Dh2oDFDhShVU9PpZP+4n5r7xMiSxIujbLAB+ o73Z1/zJdL0yh7CAsrgCJP7qJ2Eppo7TdAD0wm7uwpXn2YY97v4sk5A9tK5lBKbGH/w6 3QhSgAut6ZHPOGHdlxIACdPTPjDANNGfFWBuyyXWAZecnMmIf/CUF7c8H9HYNo9xcZx6 gwxPjmI+Vq5AqIRiKInkzYFrgqRlZEEQjrBIpXRKhHVxZWVzwwzi2dYCcpqC1Gu3/2SG +Afg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:user-agent:date:message-id:subject:cc:from:to :dkim-signature; bh=BQ+C6cxMr+NFXAiwMQZbpz+U43nbXJpB0nxvOmHbDDk=; b=rBVWVKzRzyqnaDVqP3XpI28vbQPeRroCr8Kfc6PK9PvqCdKAN7loZC43Wcg83hkngF PoKI7UMQHqUeC30Bk0N61GgMBXLwGtbaGt4+2eFwrK4jQEeRXaLgC8Sel9xsHX2MRZyj cHCxPXeTNxQEf+BMp5ig5mKynBD77dBmUQCWtgiWhrWoUdvt/XsD4YCkS8Y+X3jQnZay TeXQIm6IjXc6D3u6MXuh51pgeufBZD6ak9oFvZrA7vfUwnVOKKGRRBfPVgqCHlADtdBI q3JzpHDvdp2kvvhf6t5t5EJWZM8q8wYLAOWB8HpBNLnndAYFf+MQxh3G0m3AaaHHxxWM VB2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=GBSSYqKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si1521545edv.443.2021.01.20.19.35.52; Wed, 20 Jan 2021 19:36:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=google header.b=GBSSYqKs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730129AbhAUCjJ (ORCPT + 99 others); Wed, 20 Jan 2021 21:39:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404041AbhATXxX (ORCPT ); Wed, 20 Jan 2021 18:53:23 -0500 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B58DDC0613C1 for ; Wed, 20 Jan 2021 15:52:38 -0800 (PST) Received: by mail-io1-xd36.google.com with SMTP id d13so560784ioy.4 for ; Wed, 20 Jan 2021 15:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=to:from:cc:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=BQ+C6cxMr+NFXAiwMQZbpz+U43nbXJpB0nxvOmHbDDk=; b=GBSSYqKse4GktCQQv1dhwdvucvIBHv6a/8vYcZZzt8CglYaJuMkWvupsAJ2XJDpCRX sBWqCBvysBMQEml1P36301Da/reVbbo3/GOvU0v0FYphlDUpsy3UvS4H78YcWJLmbkmu E1xXCOfh1iCVA0orsq5z+fa5LtZnuv+0AIF5c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:cc:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=BQ+C6cxMr+NFXAiwMQZbpz+U43nbXJpB0nxvOmHbDDk=; b=g8RagtQ2304XwYrVrgWka4hmem9mN/Pe80CnaEAEM1+ncMV/Xah5zWONelaZkJnJnx eMLYGgO3XBxxZisvEdsqebZ63/c0Yfz3c7TeC7a9o805qgj8s0Lr2WgMEI/ZvrQyTEaH Bh4Qp/dg0SQSe/nTfBg+6hqy9bT1rgcEixzppD+7s/nFblagKeCEe5H2cq1V6JV4ZoOo jvxJkG8k1Jv6D/Ki9swg3jI+egtaW/NsOOb1RcpAyxTLEjSSuAiRvvn45z9sPwTACmK6 FWm0y9NTIb92ui3/xd/zAvEC46t/6sk3+uSesjpaGC/bouNyohc7fmJKbzVRV4JTDdxe 425w== X-Gm-Message-State: AOAM5335Ud2emKOD2p4hQEGVFeYfOZwdKXP2/xFmsDcIcWFScurSnLMf 1V8UB4lF+bLte7SN7ase4/qu9V+PQD9wNw== X-Received: by 2002:a6b:7f45:: with SMTP id m5mr8559311ioq.180.1611186757822; Wed, 20 Jan 2021 15:52:37 -0800 (PST) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id a5sm1819555ilq.60.2021.01.20.15.52.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Jan 2021 15:52:37 -0800 (PST) To: Anna.Schumaker@netapp.com, trond.myklebust@hammerspace.com From: Shuah Khan Cc: "J. Bruce Fields" , chuck.lever@oracle.com, "David S. Miller" , kuba@kernel.org, linux-nfs@vger.kernel.org, Networking , Linux Kernel Mailing List Subject: rpc_xprt_debugfs_register() - atomic_inc_return() usage Message-ID: <06c8f6ff-f821-e909-d40c-9de98657729f@linuxfoundation.org> Date: Wed, 20 Jan 2021 16:52:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anna and Trond, I came across the following while reviewing atomic_inc_return() usages that cast return value to unsigned rpc_xprt_debugfs_register()'s atomic_inc_return() usage looks a bit odd. - cur_id isn't initialized - id = (unsigned int)atomic_inc_return(&cur_id); Please note that id is int. Is it expected that cur_id could overflow? Is there a maximum limit for this value? thanks, -- Shuah