diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-12-18 15:54:49 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-12-18 15:54:49 -0500 |
| commit | d110ec3a1e1f522e2e9dfceb9c36d6590c26d2d4 (patch) | |
| tree | 86b2f8f1d22b74b05239525c55bd42e3db6afc03 /kernel | |
| parent | 343e9099c8152daff20e10d6269edec21da44fc0 (diff) | |
| parent | 55dac3a5553b13891f0ae4bbd11920619b5436d4 (diff) | |
Merge branch 'linus' into core/rcu
Diffstat (limited to 'kernel')
49 files changed, 955 insertions, 396 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 9a3ec66a9d8..19fad003b19 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
| @@ -11,8 +11,6 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o \ | |||
| 11 | hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ | 11 | hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ |
| 12 | notifier.o ksysfs.o pm_qos_params.o sched_clock.o | 12 | notifier.o ksysfs.o pm_qos_params.o sched_clock.o |
| 13 | 13 | ||
| 14 | CFLAGS_REMOVE_sched.o = -mno-spe | ||
| 15 | |||
| 16 | ifdef CONFIG_FUNCTION_TRACER | 14 | ifdef CONFIG_FUNCTION_TRACER |
| 17 | # Do not trace debug files and internal ftrace files | 15 | # Do not trace debug files and internal ftrace files |
| 18 | CFLAGS_REMOVE_lockdep.o = -pg | 16 | CFLAGS_REMOVE_lockdep.o = -pg |
| @@ -21,7 +19,7 @@ CFLAGS_REMOVE_mutex-debug.o = -pg | |||
| 21 | CFLAGS_REMOVE_rtmutex-debug.o = -pg | 19 | CFLAGS_REMOVE_rtmutex-debug.o = -pg |
| 22 | CFLAGS_REMOVE_cgroup-debug.o = -pg | 20 | CFLAGS_REMOVE_cgroup-debug.o = -pg |
| 23 | CFLAGS_REMOVE_sched_clock.o = -pg | 21 | CFLAGS_REMOVE_sched_clock.o = -pg |
| 24 | CFLAGS_REMOVE_sched.o = -mno-spe -pg | 22 | CFLAGS_REMOVE_sched.o = -pg |
| 25 | endif | 23 | endif |
| 26 | 24 | ||
| 27 | obj-$(CONFIG_FREEZER) += freezer.o | 25 | obj-$(CONFIG_FREEZER) += freezer.o |
diff --git a/kernel/audit.c b/kernel/audit.c index 4414e93d875..ce6d8ea3131 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
| @@ -61,8 +61,11 @@ | |||
| 61 | 61 | ||
| 62 | #include "audit.h" | 62 | #include "audit.h" |
| 63 | 63 | ||
| 64 | /* No auditing will take place until audit_initialized != 0. | 64 | /* No auditing will take place until audit_initialized == AUDIT_INITIALIZED. |
| 65 | * (Initialization happens after skb_init is called.) */ | 65 | * (Initialization happens after skb_init is called.) */ |
| 66 | #define AUDIT_DISABLED -1 | ||
| 67 | #define AUDIT_UNINITIALIZED 0 | ||
| 68 | #define AUDIT_INITIALIZED 1 | ||
| 66 | static int audit_initialized; | 69 | static int audit_initialized; |
| 67 | 70 | ||
| 68 | #define AUDIT_OFF 0 | 71 | #define AUDIT_OFF 0 |
| @@ -965,6 +968,9 @@ static int __init audit_init(void) | |||
| 965 | { | 968 | { |
| 966 | int i; | 969 | int i; |
| 967 | 970 | ||
| 971 | if (audit_initialized == AUDIT_DISABLED) | ||
| 972 | return 0; | ||
| 973 | |||
| 968 | printk(KERN_INFO "audit: initializing netlink socket (%s)\n", | 974 | printk(KERN_INFO "audit: initializing netlink socket (%s)\n", |
| 969 | audit_default ? "enabled" : "disabled"); | 975 | audit_default ? "enabled" : "disabled"); |
| 970 | audit_sock = netlink_kernel_create(&init_net, NETLINK_AUDIT, 0, | 976 | audit_sock = netlink_kernel_create(&init_net, NETLINK_AUDIT, 0, |
| @@ -976,7 +982,7 @@ static int __init audit_init(void) | |||
| 976 | 982 | ||
| 977 | skb_queue_head_init(&audit_skb_queue); | 983 | skb_queue_head_init(&audit_skb_queue); |
| 978 | skb_queue_head_init(&audit_skb_hold_queue); | 984 | skb_queue_head_init(&audit_skb_hold_queue); |
| 979 | audit_initialized = 1; | 985 | audit_initialized = AUDIT_INITIALIZED; |
| 980 | audit_enabled = audit_default; | 986 | audit_enabled = audit_default; |
| 981 | audit_ever_enabled |= !!audit_default; | 987 | audit_ever_enabled |= !!audit_default; |
| 982 | 988 | ||
| @@ -999,13 +1005,21 @@ __initcall(audit_init); | |||
| 999 | static int __init audit_enable(char *str) | 1005 | static int __init audit_enable(char *str) |
| 1000 | { | 1006 | { |
| 1001 | audit_default = !!simple_strtol(str, NULL, 0); | 1007 | audit_default = !!simple_strtol(str, NULL, 0); |
| 1002 | printk(KERN_INFO "audit: %s%s\n", | 1008 | if (!audit_default) |
| 1003 | audit_default ? "enabled" : "disabled", | 1009 | audit_initialized = AUDIT_DISABLED; |
| 1004 | audit_initialized ? "" : " (after initialization)"); | 1010 | |
| 1005 | if (audit_initialized) { | 1011 | printk(KERN_INFO "audit: %s", audit_default ? "enabled" : "disabled"); |
| 1012 | |||
| 1013 | if (audit_initialized == AUDIT_INITIALIZED) { | ||
| 1006 | audit_enabled = audit_default; | 1014 | audit_enabled = audit_default; |
| 1007 | audit_ever_enabled |= !!audit_default; | 1015 | audit_ever_enabled |= !!audit_default; |
| 1016 | } else if (audit_initialized == AUDIT_UNINITIALIZED) { | ||
| 1017 | printk(" (after initialization)"); | ||
| 1018 | } else { | ||
| 1019 | printk(" (until reboot)"); | ||
| 1008 | } | 1020 | } |
| 1021 | printk("\n"); | ||
| 1022 | |||
| 1009 | return 1; | 1023 | return 1; |
| 1010 | } | 1024 | } |
| 1011 | 1025 | ||
| @@ -1107,9 +1121,7 @@ unsigned int audit_serial(void) | |||
| 1107 | static inline void audit_get_stamp(struct audit_context *ctx, | 1121 | static inline void audit_get_stamp(struct audit_context *ctx, |
| 1108 | struct timespec *t, unsigned int *serial) | 1122 | struct timespec *t, unsigned int *serial) |
| 1109 | { | 1123 | { |
| 1110 | if (ctx) | 1124 | if (!ctx || !auditsc_get_stamp(ctx, t, serial)) { |
| 1111 | auditsc_get_stamp(ctx, t, serial); | ||
| 1112 | else { | ||
| 1113 | *t = CURRENT_TIME; | 1125 | *t = CURRENT_TIME; |
| 1114 | *serial = audit_serial(); | 1126 | *serial = audit_serial(); |
| 1115 | } | 1127 | } |
| @@ -1146,7 +1158,7 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, | |||
| 1146 | int reserve; | 1158 | int reserve; |
| 1147 | unsigned long timeout_start = jiffies; | 1159 | unsigned long timeout_start = jiffies; |
| 1148 | 1160 | ||
| 1149 | if (!audit_initialized) | 1161 | if (audit_initialized != AUDIT_INITIALIZED) |
| 1150 | return NULL; | 1162 | return NULL; |
| 1151 | 1163 | ||
| 1152 | if (unlikely(audit_filter_type(type))) | 1164 | if (unlikely(audit_filter_type(type))) |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 8ba0e0d934f..8b509441f49 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
| @@ -24,6 +24,7 @@ struct audit_chunk { | |||
| 24 | struct list_head trees; /* with root here */ | 24 | struct list_head trees; /* with root here */ |
| 25 | int dead; | 25 | int dead; |
| 26 | int count; | 26 | int count; |
| 27 | atomic_long_t refs; | ||
| 27 | struct rcu_head head; | 28 | struct rcu_head head; |
| 28 | struct node { | 29 | struct node { |
| 29 | struct list_head list; | 30 | struct list_head list; |
| @@ -56,7 +57,8 @@ static LIST_HEAD(prune_list); | |||
| 56 | * tree is refcounted; one reference for "some rules on rules_list refer to | 57 | * tree is refcounted; one reference for "some rules on rules_list refer to |
| 57 | * it", one for each chunk with pointer to it. | 58 | * it", one for each chunk with pointer to it. |
| 58 | * | 59 | * |
| 59 | * chunk is refcounted by embedded inotify_watch. | 60 | * chunk is refcounted by embedded inotify_watch + .refs (non-zero refcount |
| 61 | * of watch contributes 1 to .refs). | ||
| 60 | * | 62 | * |
