linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "arnd@arndb.de" <arnd@arndb.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jlayton@kernel.org" <jlayton@kernel.org>,
	"bfields@fieldses.org" <bfields@fieldses.org>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"james@ettle.org.uk" <james@ettle.org.uk>,
	"anna.schumaker@netapp.com" <anna.schumaker@netapp.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: Re: [PATCH] SUNRPC: use cmpxchg64() in gss_seq_send64_fetch_and_inc()
Date: Fri, 5 Oct 2018 13:36:19 +0000	[thread overview]
Message-ID: <7c783e6ecca13af5ae603b75689a377e7a8a4855.camel@hammerspace.com> (raw)
In-Reply-To: <20181002205809.2300654-1-arnd@arndb.de>

On Tue, 2018-10-02 at 22:57 +0200, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
> ---
>  net/sunrpc/auth_gss/gss_krb5_seal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
>  }

Thanks Arndt! Applied.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



      reply	other threads:[~2018-10-05 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 20:57 [PATCH] SUNRPC: use cmpxchg64() in gss_seq_send64_fetch_and_inc() Arnd Bergmann
2018-10-05 13:36 ` Trond Myklebust [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c783e6ecca13af5ae603b75689a377e7a8a4855.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=anna.schumaker@netapp.com \
    --cc=arnd@arndb.de \
    --cc=bfields@fieldses.org \
    --cc=davem@davemloft.net \
    --cc=james@ettle.org.uk \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).