diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/console_struct.h | 5 | ||||
-rw-r--r-- | include/linux/ide.h | 1 | ||||
-rw-r--r-- | include/linux/kernel.h | 12 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 | ||||
-rw-r--r-- | include/linux/pipe_fs_i.h | 30 | ||||
-rw-r--r-- | include/linux/sched.h | 1 | ||||
-rw-r--r-- | include/linux/slub_def.h | 25 | ||||
-rw-r--r-- | include/net/cipso_ipv4.h | 20 | ||||
-rw-r--r-- | include/net/netlabel.h | 14 |
9 files changed, 58 insertions, 52 deletions
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index a461f76fb0..dc77fed7b2 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * to achieve effects such as fast scrolling by changing the origin. | 9 | * to achieve effects such as fast scrolling by changing the origin. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef _LINUX_CONSOLE_STRUCT_H | ||
13 | #define _LINUX_CONSOLE_STRUCT_H | ||
14 | |||
12 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
13 | #include <linux/vt.h> | 16 | #include <linux/vt.h> |
14 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
@@ -130,3 +133,5 @@ extern void vc_SAK(struct work_struct *work); | |||
130 | #define CUR_DEFAULT CUR_UNDERLINE | 133 | #define CUR_DEFAULT CUR_UNDERLINE |
131 | 134 | ||
132 | #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) | 135 | #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) |
136 | |||
137 | #endif /* _LINUX_CONSOLE_STRUCT_H */ | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 07aba87d36..1e365acdd3 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1001,6 +1001,7 @@ struct ide_driver_s { | |||
1001 | struct device_driver gen_driver; | 1001 | struct device_driver gen_driver; |
1002 | int (*probe)(ide_drive_t *); | 1002 | int (*probe)(ide_drive_t *); |
1003 | void (*remove)(ide_drive_t *); | 1003 | void (*remove)(ide_drive_t *); |
1004 | void (*resume)(ide_drive_t *); | ||
1004 | void (*shutdown)(ide_drive_t *); | 1005 | void (*shutdown)(ide_drive_t *); |
1005 | #ifdef CONFIG_IDE_PROC_FS | 1006 | #ifdef CONFIG_IDE_PROC_FS |
1006 | ide_proc_entry_t *proc; | 1007 | ide_proc_entry_t *proc; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 45353d757c..7a48525059 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -218,10 +218,14 @@ enum { | |||
218 | DUMP_PREFIX_ADDRESS, | 218 | DUMP_PREFIX_ADDRESS, |
219 | DUMP_PREFIX_OFFSET | 219 | DUMP_PREFIX_OFFSET |
220 | }; | 220 | }; |
221 | extern void hex_dump_to_buffer(const void *buf, size_t len, char *linebuf, | 221 | extern void hex_dump_to_buffer(const void *buf, size_t len, |
222 | size_t linebuflen); | 222 | int rowsize, int groupsize, |
223 | extern void print_hex_dump(const char *level, int prefix_type, | 223 | char *linebuf, size_t linebuflen, bool ascii); |
224 | void *buf, size_t len); | 224 | extern void print_hex_dump(const char *level, const char *prefix_str, |
225 | int prefix_type, int rowsize, int groupsize, | ||
226 | void *buf, size_t len, bool ascii); | ||
227 | extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, | ||
228 | void *buf, size_t len); | ||
225 | #define hex_asc(x) "0123456789abcdef"[x] | 229 | #define hex_asc(x) "0123456789abcdef"[x] |
226 | 230 | ||
227 | #ifdef DEBUG | 231 | #ifdef DEBUG |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 6a115cffea..9a03b47da6 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1233,6 +1233,8 @@ | |||
1233 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E | 1233 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E |
1234 | #define PCI_DEVICE_ID_NVIDIA_NVENET_27 0x054F | 1234 | #define PCI_DEVICE_ID_NVIDIA_NVENET_27 0x054F |
1235 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 | 1235 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 |
1236 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C | ||
1237 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 | ||
1236 | 1238 | ||
1237 | #define PCI_VENDOR_ID_IMS 0x10e0 | 1239 | #define PCI_VENDOR_ID_IMS 0x10e0 |
1238 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1240 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 8bcbc54e1b..c8884f9712 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -16,6 +16,21 @@ struct pipe_buffer { | |||
16 | unsigned int flags; | 16 | unsigned int flags; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | struct pipe_inode_info { | ||
20 | wait_queue_head_t wait; | ||
21 | unsigned int nrbufs, curbuf; | ||
22 | struct page *tmp_page; | ||
23 | unsigned int readers; | ||
24 | unsigned int writers; | ||
25 | unsigned int waiting_writers; | ||
26 | unsigned int r_counter; | ||
27 | unsigned int w_counter; | ||
28 | struct fasync_struct *fasync_readers; | ||
29 | struct fasync_struct *fasync_writers; | ||
30 | struct inode *inode; | ||
31 | struct pipe_buffer bufs[PIPE_BUFFERS]; | ||
32 | }; | ||
33 | |||
19 | /* | 34 | /* |
20 | * Note on the nesting of these functions: | 35 | * Note on the nesting of these functions: |
21 | * | 36 | * |
@@ -38,21 +53,6 @@ struct pipe_buf_operations { | |||
38 | void (*get)(struct pipe_inode_info *, struct pipe_buffer *); | 53 | void (*get)(struct pipe_inode_info *, struct pipe_buffer *); |
39 | }; | 54 | }; |
40 | 55 | ||
41 | struct pipe_inode_info { | ||
42 | wait_queue_head_t wait; | ||
43 | unsigned int nrbufs, curbuf; | ||
44 | struct page *tmp_page; | ||
45 | unsigned int readers; | ||
46 | unsigned int writers; | ||
47 | unsigned int waiting_writers; | ||
48 | unsigned int r_counter; | ||
49 | unsigned int w_counter; | ||
50 | struct fasync_struct *fasync_readers; | ||
51 | struct fasync_struct *fasync_writers; | ||
52 | struct inode *inode; | ||
53 | struct pipe_buffer bufs[PIPE_BUFFERS]; | ||
54 | }; | ||
55 | |||
56 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual | 56 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual |
57 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ | 57 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ |
58 | #define PIPE_SIZE PAGE_SIZE | 58 | #define PIPE_SIZE PAGE_SIZE |
diff --git a/include/linux/sched.h b/include/linux/sched.h index d58e74b983..693f0e6c54 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1162,6 +1162,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
1162 | /* Not implemented yet, only for 486*/ | 1162 | /* Not implemented yet, only for 486*/ |
1163 | #define PF_STARTING 0x00000002 /* being created */ | 1163 | #define PF_STARTING 0x00000002 /* being created */ |
1164 | #define PF_EXITING 0x00000004 /* getting shut down */ | 1164 | #define PF_EXITING 0x00000004 /* getting shut down */ |
1165 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ | ||
1165 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ | 1166 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ |
1166 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ | 1167 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ |
1167 | #define PF_DUMPCORE 0x00000200 /* dumped core */ | 1168 | #define PF_DUMPCORE 0x00000200 /* dumped core */ |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 0764c829d9..a0ad37463d 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -70,11 +70,8 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; | |||
70 | */ | 70 | */ |
71 | static inline int kmalloc_index(size_t size) | 71 | static inline int kmalloc_index(size_t size) |
72 | { | 72 | { |
73 | /* | 73 | if (!size) |
74 | * We should return 0 if size == 0 but we use the smallest object | 74 | return 0; |
75 | * here for SLAB legacy reasons. | ||
76 | */ | ||
77 | WARN_ON_ONCE(size == 0); | ||
78 | 75 | ||
79 | if (size > KMALLOC_MAX_SIZE) | 76 | if (size > KMALLOC_MAX_SIZE) |
80 | return -1; | 77 | return -1; |
@@ -153,13 +150,25 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) | |||
153 | #define SLUB_DMA 0 | 150 | #define SLUB_DMA 0 |
154 | #endif | 151 | #endif |
155 | 152 | ||
153 | |||
154 | /* | ||
155 | * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests. | ||
156 | * | ||
157 | * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault. | ||
158 | * | ||
159 | * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can. | ||
160 | * Both make kfree a no-op. | ||
161 | */ | ||
162 | #define ZERO_SIZE_PTR ((void *)16) | ||
163 | |||
164 | |||
156 | static inline void *kmalloc(size_t size, gfp_t flags) | 165 | static inline void *kmalloc(size_t size, gfp_t flags) |
157 | { | 166 | { |
158 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { | 167 | if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { |
159 | struct kmem_cache *s = kmalloc_slab(size); | 168 | struct kmem_cache *s = kmalloc_slab(size); |
160 | 169 | ||
161 | if (!s) | 170 | if (!s) |
162 | return NULL; | 171 | return ZERO_SIZE_PTR; |
163 | 172 | ||
164 | return kmem_cache_alloc(s, flags); | 173 | return kmem_cache_alloc(s, flags); |
165 | } else | 174 | } else |
@@ -172,7 +181,7 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
172 | struct kmem_cache *s = kmalloc_slab(size); | 181 | struct kmem_cache *s = kmalloc_slab(size); |
173 | 182 | ||
174 | if (!s) | 183 | if (!s) |
175 | return NULL; | 184 | return ZERO_SIZE_PTR; |
176 | 185 | ||
177 | return kmem_cache_zalloc(s, flags); | 186 | return kmem_cache_zalloc(s, flags); |
178 | } else | 187 | } else |
@@ -188,7 +197,7 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
188 | struct kmem_cache *s = kmalloc_slab(size); | 197 | struct kmem_cache *s = kmalloc_slab(size); |
189 | 198 | ||
190 | if (!s) | 199 | if (!s) |
191 | return NULL; | 200 | return ZERO_SIZE_PTR; |
192 | 201 | ||
193 | return kmem_cache_alloc_node(s, flags, node); | 202 | return kmem_cache_alloc_node(s, flags, node); |
194 | } else | 203 | } else |
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h index 4f90f5554f..a6bb94530c 100644 --- a/include/net/cipso_ipv4.h +++ b/include/net/cipso_ipv4.h | |||
@@ -203,12 +203,10 @@ static inline int cipso_v4_cache_add(const struct sk_buff *skb, | |||
203 | 203 | ||
204 | #ifdef CONFIG_NETLABEL | 204 | #ifdef CONFIG_NETLABEL |
205 | void cipso_v4_error(struct sk_buff *skb, int error, u32 gateway); | 205 | void cipso_v4_error(struct sk_buff *skb, int error, u32 gateway); |
206 | int cipso_v4_socket_setattr(const struct socket *sock, | 206 | int cipso_v4_sock_setattr(struct sock *sk, |
207 | const struct cipso_v4_doi *doi_def, | 207 | const struct cipso_v4_doi *doi_def, |
208 | const struct netlbl_lsm_secattr *secattr); | 208 | const struct netlbl_lsm_secattr *secattr); |
209 | int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr); | 209 | int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr); |
210 | int cipso_v4_socket_getattr(const struct socket *sock, | ||
211 | struct netlbl_lsm_secattr *secattr); | ||
212 | int cipso_v4_skbuff_getattr(const struct sk_buff *skb, | 210 | int cipso_v4_skbuff_getattr(const struct sk_buff *skb, |
213 | struct netlbl_lsm_secattr *secattr); | 211 | struct netlbl_lsm_secattr *secattr); |
214 | int cipso_v4_validate(unsigned char **option); | 212 | int cipso_v4_validate(unsigned char **option); |
@@ -220,9 +218,9 @@ static inline void cipso_v4_error(struct sk_buff *skb, | |||
220 | return; | 218 | return; |
221 | } | 219 | } |
222 | 220 | ||
223 | static inline int cipso_v4_socket_setattr(const struct socket *sock, | 221 | static inline int cipso_v4_sock_setattr(struct sock *sk, |
224 | const struct cipso_v4_doi *doi_def, | 222 | const struct cipso_v4_doi *doi_def, |
225 | const struct netlbl_lsm_secattr *secattr) | 223 | const struct netlbl_lsm_secattr *secattr) |
226 | { | 224 | { |
227 | return -ENOSYS; | 225 | return -ENOSYS; |
228 | } | 226 | } |
@@ -233,12 +231,6 @@ static inline int cipso_v4_sock_getattr(struct sock *sk, | |||
233 | return -ENOSYS; | 231 | return -ENOSYS; |
234 | } | 232 | } |
235 | 233 | ||
236 | static inline int cipso_v4_socket_getattr(const struct socket *sock, | ||
237 | struct netlbl_lsm_secattr *secattr) | ||
238 | { | ||
239 | return -ENOSYS; | ||
240 | } | ||
241 | |||
242 | static inline int cipso_v4_skbuff_getattr(const struct sk_buff *skb, | 234 | static inline int cipso_v4_skbuff_getattr(const struct sk_buff *skb, |
243 | struct netlbl_lsm_secattr *secattr) | 235 | struct netlbl_lsm_secattr *secattr) |
244 | { | 236 | { |
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index 83da7e1f0d..9b7d6f2ac9 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
@@ -332,17 +332,15 @@ static inline int netlbl_secattr_catmap_setrng( | |||
332 | */ | 332 | */ |
333 | 333 | ||
334 | #ifdef CONFIG_NETLABEL | 334 | #ifdef CONFIG_NETLABEL |
335 | int netlbl_socket_setattr(const struct socket *sock, | 335 | int netlbl_sock_setattr(struct sock *sk, |
336 | const struct netlbl_lsm_secattr *secattr); | 336 | const struct netlbl_lsm_secattr *secattr); |
337 | int netlbl_sock_getattr(struct sock *sk, | 337 | int netlbl_sock_getattr(struct sock *sk, |
338 | struct netlbl_lsm_secattr *secattr); | 338 | struct netlbl_lsm_secattr *secattr); |
339 | int netlbl_socket_getattr(const struct socket *sock, | ||
340 | struct netlbl_lsm_secattr *secattr); | ||
341 | int netlbl_skbuff_getattr(const struct sk_buff *skb, | 339 | int netlbl_skbuff_getattr(const struct sk_buff *skb, |
342 | struct netlbl_lsm_secattr *secattr); | 340 | struct netlbl_lsm_secattr *secattr); |
343 | void netlbl_skbuff_err(struct sk_buff *skb, int error); | 341 | void netlbl_skbuff_err(struct sk_buff *skb, int error); |
344 | #else | 342 | #else |
345 | static inline int netlbl_socket_setattr(const struct socket *sock, | 343 | static inline int netlbl_sock_setattr(struct sock *sk, |
346 | const struct netlbl_lsm_secattr *secattr) | 344 | const struct netlbl_lsm_secattr *secattr) |
347 | { | 345 | { |
348 | return -ENOSYS; | 346 | return -ENOSYS; |
@@ -354,12 +352,6 @@ static inline int netlbl_sock_getattr(struct sock *sk, | |||
354 | return -ENOSYS; | 352 | return -ENOSYS; |
355 | } | 353 | } |
356 | 354 | ||
357 | static inline int netlbl_socket_getattr(const struct socket *sock, | ||
358 | struct netlbl_lsm_secattr *secattr) | ||
359 | { | ||
360 | return -ENOSYS; | ||
361 | } | ||
362 | |||
363 | static inline int netlbl_skbuff_getattr(const struct sk_buff *skb, | 355 | static inline int netlbl_skbuff_getattr(const struct sk_buff *skb, |
364 | struct netlbl_lsm_secattr *secattr) | 356 | struct netlbl_lsm_secattr *secattr) |
365 | { | 357 | { |