diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cred.h | 6 | ||||
-rw-r--r-- | include/linux/mm.h | 12 | ||||
-rw-r--r-- | include/linux/netlink.h | 2 | ||||
-rw-r--r-- | include/linux/of.h | 7 | ||||
-rw-r--r-- | include/linux/sched.h | 1 | ||||
-rw-r--r-- | include/linux/socket.h | 6 |
6 files changed, 26 insertions, 8 deletions
diff --git a/include/linux/cred.h b/include/linux/cred.h index 98f46efbe2d2..40308969ed00 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -269,7 +269,7 @@ static inline void put_cred(const struct cred *_cred) | |||
269 | * since nobody else can modify it. | 269 | * since nobody else can modify it. |
270 | */ | 270 | */ |
271 | #define current_cred() \ | 271 | #define current_cred() \ |
272 | (*(__force struct cred **)¤t->cred) | 272 | rcu_dereference_protected(current->cred, 1) |
273 | 273 | ||
274 | /** | 274 | /** |
275 | * __task_cred - Access a task's objective credentials | 275 | * __task_cred - Access a task's objective credentials |
@@ -307,7 +307,7 @@ static inline void put_cred(const struct cred *_cred) | |||
307 | #define get_current_user() \ | 307 | #define get_current_user() \ |
308 | ({ \ | 308 | ({ \ |
309 | struct user_struct *__u; \ | 309 | struct user_struct *__u; \ |
310 | struct cred *__cred; \ | 310 | const struct cred *__cred; \ |
311 | __cred = current_cred(); \ | 311 | __cred = current_cred(); \ |
312 | __u = get_uid(__cred->user); \ | 312 | __u = get_uid(__cred->user); \ |
313 | __u; \ | 313 | __u; \ |
@@ -322,7 +322,7 @@ static inline void put_cred(const struct cred *_cred) | |||
322 | #define get_current_groups() \ | 322 | #define get_current_groups() \ |
323 | ({ \ | 323 | ({ \ |
324 | struct group_info *__groups; \ | 324 | struct group_info *__groups; \ |
325 | struct cred *__cred; \ | 325 | const struct cred *__cred; \ |
326 | __cred = current_cred(); \ | 326 | __cred = current_cred(); \ |
327 | __groups = get_group_info(__cred->group_info); \ | 327 | __groups = get_group_info(__cred->group_info); \ |
328 | __groups; \ | 328 | __groups; \ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index f2690cf49827..fd599f4bb846 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -962,6 +962,8 @@ int invalidate_inode_page(struct page *page); | |||
962 | #ifdef CONFIG_MMU | 962 | #ifdef CONFIG_MMU |
963 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 963 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
964 | unsigned long address, unsigned int flags); | 964 | unsigned long address, unsigned int flags); |
965 | extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, | ||
966 | unsigned long address, unsigned int fault_flags); | ||
965 | #else | 967 | #else |
966 | static inline int handle_mm_fault(struct mm_struct *mm, | 968 | static inline int handle_mm_fault(struct mm_struct *mm, |
967 | struct vm_area_struct *vma, unsigned long address, | 969 | struct vm_area_struct *vma, unsigned long address, |
@@ -971,6 +973,14 @@ static inline int handle_mm_fault(struct mm_struct *mm, | |||
971 | BUG(); | 973 | BUG(); |
972 | return VM_FAULT_SIGBUS; | 974 | return VM_FAULT_SIGBUS; |
973 | } | 975 | } |
976 | static inline int fixup_user_fault(struct task_struct *tsk, | ||
977 | struct mm_struct *mm, unsigned long address, | ||
978 | unsigned int fault_flags) | ||
979 | { | ||
980 | /* should never happen if there's no MMU */ | ||
981 | BUG(); | ||
982 | return -EFAULT; | ||
983 | } | ||
974 | #endif | 984 | #endif |
975 | 985 | ||
976 | extern int make_pages_present(unsigned long addr, unsigned long end); | 986 | extern int make_pages_present(unsigned long addr, unsigned long end); |
@@ -988,8 +998,6 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
988 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 998 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
989 | struct page **pages); | 999 | struct page **pages); |
990 | struct page *get_dump_page(unsigned long addr); | 1000 | struct page *get_dump_page(unsigned long addr); |
991 | extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, | ||
992 | unsigned long address, unsigned int fault_flags); | ||
993 | 1001 | ||
994 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | 1002 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); |
995 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 1003 | extern void do_invalidatepage(struct page *page, unsigned long offset); |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 2e17c5dbdcb8..180540a84d37 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #define MAX_LINKS 32 | 29 | #define MAX_LINKS 32 |
30 | 30 | ||
31 | struct sockaddr_nl { | 31 | struct sockaddr_nl { |
32 | sa_family_t nl_family; /* AF_NETLINK */ | 32 | __kernel_sa_family_t nl_family; /* AF_NETLINK */ |
33 | unsigned short nl_pad; /* zero */ | 33 | unsigned short nl_pad; /* zero */ |
34 | __u32 nl_pid; /* port ID */ | 34 | __u32 nl_pid; /* port ID */ |
35 | __u32 nl_groups; /* multicast groups mask */ | 35 | __u32 nl_groups; /* multicast groups mask */ |
diff --git a/include/linux/of.h b/include/linux/of.h index 0085bb01c041..9180dc5cb00b 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -256,6 +256,13 @@ static inline int of_property_read_string(struct device_node *np, | |||
256 | return -ENOSYS; | 256 | return -ENOSYS; |
257 | } | 257 | } |
258 | 258 | ||
259 | static inline const void *of_get_property(const struct device_node *node, | ||
260 | const char *name, | ||
261 | int *lenp) | ||
262 | { | ||
263 | return NULL; | ||
264 | } | ||
265 | |||
259 | #endif /* CONFIG_OF */ | 266 | #endif /* CONFIG_OF */ |
260 | 267 | ||
261 | static inline int of_property_read_u32(const struct device_node *np, | 268 | static inline int of_property_read_u32(const struct device_node *np, |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 20b03bf94748..4ac2c0578e0f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1767,6 +1767,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1767 | #define PF_DUMPCORE 0x00000200 /* dumped core */ | 1767 | #define PF_DUMPCORE 0x00000200 /* dumped core */ |
1768 | #define PF_SIGNALED 0x00000400 /* killed by a signal */ | 1768 | #define PF_SIGNALED 0x00000400 /* killed by a signal */ |
1769 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ | 1769 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
1770 | #define PF_NPROC_EXCEEDED 0x00001000 /* set_user noticed that RLIMIT_NPROC was exceeded */ | ||
1770 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ | 1771 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ |
1771 | #define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ | 1772 | #define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ |
1772 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ | 1773 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ |
diff --git a/include/linux/socket.h b/include/linux/socket.h index e17f82266639..d0e77f607a79 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -8,8 +8,10 @@ | |||
8 | #define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *)) | 8 | #define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *)) |
9 | /* Implementation specific desired alignment */ | 9 | /* Implementation specific desired alignment */ |
10 | 10 | ||
11 | typedef unsigned short __kernel_sa_family_t; | ||
12 | |||
11 | struct __kernel_sockaddr_storage { | 13 | struct __kernel_sockaddr_storage { |
12 | unsigned short ss_family; /* address family */ | 14 | __kernel_sa_family_t ss_family; /* address family */ |
13 | /* Following field(s) are implementation specific */ | 15 | /* Following field(s) are implementation specific */ |
14 | char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; | 16 | char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; |
15 | /* space to achieve desired size, */ | 17 | /* space to achieve desired size, */ |
@@ -35,7 +37,7 @@ struct seq_file; | |||
35 | extern void socket_seq_show(struct seq_file *seq); | 37 | extern void socket_seq_show(struct seq_file *seq); |
36 | #endif | 38 | #endif |
37 | 39 | ||
38 | typedef unsigned short sa_family_t; | 40 | typedef __kernel_sa_family_t sa_family_t; |
39 | 41 | ||
40 | /* | 42 | /* |
41 | * 1003.1g requires sa_family_t and that sa_data is char. | 43 | * 1003.1g requires sa_family_t and that sa_data is char. |