Re: [PATCH] watchdog: mena21_wdt: Fix a possible data race in a21_wdt_set_timeout

2018-05-07 Thread Jia-Ju Bai
On 2018/5/8 11:42, Guenter Roeck wrote: On 05/07/2018 08:32 PM, Jia-Ju Bai wrote: On 2018/5/8 11:28, Guenter Roeck wrote: On 05/07/2018 08:18 PM, Jia-Ju Bai wrote: The write operation to "wdt->timeout" is protected by the lock on line 118, but the read operation to this data on line 105 is

Re: [PATCH] watchdog: mena21_wdt: Fix a possible data race in a21_wdt_set_timeout

2018-05-07 Thread Guenter Roeck
On 05/07/2018 08:32 PM, Jia-Ju Bai wrote: On 2018/5/8 11:28, Guenter Roeck wrote: On 05/07/2018 08:18 PM, Jia-Ju Bai wrote: The write operation to "wdt->timeout" is protected by the lock on line 118, but the read operation to this data on line 105 is not protected by the lock. Thus, there may

Re: [PATCH] watchdog: mena21_wdt: Fix a possible data race in a21_wdt_set_timeout

2018-05-07 Thread Jia-Ju Bai
On 2018/5/8 11:28, Guenter Roeck wrote: On 05/07/2018 08:18 PM, Jia-Ju Bai wrote: The write operation to "wdt->timeout" is protected by the lock on line 118, but the read operation to this data on line 105 is not protected by the lock. Thus, there may exist a data race for "wdt->timeout". To

Re: [PATCH] watchdog: mena21_wdt: Fix a possible data race in a21_wdt_set_timeout

2018-05-07 Thread Guenter Roeck
On 05/07/2018 08:18 PM, Jia-Ju Bai wrote: The write operation to "wdt->timeout" is protected by the lock on line 118, but the read operation to this data on line 105 is not protected by the lock. Thus, there may exist a data race for "wdt->timeout". To fix this data race, the read operation to "

[PATCH] watchdog: mena21_wdt: Fix a possible data race in a21_wdt_set_timeout

2018-05-07 Thread Jia-Ju Bai
The write operation to "wdt->timeout" is protected by the lock on line 118, but the read operation to this data on line 105 is not protected by the lock. Thus, there may exist a data race for "wdt->timeout". To fix this data race, the read operation to "wdt->timeout" should be also protected by t