On Wed, 28 Sep 2011 11:57:24 +0200, Daniel Vetter <[email protected]> wrote:
> + char __user *end = uaddr + size - 1;
...
> + if (ret == 0) {
> + if (((unsigned long)uaddr & PAGE_MASK) !=
> + ((unsigned long)end & PAGE_MASK))
> + ret = __put_user(0, end);
> + }
This is wrong -- if size == PAGE_SIZE, then we'll be doing an extra
write at 'end' every time (and, I imagine that's a common case).
And, you mentioned a 'better' fix?
--
[email protected]
pgpuhipvyOjfK.pgp
Description: PGP signature
_______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
