Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1234437 > unrolled thread
| Started by | Ulrich Obergfell <uobergfe@redhat.com> |
|---|---|
| First post | 2015-09-28 22:50 +0200 |
| Last post | 2015-09-29 08:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/5] watchdog: fix error handling in proc_watchdog_thresh() Ulrich Obergfell <uobergfe@redhat.com> - 2015-09-28 22:50 +0200
Re: [PATCH 1/5] watchdog: fix error handling in proc_watchdog_thresh() Aaron Tomlin <atomlin@redhat.com> - 2015-09-29 08:50 +0200
| From | Ulrich Obergfell <uobergfe@redhat.com> |
|---|---|
| Date | 2015-09-28 22:50 +0200 |
| Subject | [PATCH 1/5] watchdog: fix error handling in proc_watchdog_thresh() |
| Message-ID | <qdNx1-23T-29@gated-at.bofh.it> |
Restore the previous value of watchdog_thresh _and_ sample_period
if proc_watchdog_update() returns an error. The variables must be
consistent to avoid false positives of the lockup detectors.
Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
---
kernel/watchdog.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 64ed1c3..cd9a504 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -914,13 +914,14 @@ int proc_watchdog_thresh(struct ctl_table *table, int write,
goto out;
/*
- * Update the sample period.
- * Restore 'watchdog_thresh' on failure.
+ * Update the sample period. Restore on failure.
*/
set_sample_period();
err = proc_watchdog_update();
- if (err)
+ if (err) {
watchdog_thresh = old;
+ set_sample_period();
+ }
out:
mutex_unlock(&watchdog_proc_mutex);
return err;
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Aaron Tomlin <atomlin@redhat.com> |
|---|---|
| Date | 2015-09-29 08:50 +0200 |
| Subject | Re: [PATCH 1/5] watchdog: fix error handling in proc_watchdog_thresh() |
| Message-ID | <qdWTE-792-9@gated-at.bofh.it> |
| In reply to | #1234437 |
[Multipart message — attachments visible in raw view] — view raw
On Mon 2015-09-28 22:44 +0200, Ulrich Obergfell wrote:
> Restore the previous value of watchdog_thresh _and_ sample_period
> if proc_watchdog_update() returns an error. The variables must be
> consistent to avoid false positives of the lockup detectors.
>
> Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
> ---
> kernel/watchdog.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 64ed1c3..cd9a504 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -914,13 +914,14 @@ int proc_watchdog_thresh(struct ctl_table *table, int write,
> goto out;
>
> /*
> - * Update the sample period.
> - * Restore 'watchdog_thresh' on failure.
> + * Update the sample period. Restore on failure.
> */
> set_sample_period();
> err = proc_watchdog_update();
> - if (err)
> + if (err) {
> watchdog_thresh = old;
> + set_sample_period();
> + }
> out:
> mutex_unlock(&watchdog_proc_mutex);
> return err;
Reviewed-by: Aaron Tomlin <atomlin@redhat.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web