Yes, if wait is set, it's on the stack.
Hmm yes, double checking it and it would seem to leak for wait &&
kmalloc'ed data. I think I originally had the wait case as always on
stack, which would explain this leak.
Alright, I'll make 'wait' always alloc on the stack and I'll make
allocation failure turn into 'wait' as well. That'll leave just
kmalloc() and stack allocation, killing the static data fallback.
No, I think that should work ok. I'll post a new series with the changes
so we can see if we agree.
--
Jens Axboe
--