diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-04-13 12:02:21 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-04-13 12:02:21 +0800 |
| commit | 08562bfcb85748c69e5824fc6d1d77d5725787e4 (patch) | |
| tree | 905e39ccad43e244dbb09d4eccce1c91e0facce0 /kernel/watchdog.c | |
| parent | 9fe9bdd75b2ad9ed25152fce02f41fe63c542e8a (diff) | |
| parent | ad592b70ae97800d4f5bf535d45a680649e2789e (diff) | |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'kernel/watchdog.c')
| -rw-r--r-- | kernel/watchdog.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index e864906af3fc..1f1b05f5a94b 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -1020,6 +1020,9 @@ static int proc_watchdog_common(int which, struct ctl_table *table, int write, * both lockup detectors are disabled if proc_watchdog_update() * returns an error. */ + if (old == new) + goto out; + err = proc_watchdog_update(); } out: @@ -1064,7 +1067,7 @@ int proc_soft_watchdog(struct ctl_table *table, int write, int proc_watchdog_thresh(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - int err, old; + int err, old, new; get_online_cpus(); mutex_lock(&watchdog_proc_mutex); @@ -1084,6 +1087,10 @@ int proc_watchdog_thresh(struct ctl_table *table, int write, /* * Update the sample period. Restore on failure. */ + new = ACCESS_ONCE(watchdog_thresh); + if (old == new) + goto out; + set_sample_period(); err = proc_watchdog_update(); if (err) { |
