Re: [PATCHv2] watchdog: Add stop_on_reboot parameter to control reboot policy

From: Dmitry Safonov
Date: Sun Feb 23 2020 - 06:22:49 EST


Hi Guenter,

On 2/22/20 4:06 PM, Guenter Roeck wrote:
> On Fri, Feb 14, 2020 at 04:22:09PM +0000, Dmitry Safonov wrote:
[..]
>> +static int stop_on_reboot = -1;
>> +module_param(stop_on_reboot, int, 0644);
>> +MODULE_PARM_DESC(stop_on_reboot, "Stop watchdogs on reboot (0=keep watching, 1=stop)");
>> +
>
> My major concern is that this is writeable at runtime.
> Changing the value won't change the behavior of already loaded
> drivers. Unloading and reloading the driver will change its behavior
> after the value was changed. This would be confusing, and it is hard
> to imagine for anyone to expect such a behavior. Does this have to be
> writeable ?

No, it wasn't. I've messed it up by thinking about fours in 0644, but
for some reason failed to recognize that it allows root writes.

I'll follow up with v3, sorry for simple-minded typo.

Thanks,
Dmitry