diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/blkdev.h | 9 | ||||
-rw-r--r-- | include/linux/ftrace.h | 46 | ||||
-rw-r--r-- | include/linux/ide.h | 8 | ||||
-rw-r--r-- | include/linux/netfilter/x_tables.h | 2 | ||||
-rw-r--r-- | include/linux/pid.h | 4 | ||||
-rw-r--r-- | include/linux/sched.h | 4 | ||||
-rw-r--r-- | include/linux/security.h | 12 |
7 files changed, 73 insertions, 12 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a135256b272c..6dcd30d806cd 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -786,6 +786,8 @@ static inline void blk_run_address_space(struct address_space *mapping) | |||
786 | blk_run_backing_dev(mapping->backing_dev_info, NULL); | 786 | blk_run_backing_dev(mapping->backing_dev_info, NULL); |
787 | } | 787 | } |
788 | 788 | ||
789 | extern void blkdev_dequeue_request(struct request *req); | ||
790 | |||
789 | /* | 791 | /* |
790 | * blk_end_request() and friends. | 792 | * blk_end_request() and friends. |
791 | * __blk_end_request() and end_request() must be called with | 793 | * __blk_end_request() and end_request() must be called with |
@@ -820,11 +822,6 @@ extern void blk_update_request(struct request *rq, int error, | |||
820 | extern unsigned int blk_rq_bytes(struct request *rq); | 822 | extern unsigned int blk_rq_bytes(struct request *rq); |
821 | extern unsigned int blk_rq_cur_bytes(struct request *rq); | 823 | extern unsigned int blk_rq_cur_bytes(struct request *rq); |
822 | 824 | ||
823 | static inline void blkdev_dequeue_request(struct request *req) | ||
824 | { | ||
825 | elv_dequeue_request(req->q, req); | ||
826 | } | ||
827 | |||
828 | /* | 825 | /* |
829 | * Access functions for manipulating queue properties | 826 | * Access functions for manipulating queue properties |
830 | */ | 827 | */ |
@@ -921,6 +918,8 @@ extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); | |||
921 | 918 | ||
922 | #define MAX_SEGMENT_SIZE 65536 | 919 | #define MAX_SEGMENT_SIZE 65536 |
923 | 920 | ||
921 | #define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL | ||
922 | |||
924 | #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist) | 923 | #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist) |
925 | 924 | ||
926 | static inline int queue_hardsect_size(struct request_queue *q) | 925 | static inline int queue_hardsect_size(struct request_queue *q) |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 469ceb3e85ba..b295d3106bfe 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/kallsyms.h> | 9 | #include <linux/kallsyms.h> |
10 | #include <linux/bitops.h> | ||
10 | 11 | ||
11 | #ifdef CONFIG_FUNCTION_TRACER | 12 | #ifdef CONFIG_FUNCTION_TRACER |
12 | 13 | ||
@@ -391,4 +392,49 @@ static inline void ftrace_graph_init_task(struct task_struct *t) { } | |||
391 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } | 392 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } |
392 | #endif | 393 | #endif |
393 | 394 | ||
395 | #ifdef CONFIG_TRACING | ||
396 | #include <linux/sched.h> | ||
397 | |||
398 | /* flags for current->trace */ | ||
399 | enum { | ||
400 | TSK_TRACE_FL_TRACE_BIT = 0, | ||
401 | TSK_TRACE_FL_GRAPH_BIT = 1, | ||
402 | }; | ||
403 | enum { | ||
404 | TSK_TRACE_FL_TRACE = 1 << TSK_TRACE_FL_TRACE_BIT, | ||
405 | TSK_TRACE_FL_GRAPH = 1 << TSK_TRACE_FL_GRAPH_BIT, | ||
406 | }; | ||
407 | |||
408 | static inline void set_tsk_trace_trace(struct task_struct *tsk) | ||
409 | { | ||
410 | set_bit(TSK_TRACE_FL_TRACE_BIT, &tsk->trace); | ||
411 | } | ||
412 | |||
413 | static inline void clear_tsk_trace_trace(struct task_struct *tsk) | ||
414 | { | ||
415 | clear_bit(TSK_TRACE_FL_TRACE_BIT, &tsk->trace); | ||
416 | } | ||
417 | |||
418 | static inline int test_tsk_trace_trace(struct task_struct *tsk) | ||
419 | { | ||
420 | return tsk->trace & TSK_TRACE_FL_TRACE; | ||
421 | } | ||
422 | |||
423 | static inline void set_tsk_trace_graph(struct task_struct *tsk) | ||
424 | { | ||
425 | set_bit(TSK_TRACE_FL_GRAPH_BIT, &tsk->trace); | ||
426 | } | ||
427 | |||
428 | static inline void clear_tsk_trace_graph(struct task_struct *tsk) | ||
429 | { | ||
430 | clear_bit(TSK_TRACE_FL_GRAPH_BIT, &tsk->trace); | ||
431 | } | ||
432 | |||
433 | static inline int test_tsk_trace_graph(struct task_struct *tsk) | ||
434 | { | ||
435 | return tsk->trace & TSK_TRACE_FL_GRAPH; | ||
436 | } | ||
437 | |||
438 | #endif /* CONFIG_TRACING */ | ||
439 | |||
394 | #endif /* _LINUX_FTRACE_H */ | 440 | #endif /* _LINUX_FTRACE_H */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 54525be4b5f8..010fb26a1579 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1296,6 +1296,13 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o | |||
1296 | #define ide_pci_register_driver(d) pci_register_driver(d) | 1296 | #define ide_pci_register_driver(d) pci_register_driver(d) |
1297 | #endif | 1297 | #endif |
1298 | 1298 | ||
1299 | static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev) | ||
1300 | { | ||
1301 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 5) != 5) | ||
1302 | return 1; | ||
1303 | return 0; | ||
1304 | } | ||
1305 | |||
1299 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, | 1306 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, |
1300 | hw_regs_t *, hw_regs_t **); | 1307 | hw_regs_t *, hw_regs_t **); |
1301 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1308 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
@@ -1375,6 +1382,7 @@ enum { | |||
1375 | IDE_HFLAG_IO_32BIT = (1 << 24), | 1382 | IDE_HFLAG_IO_32BIT = (1 << 24), |
1376 | /* unmask IRQs */ | 1383 | /* unmask IRQs */ |
1377 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), | 1384 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), |
1385 | IDE_HFLAG_BROKEN_ALTSTATUS = (1 << 26), | ||
1378 | /* serialize ports if DMA is possible (for sl82c105) */ | 1386 | /* serialize ports if DMA is possible (for sl82c105) */ |
1379 | IDE_HFLAG_SERIALIZE_DMA = (1 << 27), | 1387 | IDE_HFLAG_SERIALIZE_DMA = (1 << 27), |
1380 | /* force host out of "simplex" mode */ | 1388 | /* force host out of "simplex" mode */ |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index be41b609c88f..e52ce475d19f 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -251,7 +251,7 @@ struct xt_target_param { | |||
251 | */ | 251 | */ |
252 | struct xt_tgchk_param { | 252 | struct xt_tgchk_param { |
253 | const char *table; | 253 | const char *table; |
254 | void *entryinfo; | 254 | const void *entryinfo; |
255 | const struct xt_target *target; | 255 | const struct xt_target *target; |
256 | void *targinfo; | 256 | void *targinfo; |
257 | unsigned int hook_mask; | 257 | unsigned int hook_mask; |
diff --git a/include/linux/pid.h b/include/linux/pid.h index d7e98ff8021e..bb206c56d1f0 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -147,9 +147,9 @@ pid_t pid_vnr(struct pid *pid); | |||
147 | #define do_each_pid_task(pid, type, task) \ | 147 | #define do_each_pid_task(pid, type, task) \ |
148 | do { \ | 148 | do { \ |
149 | struct hlist_node *pos___; \ | 149 | struct hlist_node *pos___; \ |
150 | if (pid != NULL) \ | 150 | if ((pid) != NULL) \ |
151 | hlist_for_each_entry_rcu((task), pos___, \ | 151 | hlist_for_each_entry_rcu((task), pos___, \ |
152 | &pid->tasks[type], pids[type].node) { | 152 | &(pid)->tasks[type], pids[type].node) { |
153 | 153 | ||
154 | /* | 154 | /* |
155 | * Both old and new leaders may be attached to | 155 | * Both old and new leaders may be attached to |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2d0a93c31228..4c152e0acc9e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1380,6 +1380,10 @@ struct task_struct { | |||
1380 | */ | 1380 | */ |
1381 | atomic_t trace_overrun; | 1381 | atomic_t trace_overrun; |
1382 | #endif | 1382 | #endif |
1383 | #ifdef CONFIG_TRACING | ||
1384 | /* state flags for use by tracers */ | ||
1385 | unsigned long trace; | ||
1386 | #endif | ||
1383 | }; | 1387 | }; |
1384 | 1388 | ||
1385 | /* | 1389 | /* |
diff --git a/include/linux/security.h b/include/linux/security.h index c13f1cec9abb..e3d4ecda2673 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1818,17 +1818,21 @@ static inline int security_settime(struct timespec *ts, struct timezone *tz) | |||
1818 | 1818 | ||
1819 | static inline int security_vm_enough_memory(long pages) | 1819 | static inline int security_vm_enough_memory(long pages) |
1820 | { | 1820 | { |
1821 | WARN_ON(current->mm == NULL); | ||
1821 | return cap_vm_enough_memory(current->mm, pages); | 1822 | return cap_vm_enough_memory(current->mm, pages); |
1822 | } | 1823 | } |
1823 | 1824 | ||
1824 | static inline int security_vm_enough_memory_kern(long pages) | 1825 | static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) |
1825 | { | 1826 | { |
1826 | return cap_vm_enough_memory(current->mm, pages); | 1827 | WARN_ON(mm == NULL); |
1828 | return cap_vm_enough_memory(mm, pages); | ||
1827 | } | 1829 | } |
1828 | 1830 | ||
1829 | static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) | 1831 | static inline int security_vm_enough_memory_kern(long pages) |
1830 | { | 1832 | { |
1831 | return cap_vm_enough_memory(mm, pages); | 1833 | /* If current->mm is a kernel thread then we will pass NULL, |
1834 | for this specific case that is fine */ | ||
1835 | return cap_vm_enough_memory(current->mm, pages); | ||
1832 | } | 1836 | } |
1833 | 1837 | ||
1834 | static inline int security_bprm_alloc(struct linux_binprm *bprm) | 1838 | static inline int security_bprm_alloc(struct linux_binprm *bprm) |