[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57B68DFC.4070204@oracle.com>
Date: Fri, 19 Aug 2016 10:11:32 +0530
From: Vaishali Thakkar <vaishali.thakkar@...cle.com>
To: David Miller <davem@...emloft.net>, andrianov@...ras.ru
Cc: mugunthanvnm@...com, a@...table.cc, felipe.balbi@...ux.intel.com,
fw@...len.de, netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
ldv-project@...uxtesting.org
Subject: Re: [PATCH] smc91c92_cs : add a spinlock to avoid race condition
On Friday 19 August 2016 09:37 AM, David Miller wrote:
> From: Pavel Andrianov <andrianov@...ras.ru>
> Date: Tue, 16 Aug 2016 16:39:06 +0300
>
>> smc_reset may be executed in parallel with timer function media_check.
>> To avoid data race in smc_set_xcvr a spinlock was added.
>>
>> Found by Linux Driver Verification project (linuxtesting.org).
>>
>> Signed-off-by: Pavel Andrianov <andrianov@...ras.ru>
>
> This is not sufficient.
>
> You have to block basically the entire function, because both
> smc_reset and media_check program the bank selection so could
> corrupt eachother's register accesses.
Hmm, but then there is a use of udelay as well. Would it be still
fine to acquire a spinlock on whole function?
>
--
Vaishali
Powered by blists - more mailing lists