[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] bugfix for drivers/char/mem.c
>I see the problem. Can I suggest a simpler fix, based on the fact
>that vread() returns 0 when count == 0?
>
>- *ppos += p + virtr;
>+ *ppos += read + virtr;
Sure if you prefer it.
The main reason I added the if(count) { ... } was just to avoid
calling vread() when count is zero (since in this case there's no
entry to find on the vmlist, and hence the for loop in vread() will
just iterate over all vmalloc()'d areas before returning zero.)
S.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/