[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJwJo6YZNtdsQuGyk6=YDj9QzvktfYeNc5FTi-qw5ttQDVoJ0w@mail.gmail.com>
Date: Thu, 13 Dec 2018 05:54:47 +0000
From: Dmitry Safonov <0x7f454c46@...il.com>
To: sergey.senozhatsky.work@...il.com
Cc: Dmitry Safonov <dima@...sta.com>, longman@...hat.com,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
open list <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
yang.shi@...ux.alibaba.com, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] debugobjects: Move printk out of db lock critical sections
On Thu, 13 Dec 2018 at 05:19, Sergey Senozhatsky
<sergey.senozhatsky.work@...il.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
Powered by blists - more mailing lists