[PATCH AUTOSEL for 4.14 23/67] watchdog: Fix potential kref imbalance when opening watchdog

2018-03-07 Thread Sasha Levin
From: Guenter Roeck [ Upstream commit 4bcd615fad6adddc68b058d498b30a9e0e0db77a ] If a watchdog driver's open function sets WDOG_HW_RUNNING with the expectation that the watchdog can not be stopped, but then stops the watchdog anyway in its stop function, kref_get() wil not

[PATCH AUTOSEL for 4.14 23/67] watchdog: Fix potential kref imbalance when opening watchdog

2018-03-07 Thread Sasha Levin
From: Guenter Roeck [ Upstream commit 4bcd615fad6adddc68b058d498b30a9e0e0db77a ] If a watchdog driver's open function sets WDOG_HW_RUNNING with the expectation that the watchdog can not be stopped, but then stops the watchdog anyway in its stop function, kref_get() wil not be called in