From patchwork Tue Oct 2 20:57:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 148016 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp5627754lji; Tue, 2 Oct 2018 13:58:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV62cWZPeOZfO12n7vpyTRftLVHsOZzLScvTEmNGiJB5h3SaitMHbu2g6BNlYU6ZXWMuxj9BZ X-Received: by 2002:a17:902:585:: with SMTP id f5-v6mr18585895plf.7.1538513912480; Tue, 02 Oct 2018 13:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538513912; cv=none; d=google.com; s=arc-20160816; b=bSnr05Y9Sb12A+uujKAcE3nzkS5TDBv5OBVs0GAsBGAS7Hbaoqcm/wdlyvsXVaD5O9 t9wwFE6dC2XrFSEOFOnb841vUt+W5IHsqhmMArEG+FU5Uc+nUVTuOp2NSCXjIzjmyFaH XWpeCn7FtSEVmqhBmOu8eqqasANfMSyhIzFsA0+e5CaqRM1GIbGYTpydTxqNgv7ZN3zi n9CSE6o6NBycO+yFEFOi+JKcZEyjb2zMBYXlGS5Pi8H+ldn6klQH/pss8XxLrgqFPpUd 1Z7B4udagQw8qaNc3/KiVf2TYq0tAAYi0JEg5W5Yy5NHSrjKGbymSfgeDxXYAXCGJM52 pwkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=wYvM2qT3LF9HtBoxz775Tsh0VKWcKSTgGjZkbkU1Tsc=; b=Dx6/l3i6sOfadZi4aph3/Sn64HvX5mXIybr5XYIP3ZAvRtlLV4I8PRcwyN/5Ho2moH g0x+NXF3zIKy4cWDZ68vzLETTCA0LBr2f0Uq4VCdDnBlJ3Qm4pxl/VcYzjBDpJAPPVI5 q8zQ7GCKuUsFaLVtmiOllyDae3y24sz9tOrq5+9tvjDcRUteRl2g3uzv5fWntOUcbxGN xMFwaY5u3TkHXAppihjtUIweeJth1ASgu0QxZX2hWmDG/Om3JnnWIZhypBwf+0nSveJ1 i5L11wqO1mn4jBkKJkfvycAc3tltQXIhXoHS41L9ZIXxN/hapijxTB31HYPXpdXOlcvd BJ2Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si16741067pld.281.2018.10.02.13.58.32; Tue, 02 Oct 2018 13:58:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727783AbeJCDnn (ORCPT + 32 others); Tue, 2 Oct 2018 23:43:43 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:40189 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726572AbeJCDnn (ORCPT ); Tue, 2 Oct 2018 23:43:43 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1N336J-1fjtXd3F7N-013Jow; Tue, 02 Oct 2018 22:58:12 +0200 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1N336J-1fjtXd3F7N-013Jow; Tue, 02 Oct 2018 22:58:12 +0200 From: Arnd Bergmann To: Trond Myklebust Cc: Arnd Bergmann , Anna Schumaker , "J. Bruce Fields" , Jeff Layton , "David S. Miller" , Stephen Hemminger , James Ettle , linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] SUNRPC: use cmpxchg64() in gss_seq_send64_fetch_and_inc() Date: Tue, 2 Oct 2018 22:57:46 +0200 Message-Id: <20181002205809.2300654-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:lNyES8Q4W/wdnZs89Ag72TAXAvvZEjO3c58E63gJn5ORXq5fJFl 7q2VzekIUqco2jvxaLm6+ujxajDMqFjoc55sEVj5kODYVRvSMyZYYNitej4SS+e44GnAx1w 8XoMiqcSiPIXUIA9ziMrcYcMVt5fo2cuX8Wenwy3dHgIKp3ZQCL4dRFFcCYIm5/muzWql7m jgwNYPEDutDD9yW2LWi9w== X-UI-Out-Filterresults: notjunk:1; V01:K0:mVHGP47/Cb0=:YOQWVq148YCWBGdaCEiTdX c4GEMvdhAvlpOIPciZLv7jszxefpOMMfr3TMXQgsqXV6kuKeh1VoBj/QNE2bMtHWB8Nmd4ZQz a0B0OeDuaZf2abKzNrVGiFjf4PdlPWWngGbyWkLvEWkgKdLQjJVYTN/Lv4D+OFawvNLoi8TPB MoSqG3/Q1GQL6Bft12LKivKdm7Z4+BCT5zXqGZqcUqaBVS86/l+L8r/rnjxlDe+6GD/DnqXWY PZRCBJICs+kAkxWKGvs596olN2C7XcQzArqjMNsMY4hoSzIET7hk61SL/F5gebcbJXxE4kjSg 74FoaTdlRDUjrs7xQd8NyWn0prp/RHAB1SxItplrAhIs2ACGmIH8bZnEB5gvCY2rgqRg4eqUg 9ZTdZdbcOx033f7LHZYa63EpF76xd1zF+V8Yy5vt1BSv+Iu2euKs2nCZGC0OIPh4t2R0vvKr3 e5oyYO/DQccpZ2w4uGODab4BfKPGEEYptWTxqmdaRDnKBPqrx+nSxrimXPnMIJDXH9nnATYlp qYhfCie7rL7fLFyjC67mfGTkQhFhjjJEj6cwUiezFjGCrsFi93g1L1pdRLG2VPtQQXd2jM/vP pRA2GOls9LkLOiFl5KdN/0mptdp1V3IUZBYy1s3Ltg4ajpDFw4p0atLmoweP93rE61KShPw/x v9epkf5lGe/B35wt3TeNAIfl9+y8mtZ8FNOVU0Bwwkwp6VxG7uqCIeJjiFMvVH9tu40Q= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly introduced gss_seq_send64_fetch_and_inc() fails to build on 32-bit architectures: net/sunrpc/auth_gss/gss_krb5_seal.c:144:14: note: in expansion of macro 'cmpxchg' seq_send = cmpxchg(&ctx->seq_send64, old, old + 1); ^~~~~~~ arch/x86/include/asm/cmpxchg.h:128:3: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg __cmpxchg_wrong_size(); \ As the message tells us, cmpxchg() cannot be used on 64-bit arguments, that's what cmpxchg64() does. Fixes: 571ed1fd2390 ("SUNRPC: Replace krb5_seq_lock with a lockless scheme") Signed-off-by: Arnd Bergmann --- net/sunrpc/auth_gss/gss_krb5_seal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.18.0 diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c index 92594681d619..5775b9805bdc 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seal.c +++ b/net/sunrpc/auth_gss/gss_krb5_seal.c @@ -141,7 +141,7 @@ gss_seq_send64_fetch_and_inc(struct krb5_ctx *ctx) do { old = seq_send; - seq_send = cmpxchg(&ctx->seq_send64, old, old + 1); + seq_send = cmpxchg64(&ctx->seq_send64, old, old + 1); } while (old != seq_send); return seq_send; }