On 8/14/21 5:19 PM, Stanislav German-Evtushenko wrote:
On Saturday, August 14, 2021, Guenter Roeck <linux@xxxxxxxxxxxx <mailto:linux@xxxxxxxxxxxx>> wrote: > On Sun, Aug 15, 2021 at 04:13:45AM +0900, Stanislav German-Evtushenko wrote: >> If userspace opens the watchdog device self-feeding stops. Sometimes >> opening the device happens by accident, e.g. by mistakenly running grep >> recursively in a wrong directory which leads to the server being reset. >> >> Watchdog device does not handle read operation therefore the issue can be >> prevented by requiring the device to be opened for writing: >> >> - Prevent opening the device without FMODE_WRITE >> >> Signed-off-by: Stanislav German-Evtushenko <ginermail@xxxxxxxxx <mailto:ginermail@xxxxxxxxx>> > > NACK. That would be a major undocumented ABI change. Opening /dev/watchdog > for reading can be and is used today to test a watchdog. > > Guenter > I see. This is unfortunate. In this case I'll try to find the right place in the documentation and make it more explicit unless it is already there and I've overlooked.
No. That isn't the point. This is used and must not be changed. Again, people (including me( are _using_ this to test watchdogs. We are not going to disable that because some people are not careful when executing commands as root. Guenter