aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-17 11:36:59 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-17 11:36:59 -0400
commitdd504ea16f34a29da4aa933ae7ab917fcfd25fd7 (patch)
tree0502645dc159be29c33c992e9e56dc3156074279 /kernel
parent5cf4cf65a8ccca44ec9b357ebdb2b517269d7e8a (diff)
parent0479ea0eab197b3e5d4c731f526c02e5e3fbfbd0 (diff)
Merge branch 'master' of /home/trondmy/repositories/git/linux-2.6/
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c6
-rw-r--r--kernel/power/disk.c3
-rw-r--r--kernel/power/main.c4
-rw-r--r--kernel/sysctl.c2
4 files changed, 7 insertions, 8 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 49530e40ea8..87069cfc18a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1427,10 +1427,8 @@ static void sighand_ctor(void *data, struct kmem_cache *cachep,
1427{ 1427{
1428 struct sighand_struct *sighand = data; 1428 struct sighand_struct *sighand = data;
1429 1429
1430 if (flags & SLAB_CTOR_CONSTRUCTOR) { 1430 spin_lock_init(&sighand->siglock);
1431 spin_lock_init(&sighand->siglock); 1431 INIT_LIST_HEAD(&sighand->signalfd_list);
1432 INIT_LIST_HEAD(&sighand->signalfd_list);
1433 }
1434} 1432}
1435 1433
1436void __init proc_caches_init(void) 1434void __init proc_caches_init(void)
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index b5f0543ed84..f445b9cd60f 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -416,7 +416,8 @@ static ssize_t disk_store(struct kset *kset, const char *buf, size_t n)
416 416
417 mutex_lock(&pm_mutex); 417 mutex_lock(&pm_mutex);
418 for (i = HIBERNATION_FIRST; i <= HIBERNATION_MAX; i++) { 418 for (i = HIBERNATION_FIRST; i <= HIBERNATION_MAX; i++) {
419 if (!strncmp(buf, hibernation_modes[i], len)) { 419 if (len == strlen(hibernation_modes[i])
420 && !strncmp(buf, hibernation_modes[i], len)) {
420 mode = i; 421 mode = i;
421 break; 422 break;
422 } 423 }
diff --git a/kernel/power/main.c b/kernel/power/main.c
index b98b80ccf43..8812985f302 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -290,13 +290,13 @@ static ssize_t state_store(struct kset *kset, const char *buf, size_t n)
290 len = p ? p - buf : n; 290 len = p ? p - buf : n;
291 291
292 /* First, check if we are requested to hibernate */ 292 /* First, check if we are requested to hibernate */
293 if (!strncmp(buf, "disk", len)) { 293 if (len == 4 && !strncmp(buf, "disk", len)) {
294 error = hibernate(); 294 error = hibernate();
295 return error ? error : n; 295 return error ? error : n;
296 } 296 }
297 297
298 for (s = &pm_states[state]; state < PM_SUSPEND_MAX; s++, state++) { 298 for (s = &pm_states[state]; state < PM_SUSPEND_MAX; s++, state++) {
299 if (*s && !strncmp(buf, *s, len)) 299 if (*s && len == strlen(*s) && !strncmp(buf, *s, len))
300 break; 300 break;
301 } 301 }
302 if (state < PM_SUSPEND_MAX && *s) 302 if (state < PM_SUSPEND_MAX && *s)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4073353abd4..30ee462ee79 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -227,7 +227,7 @@ static ctl_table kern_table[] = {
227 .ctl_name = KERN_CORE_PATTERN, 227 .ctl_name = KERN_CORE_PATTERN,
228 .procname = "core_pattern", 228 .procname = "core_pattern",
229 .data = core_pattern, 229 .data = core_pattern,
230 .maxlen = 128, 230 .maxlen = CORENAME_MAX_SIZE,
231 .mode = 0644, 231 .mode = 0644,
232 .proc_handler = &proc_dostring, 232 .proc_handler = &proc_dostring,
233 .strategy = &sysctl_string, 233 .strategy = &sysctl_string,