diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-10-10 17:46:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-10 18:37:22 -0400 |
commit | ba46df984b8e8114c3cf19c51670fab084bd4196 (patch) | |
tree | ed41e3a2278dfc22bd7fda59e99d8c74af8f429d /kernel/futex.c | |
parent | 28c4dadd3a7221f5b9cd5c7d03c499788b193353 (diff) |
[PATCH] __user annotations: futex
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index 4aaf91951a43..b364e0026191 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -1612,10 +1612,10 @@ sys_set_robust_list(struct robust_list_head __user *head, | |||
1612 | * @len_ptr: pointer to a length field, the kernel fills in the header size | 1612 | * @len_ptr: pointer to a length field, the kernel fills in the header size |
1613 | */ | 1613 | */ |
1614 | asmlinkage long | 1614 | asmlinkage long |
1615 | sys_get_robust_list(int pid, struct robust_list_head __user **head_ptr, | 1615 | sys_get_robust_list(int pid, struct robust_list_head __user * __user *head_ptr, |
1616 | size_t __user *len_ptr) | 1616 | size_t __user *len_ptr) |
1617 | { | 1617 | { |
1618 | struct robust_list_head *head; | 1618 | struct robust_list_head __user *head; |
1619 | unsigned long ret; | 1619 | unsigned long ret; |
1620 | 1620 | ||
1621 | if (!pid) | 1621 | if (!pid) |
@@ -1694,14 +1694,15 @@ retry: | |||
1694 | * Fetch a robust-list pointer. Bit 0 signals PI futexes: | 1694 | * Fetch a robust-list pointer. Bit 0 signals PI futexes: |
1695 | */ | 1695 | */ |
1696 | static inline int fetch_robust_entry(struct robust_list __user **entry, | 1696 | static inline int fetch_robust_entry(struct robust_list __user **entry, |
1697 | struct robust_list __user **head, int *pi) | 1697 | struct robust_list __user * __user *head, |
1698 | int *pi) | ||
1698 | { | 1699 | { |
1699 | unsigned long uentry; | 1700 | unsigned long uentry; |
1700 | 1701 | ||
1701 | if (get_user(uentry, (unsigned long *)head)) | 1702 | if (get_user(uentry, (unsigned long __user *)head)) |
1702 | return -EFAULT; | 1703 | return -EFAULT; |
1703 | 1704 | ||
1704 | *entry = (void *)(uentry & ~1UL); | 1705 | *entry = (void __user *)(uentry & ~1UL); |
1705 | *pi = uentry & 1; | 1706 | *pi = uentry & 1; |
1706 | 1707 | ||
1707 | return 0; | 1708 | return 0; |
@@ -1739,7 +1740,7 @@ void exit_robust_list(struct task_struct *curr) | |||
1739 | return; | 1740 | return; |
1740 | 1741 | ||
1741 | if (pending) | 1742 | if (pending) |
1742 | handle_futex_death((void *)pending + futex_offset, curr, pip); | 1743 | handle_futex_death((void __user *)pending + futex_offset, curr, pip); |
1743 | 1744 | ||
1744 | while (entry != &head->list) { | 1745 | while (entry != &head->list) { |
1745 | /* | 1746 | /* |
@@ -1747,7 +1748,7 @@ void exit_robust_list(struct task_struct *curr) | |||
1747 | * don't process it twice: | 1748 | * don't process it twice: |
1748 | */ | 1749 | */ |
1749 | if (entry != pending) | 1750 | if (entry != pending) |
1750 | if (handle_futex_death((void *)entry + futex_offset, | 1751 | if (handle_futex_death((void __user *)entry + futex_offset, |
1751 | curr, pi)) | 1752 | curr, pi)) |
1752 | return; | 1753 | return; |
1753 | /* | 1754 | /* |