Re: [PATCH v4 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-01-13 Thread Rasmus Villemoes
On 2017-01-11 12:02, Guenter Roeck wrote: > On 01/11/2017 12:11 AM, Rasmus Villemoes wrote: >> On 2017-01-10 19:08, Guenter Roeck wrote: >>> On Mon, Jan 09, 2017 at 04:02:32PM +0100, Rasmus Villemoes wrote: +static unsigned open_timeout; +module_param(open_timeout, uint, 0644);

Re: [PATCH v4 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-01-11 Thread Rasmus Villemoes
On 2017-01-10 19:08, Guenter Roeck wrote: On Mon, Jan 09, 2017 at 04:02:32PM +0100, Rasmus Villemoes wrote: +static unsigned open_timeout; +module_param(open_timeout, uint, 0644); + +static bool watchdog_past_open_deadline(struct watchdog_core_data *data) +{ + if (!open_timeout) +

Re: [PATCH v4 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-01-10 Thread Guenter Roeck
On Mon, Jan 09, 2017 at 04:02:32PM +0100, Rasmus Villemoes wrote: > The watchdog framework takes care of feeding a hardware watchdog until > userspace opens /dev/watchdogN. If that never happens for some reason > (buggy init script, corrupt root filesystem or whatnot) but the kernel > itself is

[PATCH v4 2/3] watchdog: introduce watchdog.open_timeout commandline parameter

2017-01-09 Thread Rasmus Villemoes
The watchdog framework takes care of feeding a hardware watchdog until userspace opens /dev/watchdogN. If that never happens for some reason (buggy init script, corrupt root filesystem or whatnot) but the kernel itself is fine, the machine stays up indefinitely. This patch allows setting an upper