Alan Cox <email@example.com> wrote:
> > ret = -EINVAL;
> > - if (n < 0)
> > + if (n <= 0)
> > goto out_nofds;
> This is incorrect. In fact the zero kmalloc if anything is harmless. A
> 0 fd select is legal and used for timers
Can you elaborate on this? I'm not disputing it, but I'd like to
understand what difference things make if the kmalloc isnt taken.
My understanding is that with the existing code, if n=0, we kmalloc 0
bytes, fail, and goto out_nofds. With my patch, if n=0, we goto out_nofds.
(Or am I missing something obvious here?)
The 'We ought to optimise the n=0 case - it is used enough.'
kind of made me scratch my head a little too..
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:15 EST