This is an excellent point. If someone is holding a lock
across a uaccess function and userspace has passed the address
of a valid but not-present page we will hit the "atomic copy_user"
path. Userspace will be returned an EFAULT and will be left
scratching its head, wondering what it did wrong.
Or the kernel will deadlock, of course.
I don't think we need to add the check to anything other than
ia32. That will pick up the great bulk of any problems, and
arch-specific code won't be doing these copies much anyway.
So if you could prepare a patch which adds these checks for
ia32 it would be muchly appreciated.
And if you're feeling really keen, Dave Jones has a patch which
makes the might_sleep check a real config option rather than
overloading CONFIG_DEBUG_KERNEL - would be nice to squeeze that
out of him if poss.
Thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/