Messages in this thread | | | Subject | Re: [PATCH v3 2/7] clocksource: Add Tegra186 timers support | From | Dmitry Osipenko <> | Date | Fri, 3 Apr 2020 23:58:40 +0300 |
| |
03.04.2020 23:22, Thierry Reding пишет: ... > +static int tegra186_wdt_set_timeout(struct watchdog_device *wdd, > + unsigned int timeout) > +{ > + struct tegra186_wdt *wdt = to_tegra186_wdt(wdd); > + > + if (watchdog_active(&wdt->base)) > + tegra186_wdt_disable(wdt);
Could this and other tegra186_wdt_enable/disable occurrences race with the interrupt handler?
Shouldn't IRQ be disabled/enable in a such cases to avoid the races?
> + wdt->base.timeout = timeout; > + > + if (watchdog_active(&wdt->base)) > + tegra186_wdt_enable(wdt); > + > + return 0; > +}
| |