diff options
-rw-r--r-- | include/linux/compat.h | 2 | ||||
-rw-r--r-- | include/linux/syscalls.h | 2 | ||||
-rw-r--r-- | kernel/futex.c | 15 | ||||
-rw-r--r-- | kernel/futex_compat.c | 12 |
4 files changed, 16 insertions, 15 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index ef5cd192784c..f4ebf96f5308 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -163,7 +163,7 @@ asmlinkage long | |||
163 | compat_sys_set_robust_list(struct compat_robust_list_head __user *head, | 163 | compat_sys_set_robust_list(struct compat_robust_list_head __user *head, |
164 | compat_size_t len); | 164 | compat_size_t len); |
165 | asmlinkage long | 165 | asmlinkage long |
166 | compat_sys_get_robust_list(int pid, compat_uptr_t *head_ptr, | 166 | compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr, |
167 | compat_size_t __user *len_ptr); | 167 | compat_size_t __user *len_ptr); |
168 | 168 | ||
169 | long compat_sys_semctl(int first, int second, int third, void __user *uptr); | 169 | long compat_sys_semctl(int first, int second, int third, void __user *uptr); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 3efcfc7e9c6c..b0ace3fd7eb9 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -593,7 +593,7 @@ asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); | |||
593 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | 593 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, |
594 | unsigned int flags); | 594 | unsigned int flags); |
595 | asmlinkage long sys_get_robust_list(int pid, | 595 | asmlinkage long sys_get_robust_list(int pid, |
596 | struct robust_list_head __user **head_ptr, | 596 | struct robust_list_head __user * __user *head_ptr, |
597 | size_t __user *len_ptr); | 597 | size_t __user *len_ptr); |
598 | asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, | 598 | asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, |
599 | size_t len); | 599 | size_t len); |
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 | /* |
diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c index c5cca3f65cb7..50f24eea6cd0 100644 --- a/kernel/futex_compat.c +++ b/kernel/futex_compat.c | |||
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | static inline int | 19 | static inline int |
20 | fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry, | 20 | fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry, |
21 | compat_uptr_t *head, int *pi) | 21 | compat_uptr_t __user *head, int *pi) |
22 | { | 22 | { |
23 | if (get_user(*uentry, head)) | 23 | if (get_user(*uentry, head)) |
24 | return -EFAULT; | 24 | return -EFAULT; |
@@ -62,7 +62,7 @@ void compat_exit_robust_list(struct task_struct *curr) | |||
62 | &head->list_op_pending, &pip)) | 62 | &head->list_op_pending, &pip)) |
63 | return; | 63 | return; |
64 | if (upending) | 64 | if (upending) |
65 | handle_futex_death((void *)pending + futex_offset, curr, pip); | 65 | handle_futex_death((void __user *)pending + futex_offset, curr, pip); |
66 | 66 | ||
67 | while (compat_ptr(uentry) != &head->list) { | 67 | while (compat_ptr(uentry) != &head->list) { |
68 | /* | 68 | /* |
@@ -70,7 +70,7 @@ void compat_exit_robust_list(struct task_struct *curr) | |||
70 | * dont process it twice: | 70 | * dont process it twice: |
71 | */ | 71 | */ |
72 | if (entry != pending) | 72 | if (entry != pending) |
73 | if (handle_futex_death((void *)entry + futex_offset, | 73 | if (handle_futex_death((void __user *)entry + futex_offset, |
74 | curr, pi)) | 74 | curr, pi)) |
75 | return; | 75 | return; |
76 | 76 | ||
@@ -78,7 +78,7 @@ void compat_exit_robust_list(struct task_struct *curr) | |||
78 | * Fetch the next entry in the list: | 78 | * Fetch the next entry in the list: |
79 | */ | 79 | */ |
80 | if (fetch_robust_entry(&uentry, &entry, | 80 | if (fetch_robust_entry(&uentry, &entry, |
81 | (compat_uptr_t *)&entry->next, &pi)) | 81 | (compat_uptr_t __user *)&entry->next, &pi)) |
82 | return; | 82 | return; |
83 | /* | 83 | /* |
84 | * Avoid excessively long or circular lists: | 84 | * Avoid excessively long or circular lists: |
@@ -103,10 +103,10 @@ compat_sys_set_robust_list(struct compat_robust_list_head __user *head, | |||
103 | } | 103 | } |
104 | 104 | ||
105 | asmlinkage long | 105 | asmlinkage long |
106 | compat_sys_get_robust_list(int pid, compat_uptr_t *head_ptr, | 106 | compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr, |
107 | compat_size_t __user *len_ptr) | 107 | compat_size_t __user *len_ptr) |
108 | { | 108 | { |
109 | struct compat_robust_list_head *head; | 109 | struct compat_robust_list_head __user *head; |
110 | unsigned long ret; | 110 | unsigned long ret; |
111 | 111 | ||
112 | if (!pid) | 112 | if (!pid) |