Re: [PATCH 25/25] ipc: don't use [delayed_]work_pending()
From: Borislav Petkov
Date: Mon Dec 24 2012 - 14:41:03 EST
On Mon, Dec 24, 2012 at 10:45:20AM -0800, Tejun Heo wrote:
> I was confused a bit there. We can't. Nothing guarantees that the
> queuer sees the cleared PENDING before the work item starts execution,
> and I think ipc memory hotplug could also be broken from that.
Stupid question: why not clear PENDING after execution is done? I'm
looking at process_one_work() here.
> It's highly unlikely to actually happen and there may be external
> locking which prevents the race from actually happening, but there's
> nothing synchronizing queueing and the execution of the work item.
> Looking at that part of code only, it's possible that it fails to
> queue the work item after a memory hotplug event even though the
> previous queueing already started execution and processed a couple
> notifiers.
Maybe failure to queue could be signalled with a proper return value
from __queue_work()?
Btw, I'm afraid I don't understand the "memory hotplug event" aspect and
how that can influence the queueing - all it does it is list_add_tail,
basically.
Thanks.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/