All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
	kernel test robot <oliver.sang@intel.com>
Subject: Re: [bigeasy-staging:futex_local_v6] [futex]  865221325b: WARNING:at_lib/rcuref.c:#rcuref_put_slowpath
Date: Fri, 17 Jan 2025 09:49:35 +0100	[thread overview]
Message-ID: <87r051akps.ffs@tglx> (raw)
In-Reply-To: <20250116233137.v8s-FDdH@linutronix.de>

On Fri, Jan 17 2025 at 00:31, Sebastian Andrzej Siewior wrote:
> On 2024-12-31 16:41:41 [+0800], kernel test robot wrote:
>> [  184.841511][T52159] rcuref - imbalanced put()
>> [  184.841536][T52159] WARNING: CPU: 64 PID: 52159 at lib/rcuref.c:267 rcuref_put_slowpath+0x66/0x70
>
> after hours of yelling and cursing:
>
>       ref  = 0 (via rcuref_init(ref, 1))
>  T1                                      T2
>  rcuref_put(ref)
>  -> atomic_add_negative_release(-1, ref)                                         # ref -> 0xffffffff
>  -> rcuref_put_slowpath(ref)
>                                          rcuref_get(ref)
>                                          -> atomic_add_negative_relaxed(1, &ref->refcnt)
>                                            -> return true;                       # ref -> 0
>
>                                          rcuref_put(ref)
>                                          -> atomic_add_negative_release(-1, ref) # ref -> 0xffffffff
>                                          -> rcuref_put_slowpath()
>
>     -> cnt = atomic_read(&ref->refcnt);                                          # cnt -> 0xffffffff / RCUREF_NOREF
>     -> atomic_try_cmpxchg_release(&ref->refcnt, &cnt, RCUREF_DEAD))              # ref -> 0xe0000000 / RCUREF_DEAD
>        -> return true
>                                            -> cnt = atomic_read(&ref->refcnt);   # cnt -> 0xe0000000 / RCUREF_DEAD
>                                            -> if (cnt > RCUREF_RELEASED)         # 0xe0000000 > 0xc0000000
>                                              -> WARN_ONCE(cnt >= RCUREF_RELEASED, "rcuref - imbalanced put()")

Duh. Indeed.

That's a nasty one. Let me think about it.


  reply	other threads:[~2025-01-17  8:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-31  8:41 [bigeasy-staging:futex_local_v6] [futex] 865221325b: WARNING:at_lib/rcuref.c:#rcuref_put_slowpath kernel test robot
2025-01-16 23:31 ` Sebastian Andrzej Siewior
2025-01-17  8:49   ` Thomas Gleixner [this message]
2025-01-17 10:03     ` Thomas Gleixner
2025-01-20 17:08       ` Sebastian Andrzej Siewior

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=87r051akps.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.