linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "kernel test robot" <lkp@intel.com>,
	"David Howells" <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Linux Memory Management List" <linux-mm@kvack.org>
Subject: Re: [linux-next:master 7115/7300] ld.lld: error: undefined symbol: __bad_xchg
Date: Wed, 13 Dec 2023 11:31:41 +0100	[thread overview]
Message-ID: <08daec27-c762-457d-b576-7f8fa722765c@app.fastmail.com> (raw)
In-Reply-To: <202312131823.hO2NP34f-lkp@intel.com>

On Wed, Dec 13, 2023, at 11:05, kernel test robot wrote:

> commit: 4a0d72ea10ce156eb2 [7115/7300] afs:  Overhaul invalidation handling to better support RO volumes
> config: arm-randconfig-003-20231213 
> (https://download.01.org/0day-ci/archive/20231213/202312131823.hO2NP34f-lkp@intel.com/config)
> All errors (new ones prefixed by >>):
>
>>> ld.lld: error: undefined symbol: __bad_xchg
>    >>> referenced by callback.c
>    >>>               fs/afs/callback.o:(__afs_break_callback) in 
> archive vmlinux.a
>    >>> referenced by rotate.c
>    >>>               fs/afs/rotate.o:(afs_select_fileserver) in archive 
> vmlinux.a

I saw the same thing, and this seems to be broken on all 32-bit
architectures:

@@ -79,9 +79,9 @@ void __afs_break_callback(struct afs_vnode *vnode, enum afs_cb_break_reason reas
        _enter("");
 
        clear_bit(AFS_VNODE_NEW_CONTENT, &vnode->flags);
-       if (test_and_clear_bit(AFS_VNODE_CB_PROMISED, &vnode->flags)) {
+       if (xchg(&vnode->cb_expires_at, AFS_NO_CB_PROMISE) != AFS_NO_CB_PROMISE) {
                vnode->cb_break++;

I tried to replace this with xchg64(), but that only exists on
one architectures (unlike cmpxchg64(), which is on most but not
all 32-bit ones).

If this has to be an atomic operation, the only portable way I see
is to change cb_expires_at into an atomic64_t and modify
all references to use atomic operations.

     Arnd


      reply	other threads:[~2023-12-13 10:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-13 10:05 kernel test robot
2023-12-13 10:31 ` Arnd Bergmann [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=08daec27-c762-457d-b576-7f8fa722765c@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=dhowells@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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