Re: [PATCH v2] debugobjects: stop accessing objects after releasing spinlock
From: Thomas Gleixner
Date: Fri Oct 13 2023 - 09:15:46 EST
On Mon, Sep 25 2023 at 15:13, Andrzej Hajda wrote:
> After spinlock release object can be modified/freed by concurrent thread.
> Using it in such case is error prone, even for printing object state.
It cannot be freed. If that happens then the calling code will have an
UAF problem on the tracked item too.
If there is a concurrent modification then again, the calling code is
lacking serialization on the tracked object.
debugobject fundamentally relies on the call site being consistent
simply because it _cannot_ invoke the fixup callbacks with the hash
bucket lock held.
What's the actualy problem you are trying to solve here. The changelog
does not explain anything except of handwaving about modified/freed.
Thanks,
tglx