Thread (15 messages) 15 messages, 3 authors, 2011-12-22

Re: [PATCH RFC] virtio_net: fix refill related races

From: Rusty Russell <hidden>
Date: 2011-12-14 23:51:00
Also in: lkml, virtualization

On Mon, 12 Dec 2011 13:54:06 +0200, "Michael S. Tsirkin" [off-list ref] wrote:
On Mon, Dec 12, 2011 at 09:25:07AM +1030, Rusty Russell wrote:
quoted
Orthogonally, the refill-stop code is still buggy, as you noted.
Sorry I don't understand how it's still buggy.
Both places where we call:

	cancel_delayed_work_sync(&vi->refill);

Do not actually guarantee that vi->refill isn't running, because it
can requeue itself.  A 'bool no_more_refill' field seems like the
simplest fix for this, but I don't think it's sufficient.

Tejun, is this correct?  What's the correct way to synchronously stop a
delayed_work which can "schedule_delayed_work(&vi->refill, HZ/2);" on
itself?

Thanks,
Rusty.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help