[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1211301233320.8688@dhcp-1-104.brq.redhat.com>
Date: Fri, 30 Nov 2012 12:36:35 +0100 (CET)
From: Lukáš Czerner <lczerner@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Lukas Czerner <lczerner@...hat.com>, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, axboe@...nel.dk, jmoyer@...hat.com,
Neil Brown <neilb@...e.de>
Subject: Re: [PATCH 1/2 v3] wait: add wait_event_lock_irq() interface
On Fri, 30 Nov 2012, Andrew Morton wrote:
> Date: Fri, 30 Nov 2012 02:48:42 -0800
> From: Andrew Morton <akpm@...ux-foundation.org>
> To: Lukas Czerner <lczerner@...hat.com>
> Cc: linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org, axboe@...nel.dk,
> jmoyer@...hat.com, Neil Brown <neilb@...e.de>,
> David Howells <dhowells@...hat.com>, Ingo Molnar <mingo@...e.hu>,
> Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Subject: Re: [PATCH 1/2 v3] wait: add wait_event_lock_irq() interface
>
> On Fri, 30 Nov 2012 11:42:40 +0100 Lukas Czerner <lczerner@...hat.com> wrote:
>
> > New wait_event{_interruptible}_lock_irq{_cmd} macros added. This commit
> > moves the private wait_event_lock_irq() macro from MD to regular wait
> > includes, introduces new macro wait_event_lock_irq_cmd() instead of using
> > the old method with omitting cmd parameter which is ugly and makes a use
> > of new macros in the MD. It also introduces the _interruptible_ variant.
> >
> > The use of new interface is when one have a special lock to protect data
> > structures used in the condition, or one also needs to invoke "cmd"
> > before putting it to sleep.
> >
> > All new macros are expected to be called with the lock taken. The lock
> > is released before sleep and is reacquired afterwards. We will leave the
> > macro with the lock held.
> >
> > Note to DM: IMO this should also fix theoretical race on waitqueue while
> > using simultaneously wait_event_lock_irq() and wait_event() because of
> > lack of locking around current state setting and wait queue removal.
>
> Does this fix the sparse warning which Fengguang just sent us?
Which report from Fengguang do you have in mind ? I do not see any
on linux-kernel today.
/me going to see what spare reports
-Lukas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists