Thread (5 messages) 5 messages, 3 authors, 2021-01-26

Re: [PATCH] btrfs: fix lockdep warning due to seqcount_mutex_init() with wrong address

From: Davidlohr Bueso <dave@stgolabs.net>
Date: 2021-01-26 18:48:29
Also in: linux-btrfs

On Mon, 25 Jan 2021, David Sterba wrote:
IMO it's not, though some kind of annotation could be useful. The patch
introducing the seqcount mutex does not mention any warning so it's
probably meant only for clarity of the lock nesting or maybe real-time
related as there are some comments regarding that in seqlock.h.
That lockdep_assert_held() is just to verify the writer side is properly
serialized. The real-time aspects here does not apply in that the mutex
is always preemptible.
Even for a dynamic allocation we'd need a way to synchronize setting the
variable, it could be possible, but the lockdep report needs to be
fixed. Right now I don't see another way than the revert.
Agreed, let's revert this until a proper workaround is found.

Thanks,
Davidlohr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help