]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: use cmpxchg64() in gss_seq_send64_fetch_and_inc()
authorArnd Bergmann <arnd@arndb.de>
Tue, 2 Oct 2018 20:57:46 +0000 (22:57 +0200)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 5 Oct 2018 13:32:37 +0000 (09:32 -0400)
commitffc911f951773387543f47767fca086b5567d745
treea0a212a1bda8125bb93bfb9fe33bacf2349018bf
parent9763121815070e77905b848a2aa87b86e16b0f4a
SUNRPC: use cmpxchg64() in gss_seq_send64_fetch_and_inc()

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: 8a4dd176ecbd ("SUNRPC: Replace krb5_seq_lock with a lockless scheme")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/auth_gss/gss_krb5_seal.c