Messages in this thread | | | Date | Thu, 23 Dec 1999 10:26:43 +0000 (GMT) | From | Tigran Aivazian <> | Subject | is make_pages_present() what I was looking for? |
| |
Hello people,
Recently I needed some way of attacking the classical problem of walking a spinlock-protected linked list while copying some node data to userspace.
A minute ago I noticed email from Scott Henry <scotth@sgi.com> asking about map_user_kiobuf() and looking in the relevant source code I found make_pages_present() which seems to be exactly what I wanted.
Can someone confirm that it is valid to do something like this:
if (make_pages_present(uaddr, uaddr + count)) return -EFAULT; lock a spinlock while (walking linked list) { examine the data and, if needed __copy_to_user(uaddr, kaddr, size) } unlock a spinlock
But if that works why isn't it done in the places that need it?
Thanks in advance, ------ Tigran A. Aivazian | http://www.sco.com Escalations Research Group | tel: +44-(0)1923-813796 Santa Cruz Operation Ltd | http://www.ocston.org/~tigran
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |