[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e56577db-b94c-4f38-868b-dd3be65f780d@acm.org>
Date: Fri, 7 Feb 2025 18:52:48 -0800
From: Bart Van Assche <bvanassche@....org>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Marco Elver <elver@...gle.com>, Nick Desaulniers <ndesaulniers@...gle.com>,
Alexander Aring <aahringo@...hat.com>, Will Deacon <will@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Boqun Feng <boqun.feng@...il.com>,
Mark Rutland <mark.rutland@....com>, thunder.leizhen@...wei.com,
jacob.e.keller@...el.com, Andrew Morton <akpm@...ux-foundation.org>,
Sparse Mailing-list <linux-sparse@...r.kernel.org>,
cluster-devel <cluster-devel@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC 0/2] refcount: attempt to avoid imbalance warnings
On 6/30/22 9:34 AM, Linus Torvalds wrote:
> On Thu, Jun 30, 2022 at 6:59 AM Alexander Aring <aahringo@...hat.com> wrote:
>>
>> I send this patch series as RFC because it was necessary to do a kref
>> change after adding __cond_lock() to refcount_dec_and_lock()
>> functionality.
>
> Can you try something like this instead?
>
> This is two separate patches - one for sparse, and one for the kernel.
>
> This is only *very* lightly tested (ie I tested it on a single kernel
> file that used refcount_dec_and_lock())
>
> Linus
(replying to an email from two years ago -- see also
https://lore.kernel.org/linux-kernel/CAHk-=wjZfO9hGqJ2_hGQG3U_XzSh9_XaXze=HgPdvJbgrvASfA@mail.gmail.com/)
Hi Luc,
Are there any plans to add support for __cond_acquires() in sparse?
Marco Elver (Cc-ed) and I are looking into enabling the Clang
-Wthread-safety compiler flag for Linux kernel code. If we want to keep the
sparse locking annotations, a first step would be to convert all
__cond_lock() annotations into __cond_acquires(). When I tried to make
that change I noticed that sparse does not yet support
__cond_acquires(). Hence my question about the plan to support
__cond_acquires() in sparse?
Thanks,
Bart.
Powered by blists - more mailing lists