diff options
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r-- | kernel/watchdog.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 7357842da933..13fdda1a4c91 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -857,6 +857,7 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write, | |||
857 | int err, old, new; | 857 | int err, old, new; |
858 | int *watchdog_param = (int *)table->data; | 858 | int *watchdog_param = (int *)table->data; |
859 | 859 | ||
860 | get_online_cpus(); | ||
860 | mutex_lock(&watchdog_proc_mutex); | 861 | mutex_lock(&watchdog_proc_mutex); |
861 | 862 | ||
862 | if (watchdog_suspended) { | 863 | if (watchdog_suspended) { |
@@ -908,6 +909,7 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write, | |||
908 | } | 909 | } |
909 | out: | 910 | out: |
910 | mutex_unlock(&watchdog_proc_mutex); | 911 | mutex_unlock(&watchdog_proc_mutex); |
912 | put_online_cpus(); | ||
911 | return err; | 913 | return err; |
912 | } | 914 | } |
913 | 915 | ||
@@ -949,6 +951,7 @@ int proc_watchdog_thresh(struct ctl_table *table, int write, | |||
949 | { | 951 | { |
950 | int err, old; | 952 | int err, old; |
951 | 953 | ||
954 | get_online_cpus(); | ||
952 | mutex_lock(&watchdog_proc_mutex); | 955 | mutex_lock(&watchdog_proc_mutex); |
953 | 956 | ||
954 | if (watchdog_suspended) { | 957 | if (watchdog_suspended) { |
@@ -974,6 +977,7 @@ int proc_watchdog_thresh(struct ctl_table *table, int write, | |||
974 | } | 977 | } |
975 | out: | 978 | out: |
976 | mutex_unlock(&watchdog_proc_mutex); | 979 | mutex_unlock(&watchdog_proc_mutex); |
980 | put_online_cpus(); | ||
977 | return err; | 981 | return err; |
978 | } | 982 | } |
979 | 983 | ||
@@ -988,6 +992,7 @@ int proc_watchdog_cpumask(struct ctl_table *table, int write, | |||
988 | { | 992 | { |
989 | int err; | 993 | int err; |
990 | 994 | ||
995 | get_online_cpus(); | ||
991 | mutex_lock(&watchdog_proc_mutex); | 996 | mutex_lock(&watchdog_proc_mutex); |
992 | 997 | ||
993 | if (watchdog_suspended) { | 998 | if (watchdog_suspended) { |
@@ -1015,6 +1020,7 @@ int proc_watchdog_cpumask(struct ctl_table *table, int write, | |||
1015 | } | 1020 | } |
1016 | out: | 1021 | out: |
1017 | mutex_unlock(&watchdog_proc_mutex); | 1022 | mutex_unlock(&watchdog_proc_mutex); |
1023 | put_online_cpus(); | ||
1018 | return err; | 1024 | return err; |
1019 | } | 1025 | } |
1020 | 1026 | ||