Re: [PATCH v3 02/12] block/bdev: Annotate the blk_holder_ops callback invocations

Marco Elver
2026-04-13T06:01:22Z

On Sat, 11 Apr 2026 at 01:44, Bart Van Assche <bvanassche@acm.org> wrote:
>
> On 4/10/26 3:43 PM, Marco Elver wrote:
> > Can you retry? Thanks!
>
> Thanks, this works much better! However, I think there is still an issue
> with this new version: no compiler warning is emitted if one function
> pointer is assigned to another function pointer and the lock context
> annotations of the two pointers differ.

For now, that's intended - focus is on getting rid of false positives.
Doing what you suggest above would require abusing the attributes to
effectively become type qualifiers; that's generally questionable,
because that's not what attributes are meant to do (and reworking TSA
to provide real type-qualifiers is an intrusion into the type system
that's also a hard sell). So for now, I'll try to do the simpler
change, and later may look into adding -Wthread-safety specific
warnings that points out such mismatches.