From: Bart Van Assche <bvanassche@acm.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Marco Elver <elver@google.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Alexander Aring <aahringo@redhat.com>,
Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Boqun Feng <boqun.feng@gmail.com>,
Mark Rutland <mark.rutland@arm.com>,
thunder.leizhen@huawei.com, jacob.e.keller@intel.com,
Andrew Morton <akpm@linux-foundation.org>,
Sparse Mailing-list <linux-sparse@vger.kernel.org>,
cluster-devel <cluster-devel@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 0/2] refcount: attempt to avoid imbalance warnings
Date: Fri, 7 Feb 2025 18:52:48 -0800 [thread overview]
Message-ID: <e56577db-b94c-4f38-868b-dd3be65f780d@acm.org> (raw)
In-Reply-To: <CAHk-=wjZfO9hGqJ2_hGQG3U_XzSh9_XaXze=HgPdvJbgrvASfA@mail.gmail.com>
On 6/30/22 9:34 AM, Linus Torvalds wrote:
> On Thu, Jun 30, 2022 at 6:59 AM Alexander Aring <aahringo@redhat.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.
prev parent reply other threads:[~2025-02-08 2:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 13:59 [RFC 0/2] refcount: attempt to avoid imbalance warnings Alexander Aring
2022-06-30 13:59 ` [RFC 1/2] refcount: add __cond_lock() for conditional lock refcount API Alexander Aring
2022-06-30 15:43 ` Peter Zijlstra
2022-06-30 13:59 ` [RFC 2/2] kref: move kref_put_lock() callback to caller Alexander Aring
2022-06-30 16:34 ` [RFC 0/2] refcount: attempt to avoid imbalance warnings Linus Torvalds
2022-07-01 8:47 ` Peter Zijlstra
2022-07-01 12:07 ` Alexander Aring
2022-07-01 19:09 ` Alexander Aring
2025-02-08 2:52 ` Bart Van Assche [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=e56577db-b94c-4f38-868b-dd3be65f780d@acm.org \
--to=bvanassche@acm.org \
--cc=aahringo@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=boqun.feng@gmail.com \
--cc=cluster-devel@redhat.com \
--cc=elver@google.com \
--cc=jacob.e.keller@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=mark.rutland@arm.com \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=thunder.leizhen@huawei.com \
--cc=torvalds@linux-foundation.org \
--cc=will@kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).