[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6fb7fc90-1577-98ac-2be3-a8aa631f11ef@roeck-us.net>
Date: Fri, 7 Aug 2020 12:00:56 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Evgeny Novikov <novikov@...ras.ru>,
"madhuparnabhowmik10@...il.com" <madhuparnabhowmik10@...il.com>
Cc: "ldv-project@...uxtesting.org" <ldv-project@...uxtesting.org>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"wim@...ux-watchdog.org" <wim@...ux-watchdog.org>
Subject: Re: [ldv-project] [PATCH] drivers: watchdog: rdc321x_wdt: Fix race
condition bugs
On 8/7/20 11:30 AM, Evgeny Novikov wrote:
> 07.08.2020, 19:21, "Guenter Roeck" <linux@...ck-us.net>:
>> On Fri, Aug 07, 2020 at 04:59:02PM +0530, madhuparnabhowmik10@...il.com wrote:
>>> From: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
>>>
>>> In rdc321x_wdt_probe(), rdc321x_wdt_device.queue is initialized
>>> after misc_register(), hence if ioctl is called before its
>>> initialization which can call rdc321x_wdt_start() function,
>>> it will see an uninitialized value of rdc321x_wdt_device.queue,
>>> hence initialize it before misc_register().
>>> Also, rdc321x_wdt_device.default_ticks is accessed in reset()
>>> function called from write callback, thus initialize it before
>>> misc_register().
>>>
>>> Found by Linux Driver Verification project (linuxtesting.org).
>>>
>>> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
>>
>> Reviewed-by: Guenter Roeck <linux@...ck-us.net>
>>
>> Having said that ... this is yet another potentially obsolete driver.
>> You are really wasting your (and, fwiw, my) time.
>
> Static analysis tools are not aware about obsolete drivers.
> It would be great if there will be some formal way to filter them out.
> Maybe some file will enumerate all obsolete drivers, or there will be
> something within their source code, or something else.
>
In general, all watchdog drivers not implementing the watchdog API
are effectively obsolete and should not be touched. If they are still
in use (meaning someone has a means to test them), they should be
converted to use the watchdog API instead.
Guenter
Powered by blists - more mailing lists