diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-rpc/hardware.h | 4 | ||||
-rw-r--r-- | include/asm-arm/arch-versatile/io.h | 6 | ||||
-rw-r--r-- | include/asm-generic/pgtable.h | 13 | ||||
-rw-r--r-- | include/asm-ia64/uaccess.h | 12 | ||||
-rw-r--r-- | include/asm-mips/pgtable.h | 2 | ||||
-rw-r--r-- | include/asm-ppc/mv64x60.h | 4 | ||||
-rw-r--r-- | include/asm-ppc64/tlbflush.h | 1 | ||||
-rw-r--r-- | include/asm-ppc64/uaccess.h | 6 | ||||
-rw-r--r-- | include/asm-s390/sigcontext.h | 2 | ||||
-rw-r--r-- | include/asm-s390/signal.h | 2 | ||||
-rw-r--r-- | include/linux/key-ui.h | 28 | ||||
-rw-r--r-- | include/linux/key.h | 78 | ||||
-rw-r--r-- | include/rdma/ib_verbs.h | 1 |
13 files changed, 119 insertions, 40 deletions
diff --git a/include/asm-arm/arch-rpc/hardware.h b/include/asm-arm/arch-rpc/hardware.h index be9754a05c19..9d7f87375aa7 100644 --- a/include/asm-arm/arch-rpc/hardware.h +++ b/include/asm-arm/arch-rpc/hardware.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/arch/memory.h> | 15 | #include <asm/arch/memory.h> |
16 | 16 | ||
17 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
18 | #define IOMEM(x) ((void __iomem *)(x)) | 18 | #define IOMEM(x) ((void __iomem *)(unsigned long)(x)) |
19 | #else | 19 | #else |
20 | #define IOMEM(x) x | 20 | #define IOMEM(x) x |
21 | #endif /* __ASSEMBLY__ */ | 21 | #endif /* __ASSEMBLY__ */ |
@@ -52,7 +52,7 @@ | |||
52 | /* | 52 | /* |
53 | * IO Addresses | 53 | * IO Addresses |
54 | */ | 54 | */ |
55 | #define VIDC_BASE (void __iomem *)0xe0400000 | 55 | #define VIDC_BASE IOMEM(0xe0400000) |
56 | #define EXPMASK_BASE 0xe0360000 | 56 | #define EXPMASK_BASE 0xe0360000 |
57 | #define IOMD_BASE IOMEM(0xe0200000) | 57 | #define IOMD_BASE IOMEM(0xe0200000) |
58 | #define IOC_BASE IOMEM(0xe0200000) | 58 | #define IOC_BASE IOMEM(0xe0200000) |
diff --git a/include/asm-arm/arch-versatile/io.h b/include/asm-arm/arch-versatile/io.h index 9f895bf61494..47e904cf25c7 100644 --- a/include/asm-arm/arch-versatile/io.h +++ b/include/asm-arm/arch-versatile/io.h | |||
@@ -22,7 +22,11 @@ | |||
22 | 22 | ||
23 | #define IO_SPACE_LIMIT 0xffffffff | 23 | #define IO_SPACE_LIMIT 0xffffffff |
24 | 24 | ||
25 | #define __io(a) ((void __iomem *)(a)) | 25 | static inline void __iomem *__io(unsigned long addr) |
26 | { | ||
27 | return (void __iomem *)addr; | ||
28 | } | ||
29 | #define __io(a) __io(a) | ||
26 | #define __mem_pci(a) (a) | 30 | #define __mem_pci(a) (a) |
27 | #define __mem_isa(a) (a) | 31 | #define __mem_isa(a) (a) |
28 | 32 | ||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index f86c1e549466..ff28c8b31f58 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -158,6 +158,19 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres | |||
158 | #define lazy_mmu_prot_update(pte) do { } while (0) | 158 | #define lazy_mmu_prot_update(pte) do { } while (0) |
159 | #endif | 159 | #endif |
160 | 160 | ||
161 | #ifndef __HAVE_ARCH_MULTIPLE_ZERO_PAGE | ||
162 | #define move_pte(pte, prot, old_addr, new_addr) (pte) | ||
163 | #else | ||
164 | #define move_pte(pte, prot, old_addr, new_addr) \ | ||
165 | ({ \ | ||
166 | pte_t newpte = (pte); \ | ||
167 | if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ | ||
168 | pte_page(pte) == ZERO_PAGE(old_addr)) \ | ||
169 | newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ | ||
170 | newpte; \ | ||
171 | }) | ||
172 | #endif | ||
173 | |||
161 | /* | 174 | /* |
162 | * When walking page tables, get the address of the next boundary, | 175 | * When walking page tables, get the address of the next boundary, |
163 | * or the end address of the range if that comes earlier. Although no | 176 | * or the end address of the range if that comes earlier. Although no |
diff --git a/include/asm-ia64/uaccess.h b/include/asm-ia64/uaccess.h index 3a7829bb5954..9adb51211c22 100644 --- a/include/asm-ia64/uaccess.h +++ b/include/asm-ia64/uaccess.h | |||
@@ -187,8 +187,8 @@ extern void __get_user_unknown (void); | |||
187 | ({ \ | 187 | ({ \ |
188 | const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \ | 188 | const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \ |
189 | __typeof__ (size) __gu_size = (size); \ | 189 | __typeof__ (size) __gu_size = (size); \ |
190 | long __gu_err = -EFAULT, __gu_val = 0; \ | 190 | long __gu_err = -EFAULT; \ |
191 | \ | 191 | unsigned long __gu_val = 0; \ |
192 | if (!check || __access_ok(__gu_ptr, size, segment)) \ | 192 | if (!check || __access_ok(__gu_ptr, size, segment)) \ |
193 | switch (__gu_size) { \ | 193 | switch (__gu_size) { \ |
194 | case 1: __get_user_size(__gu_val, __gu_ptr, 1, __gu_err); break; \ | 194 | case 1: __get_user_size(__gu_val, __gu_ptr, 1, __gu_err); break; \ |
@@ -240,13 +240,13 @@ extern unsigned long __must_check __copy_user (void __user *to, const void __use | |||
240 | static inline unsigned long | 240 | static inline unsigned long |
241 | __copy_to_user (void __user *to, const void *from, unsigned long count) | 241 | __copy_to_user (void __user *to, const void *from, unsigned long count) |
242 | { | 242 | { |
243 | return __copy_user(to, (void __user *) from, count); | 243 | return __copy_user(to, (__force void __user *) from, count); |
244 | } | 244 | } |
245 | 245 | ||
246 | static inline unsigned long | 246 | static inline unsigned long |
247 | __copy_from_user (void *to, const void __user *from, unsigned long count) | 247 | __copy_from_user (void *to, const void __user *from, unsigned long count) |
248 | { | 248 | { |
249 | return __copy_user((void __user *) to, from, count); | 249 | return __copy_user((__force void __user *) to, from, count); |
250 | } | 250 | } |
251 | 251 | ||
252 | #define __copy_to_user_inatomic __copy_to_user | 252 | #define __copy_to_user_inatomic __copy_to_user |
@@ -258,7 +258,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count) | |||
258 | long __cu_len = (n); \ | 258 | long __cu_len = (n); \ |
259 | \ | 259 | \ |
260 | if (__access_ok(__cu_to, __cu_len, get_fs())) \ | 260 | if (__access_ok(__cu_to, __cu_len, get_fs())) \ |
261 | __cu_len = __copy_user(__cu_to, (void __user *) __cu_from, __cu_len); \ | 261 | __cu_len = __copy_user(__cu_to, (__force void __user *) __cu_from, __cu_len); \ |
262 | __cu_len; \ | 262 | __cu_len; \ |
263 | }) | 263 | }) |
264 | 264 | ||
@@ -270,7 +270,7 @@ __copy_from_user (void *to, const void __user *from, unsigned long count) | |||
270 | \ | 270 | \ |
271 | __chk_user_ptr(__cu_from); \ | 271 | __chk_user_ptr(__cu_from); \ |
272 | if (__access_ok(__cu_from, __cu_len, get_fs())) \ | 272 | if (__access_ok(__cu_from, __cu_len, get_fs())) \ |
273 | __cu_len = __copy_user((void __user *) __cu_to, __cu_from, __cu_len); \ | 273 | __cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \ |
274 | __cu_len; \ | 274 | __cu_len; \ |
275 | }) | 275 | }) |
276 | 276 | ||
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index cbd1672c94cb..eaf5d9b3a0e1 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -68,6 +68,8 @@ extern unsigned long zero_page_mask; | |||
68 | #define ZERO_PAGE(vaddr) \ | 68 | #define ZERO_PAGE(vaddr) \ |
69 | (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))) | 69 | (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))) |
70 | 70 | ||
71 | #define __HAVE_ARCH_MULTIPLE_ZERO_PAGE | ||
72 | |||
71 | extern void paging_init(void); | 73 | extern void paging_init(void); |
72 | 74 | ||
73 | /* | 75 | /* |
diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h index 75c2ffa26b26..ee2f9188cc64 100644 --- a/include/asm-ppc/mv64x60.h +++ b/include/asm-ppc/mv64x60.h | |||
@@ -233,7 +233,7 @@ struct mv64x60_chip_info { | |||
233 | struct mv64x60_handle { | 233 | struct mv64x60_handle { |
234 | u32 type; /* type of bridge */ | 234 | u32 type; /* type of bridge */ |
235 | u32 rev; /* revision of bridge */ | 235 | u32 rev; /* revision of bridge */ |
236 | void *v_base; /* virtual base addr of bridge regs */ | 236 | void __iomem *v_base;/* virtual base addr of bridge regs */ |
237 | phys_addr_t p_base; /* physical base addr of bridge regs */ | 237 | phys_addr_t p_base; /* physical base addr of bridge regs */ |
238 | 238 | ||
239 | u32 pci_mode_a; /* pci 0 mode: conventional pci, pci-x*/ | 239 | u32 pci_mode_a; /* pci 0 mode: conventional pci, pci-x*/ |
@@ -303,7 +303,7 @@ void mv64x60_alloc_hose(struct mv64x60_handle *bh, u32 cfg_addr, | |||
303 | u32 cfg_data, struct pci_controller **hose); | 303 | u32 cfg_data, struct pci_controller **hose); |
304 | int mv64x60_get_type(struct mv64x60_handle *bh); | 304 | int mv64x60_get_type(struct mv64x60_handle *bh); |
305 | int mv64x60_setup_for_chip(struct mv64x60_handle *bh); | 305 | int mv64x60_setup_for_chip(struct mv64x60_handle *bh); |
306 | void *mv64x60_get_bridge_vbase(void); | 306 | void __iomem *mv64x60_get_bridge_vbase(void); |
307 | u32 mv64x60_get_bridge_type(void); | 307 | u32 mv64x60_get_bridge_type(void); |
308 | u32 mv64x60_get_bridge_rev(void); | 308 | u32 mv64x60_get_bridge_rev(void); |
309 | void mv64x60_get_mem_windows(struct mv64x60_handle *bh, | 309 | void mv64x60_get_mem_windows(struct mv64x60_handle *bh, |
diff --git a/include/asm-ppc64/tlbflush.h b/include/asm-ppc64/tlbflush.h index 45411a67e082..74271d7c1d16 100644 --- a/include/asm-ppc64/tlbflush.h +++ b/include/asm-ppc64/tlbflush.h | |||
@@ -25,6 +25,7 @@ struct ppc64_tlb_batch { | |||
25 | pte_t pte[PPC64_TLB_BATCH_NR]; | 25 | pte_t pte[PPC64_TLB_BATCH_NR]; |
26 | unsigned long addr[PPC64_TLB_BATCH_NR]; | 26 | unsigned long addr[PPC64_TLB_BATCH_NR]; |
27 | unsigned long vaddr[PPC64_TLB_BATCH_NR]; | 27 | unsigned long vaddr[PPC64_TLB_BATCH_NR]; |
28 | unsigned int large; | ||
28 | }; | 29 | }; |
29 | DECLARE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); | 30 | DECLARE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); |
30 | 31 | ||
diff --git a/include/asm-ppc64/uaccess.h b/include/asm-ppc64/uaccess.h index c181a60d868c..132c1276547b 100644 --- a/include/asm-ppc64/uaccess.h +++ b/include/asm-ppc64/uaccess.h | |||
@@ -164,7 +164,8 @@ do { \ | |||
164 | 164 | ||
165 | #define __get_user_nocheck(x,ptr,size) \ | 165 | #define __get_user_nocheck(x,ptr,size) \ |
166 | ({ \ | 166 | ({ \ |
167 | long __gu_err, __gu_val; \ | 167 | long __gu_err; \ |
168 | unsigned long __gu_val; \ | ||
168 | might_sleep(); \ | 169 | might_sleep(); \ |
169 | __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\ | 170 | __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\ |
170 | (x) = (__typeof__(*(ptr)))__gu_val; \ | 171 | (x) = (__typeof__(*(ptr)))__gu_val; \ |
@@ -173,7 +174,8 @@ do { \ | |||
173 | 174 | ||
174 | #define __get_user_check(x,ptr,size) \ | 175 | #define __get_user_check(x,ptr,size) \ |
175 | ({ \ | 176 | ({ \ |
176 | long __gu_err = -EFAULT, __gu_val = 0; \ | 177 | long __gu_err = -EFAULT; \ |
178 | unsigned long __gu_val = 0; \ | ||
177 | const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ | 179 | const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ |
178 | might_sleep(); \ | 180 | might_sleep(); \ |
179 | if (access_ok(VERIFY_READ,__gu_addr,size)) \ | 181 | if (access_ok(VERIFY_READ,__gu_addr,size)) \ |
diff --git a/include/asm-s390/sigcontext.h b/include/asm-s390/sigcontext.h index d57bc0cebdce..803545351dd8 100644 --- a/include/asm-s390/sigcontext.h +++ b/include/asm-s390/sigcontext.h | |||
@@ -61,7 +61,7 @@ typedef struct | |||
61 | struct sigcontext | 61 | struct sigcontext |
62 | { | 62 | { |
63 | unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS]; | 63 | unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS]; |
64 | _sigregs *sregs; | 64 | _sigregs __user *sregs; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | 67 | ||
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h index 3d6e11c6c1fd..7084626de215 100644 --- a/include/asm-s390/signal.h +++ b/include/asm-s390/signal.h | |||
@@ -165,7 +165,7 @@ struct sigaction { | |||
165 | #endif /* __KERNEL__ */ | 165 | #endif /* __KERNEL__ */ |
166 | 166 | ||
167 | typedef struct sigaltstack { | 167 | typedef struct sigaltstack { |
168 | void *ss_sp; | 168 | void __user *ss_sp; |
169 | int ss_flags; | 169 | int ss_flags; |
170 | size_t ss_size; | 170 | size_t ss_size; |
171 | } stack_t; | 171 | } stack_t; |
diff --git a/include/linux/key-ui.h b/include/linux/key-ui.h index cc326174a808..918c34a8347e 100644 --- a/include/linux/key-ui.h +++ b/include/linux/key-ui.h | |||
@@ -42,11 +42,14 @@ struct keyring_list { | |||
42 | /* | 42 | /* |
43 | * check to see whether permission is granted to use a key in the desired way | 43 | * check to see whether permission is granted to use a key in the desired way |
44 | */ | 44 | */ |
45 | static inline int key_permission(const struct key *key, key_perm_t perm) | 45 | static inline int key_permission(const key_ref_t key_ref, key_perm_t perm) |
46 | { | 46 | { |
47 | struct key *key = key_ref_to_ptr(key_ref); | ||
47 | key_perm_t kperm; | 48 | key_perm_t kperm; |
48 | 49 | ||
49 | if (key->uid == current->fsuid) | 50 | if (is_key_possessed(key_ref)) |
51 | kperm = key->perm >> 24; | ||
52 | else if (key->uid == current->fsuid) | ||
50 | kperm = key->perm >> 16; | 53 | kperm = key->perm >> 16; |
51 | else if (key->gid != -1 && | 54 | else if (key->gid != -1 && |
52 | key->perm & KEY_GRP_ALL && | 55 | key->perm & KEY_GRP_ALL && |
@@ -65,11 +68,14 @@ static inline int key_permission(const struct key *key, key_perm_t perm) | |||
65 | * check to see whether permission is granted to use a key in at least one of | 68 | * check to see whether permission is granted to use a key in at least one of |
66 | * the desired ways | 69 | * the desired ways |
67 | */ | 70 | */ |
68 | static inline int key_any_permission(const struct key *key, key_perm_t perm) | 71 | static inline int key_any_permission(const key_ref_t key_ref, key_perm_t perm) |
69 | { | 72 | { |
73 | struct key *key = key_ref_to_ptr(key_ref); | ||
70 | key_perm_t kperm; | 74 | key_perm_t kperm; |
71 | 75 | ||
72 | if (key->uid == current->fsuid) | 76 | if (is_key_possessed(key_ref)) |
77 | kperm = key->perm >> 24; | ||
78 | else if (key->uid == current->fsuid) | ||
73 | kperm = key->perm >> 16; | 79 | kperm = key->perm >> 16; |
74 | else if (key->gid != -1 && | 80 | else if (key->gid != -1 && |
75 | key->perm & KEY_GRP_ALL && | 81 | key->perm & KEY_GRP_ALL && |
@@ -94,13 +100,17 @@ static inline int key_task_groups_search(struct task_struct *tsk, gid_t gid) | |||
94 | return ret; | 100 | return ret; |
95 | } | 101 | } |
96 | 102 | ||
97 | static inline int key_task_permission(const struct key *key, | 103 | static inline int key_task_permission(const key_ref_t key_ref, |
98 | struct task_struct *context, | 104 | struct task_struct *context, |
99 | key_perm_t perm) | 105 | key_perm_t perm) |
100 | { | 106 | { |
107 | struct key *key = key_ref_to_ptr(key_ref); | ||
101 | key_perm_t kperm; | 108 | key_perm_t kperm; |
102 | 109 | ||
103 | if (key->uid == context->fsuid) { | 110 | if (is_key_possessed(key_ref)) { |
111 | kperm = key->perm >> 24; | ||
112 | } | ||
113 | else if (key->uid == context->fsuid) { | ||
104 | kperm = key->perm >> 16; | 114 | kperm = key->perm >> 16; |
105 | } | 115 | } |
106 | else if (key->gid != -1 && | 116 | else if (key->gid != -1 && |
@@ -121,9 +131,9 @@ static inline int key_task_permission(const struct key *key, | |||
121 | 131 | ||
122 | } | 132 | } |
123 | 133 | ||
124 | extern struct key *lookup_user_key(struct task_struct *context, | 134 | extern key_ref_t lookup_user_key(struct task_struct *context, |
125 | key_serial_t id, int create, int partial, | 135 | key_serial_t id, int create, int partial, |
126 | key_perm_t perm); | 136 | key_perm_t perm); |
127 | 137 | ||
128 | extern long join_session_keyring(const char *name); | 138 | extern long join_session_keyring(const char *name); |
129 | 139 | ||
diff --git a/include/linux/key.h b/include/linux/key.h index 970bbd916cf4..f1efa016dbf3 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -35,11 +35,18 @@ struct key; | |||
35 | 35 | ||
36 | #undef KEY_DEBUGGING | 36 | #undef KEY_DEBUGGING |
37 | 37 | ||
38 | #define KEY_USR_VIEW 0x00010000 /* user can view a key's attributes */ | 38 | #define KEY_POS_VIEW 0x01000000 /* possessor can view a key's attributes */ |
39 | #define KEY_USR_READ 0x00020000 /* user can read key payload / view keyring */ | 39 | #define KEY_POS_READ 0x02000000 /* possessor can read key payload / view keyring */ |
40 | #define KEY_USR_WRITE 0x00040000 /* user can update key payload / add link to keyring */ | 40 | #define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */ |
41 | #define KEY_USR_SEARCH 0x00080000 /* user can find a key in search / search a keyring */ | 41 | #define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */ |
42 | #define KEY_USR_LINK 0x00100000 /* user can create a link to a key/keyring */ | 42 | #define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */ |
43 | #define KEY_POS_ALL 0x1f000000 | ||
44 | |||
45 | #define KEY_USR_VIEW 0x00010000 /* user permissions... */ | ||
46 | #define KEY_USR_READ 0x00020000 | ||
47 | #define KEY_USR_WRITE 0x00040000 | ||
48 | #define KEY_USR_SEARCH 0x00080000 | ||
49 | #define KEY_USR_LINK 0x00100000 | ||
43 | #define KEY_USR_ALL 0x001f0000 | 50 | #define KEY_USR_ALL 0x001f0000 |
44 | 51 | ||
45 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ | 52 | #define KEY_GRP_VIEW 0x00000100 /* group permissions... */ |
@@ -67,6 +74,38 @@ struct keyring_name; | |||
67 | 74 | ||
68 | /*****************************************************************************/ | 75 | /*****************************************************************************/ |
69 | /* | 76 | /* |
77 | * key reference with possession attribute handling | ||
78 | * | ||
79 | * NOTE! key_ref_t is a typedef'd pointer to a type that is not actually | ||
80 | * defined. This is because we abuse the bottom bit of the reference to carry a | ||
81 | * flag to indicate whether the calling process possesses that key in one of | ||
82 | * its keyrings. | ||
83 | * | ||
84 | * the key_ref_t has been made a separate type so that the compiler can reject | ||
85 | * attempts to dereference it without proper conversion. | ||
86 | * | ||
87 | * the three functions are used to assemble and disassemble references | ||
88 | */ | ||
89 | typedef struct __key_reference_with_attributes *key_ref_t; | ||
90 | |||
91 | static inline key_ref_t make_key_ref(const struct key *key, | ||
92 | unsigned long possession) | ||
93 | { | ||
94 | return (key_ref_t) ((unsigned long) key | possession); | ||
95 | } | ||
96 | |||
97 | static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) | ||
98 | { | ||
99 | return (struct key *) ((unsigned long) key_ref & ~1UL); | ||
100 | } | ||
101 | |||
102 | static inline unsigned long is_key_possessed(const key_ref_t key_ref) | ||
103 | { | ||
104 | return (unsigned long) key_ref & 1UL; | ||
105 | } | ||
106 | |||
107 | /*****************************************************************************/ | ||
108 | /* | ||
70 | * authentication token / access credential / keyring | 109 | * authentication token / access credential / keyring |
71 | * - types of key include: | 110 | * - types of key include: |
72 | * - keyrings | 111 | * - keyrings |
@@ -215,20 +254,25 @@ static inline struct key *key_get(struct key *key) | |||
215 | return key; | 254 | return key; |
216 | } | 255 | } |
217 | 256 | ||
257 | static inline void key_ref_put(key_ref_t key_ref) | ||
258 | { | ||
259 | key_put(key_ref_to_ptr(key_ref)); | ||
260 | } | ||
261 | |||
218 | extern struct key *request_key(struct key_type *type, | 262 | extern struct key *request_key(struct key_type *type, |
219 | const char *description, | 263 | const char *description, |
220 | const char *callout_info); | 264 | const char *callout_info); |
221 | 265 | ||
222 | extern int key_validate(struct key *key); | 266 | extern int key_validate(struct key *key); |
223 | 267 | ||
224 | extern struct key *key_create_or_update(struct key *keyring, | 268 | extern key_ref_t key_create_or_update(key_ref_t keyring, |
225 | const char *type, | 269 | const char *type, |
226 | const char *description, | 270 | const char *description, |
227 | const void *payload, | 271 | const void *payload, |
228 | size_t plen, | 272 | size_t plen, |
229 | int not_in_quota); | 273 | int not_in_quota); |
230 | 274 | ||
231 | extern int key_update(struct key *key, | 275 | extern int key_update(key_ref_t key, |
232 | const void *payload, | 276 | const void *payload, |
233 | size_t plen); | 277 | size_t plen); |
234 | 278 | ||
@@ -243,9 +287,9 @@ extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, | |||
243 | 287 | ||
244 | extern int keyring_clear(struct key *keyring); | 288 | extern int keyring_clear(struct key *keyring); |
245 | 289 | ||
246 | extern struct key *keyring_search(struct key *keyring, | 290 | extern key_ref_t keyring_search(key_ref_t keyring, |
247 | struct key_type *type, | 291 | struct key_type *type, |
248 | const char *description); | 292 | const char *description); |
249 | 293 | ||
250 | extern int keyring_add_key(struct key *keyring, | 294 | extern int keyring_add_key(struct key *keyring, |
251 | struct key *key); | 295 | struct key *key); |
@@ -285,6 +329,10 @@ extern void key_init(void); | |||
285 | #define key_serial(k) 0 | 329 | #define key_serial(k) 0 |
286 | #define key_get(k) ({ NULL; }) | 330 | #define key_get(k) ({ NULL; }) |
287 | #define key_put(k) do { } while(0) | 331 | #define key_put(k) do { } while(0) |
332 | #define key_ref_put(k) do { } while(0) | ||
333 | #define make_key_ref(k) ({ NULL; }) | ||
334 | #define key_ref_to_ptr(k) ({ NULL; }) | ||
335 | #define is_key_possessed(k) 0 | ||
288 | #define alloc_uid_keyring(u) 0 | 336 | #define alloc_uid_keyring(u) 0 |
289 | #define switch_uid_keyring(u) do { } while(0) | 337 | #define switch_uid_keyring(u) do { } while(0) |
290 | #define __install_session_keyring(t, k) ({ NULL; }) | 338 | #define __install_session_keyring(t, k) ({ NULL; }) |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index e16cf94870f2..e6f4c9e55df7 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -665,7 +665,6 @@ struct ib_ucontext { | |||
665 | struct list_head qp_list; | 665 | struct list_head qp_list; |
666 | struct list_head srq_list; | 666 | struct list_head srq_list; |
667 | struct list_head ah_list; | 667 | struct list_head ah_list; |
668 | spinlock_t lock; | ||
669 | }; | 668 | }; |
670 | 669 | ||
671 | struct ib_uobject { | 670 | struct ib_uobject { |