On Mon, Jul 29, 2019 at 07:38:12AM -0700, Mark Balantzyan wrote: > Hi Guenter, > > My name is Mark, we corresponded in the recent past concerning a different > kernel module. > > I would just like to ask a question about pc87413_wdt.ko. In pc87413_wdt.c, > the function pc87413_init() calls pc87413_swc_base_addr() and swc_base_addr > gets assigned to. But pc87413_open() calls pc87413_refresh() which has > spinlocks around swc_base_addr. There may be a use before initialization, so > spinlocks get in the way. Is there a case possible where a bug/race > condition may be occurring here? Or is there a hardware synchronization > somewhere? > Yes, the misc device should only be created after all resources are in place. Question though is if that really matters, ie if anyone is still using the driver. If so, I'd rather see the driver converted to use the watchdog subsystem. Thanks, Guenter