Messages in this thread | | | Date | Sun, 3 Mar 2013 14:34:00 -0800 | Subject | Re: [RFC][PATCH] making vfree() safe from interrupt contexts | From | Linus Torvalds <> |
| |
On Sun, Mar 3, 2013 at 10:47 AM, Al Viro <viro@zeniv.linux.org.uk> wrote: > To bring back the thing discussed back in, IIRC, December: we have > a bunch of places where inability to do vfree() from interrupt contexts > (the most common case is doing that from RCU callback) leads to very > ugly open-coded schemes that delay it one way or another. We can let vfree() > itself do that instead. AFAICS, it works; the diff below covers several > obvious cases found just by grep. I'm fairly sure that there's more code > that could benefit from that...
I have nothing against the patch, but I hate seeing it just before I am getting ready to close the merge window.
And I'm not willing to apply it, since I think it's buggy: the whole point of deferred_vfree() is that it is for irq context, yet it's not using an irq-safe lock. So nested interrupts can deadlock.
So I think the concept is fine, the patch is probably fine after just changing the spinlock to be irq-safe, but the timing is horrible. It doesn't seem to be *that* urgent, so maybe you could just put it in your queue for 3.10 after fixing the irq locking?
Linus
| |