On Thu, 13 Dec 2018 at 05:19, Sergey Senozhatsky <sergey.senozhatsky.w...@gmail.com> wrote: > > On (12/13/18 04:35), Dmitry Safonov wrote: > > I've tried to review it and found minor issues like missed > > debug_object_is_on_stack() for initializing already active object. > > > > But than I come to opinion that it's just generally unsafe: > > debug_obj life-time is protected by bucket's spin_lock. > > Check the conditions when free_object() is being called. > > I thought about it for a second, but couldn't figure out if this race > was real. > > E.g. uart case - if there are two paths which concurrently free and > access debug object, then the same race condition should exist for > the xmit.buf page. debug object's lifespan should be the same as the > lifespan of, ummm, whatever the thing that debug object is attached > to? I'm surely missing something here.
I think the point of debugobjects is to reduce the damage caused by an improper life-time of objects. IIUC: 1. alloc_page() 2. dynamically allocate a workqueue on a new page 3. schedule some work 4. until the work has run free_page() So, wroqueue fixup upon freeing should cancel the work TBD. But maybe I've misunderstood something.. And it's 6 am in my timezone, I'll catch some sleep and will glance this with some morning coffee. Thanks, Dmitry