Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1739517
| From | Oleksij Rempel <ore@pengutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] watchdog: Fix potential kref imbalance when opening watchdog |
| Date | 2017-09-26 07:30 +0200 |
| Message-ID | <utQBr-k1-1@gated-at.bofh.it> (permalink) |
| References | <utEgW-iV-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 25.09.2017 18:17, Guenter Roeck wrote: > 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 > watchdog_open(). If the watchdog then stops on close, WDOG_HW_RUNNING > will be cleared and kref_put() will be called, causing a kref imbalance. > As result the character device data structure will be released, which in > turn will cause the system to crash on the next call to watchdog_open(). Ach, ok. I see. So the stop patch should remove it from the start.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/2] watchdog: Fix potential kref imbalance when opening watchdog Guenter Roeck <linux@roeck-us.net> - 2017-09-25 18:20 +0200 [PATCH 2/2] watchdog: Fix kref imbalance seen if handle_boot_enabled=0 Guenter Roeck <linux@roeck-us.net> - 2017-09-25 18:20 +0200 Re: [PATCH 1/2] watchdog: Fix potential kref imbalance when opening watchdog Oleksij Rempel <ore@pengutronix.de> - 2017-09-26 07:30 +0200
csiph-web