lkml.org 
[lkml]   [2016]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] smc91c92_cs : add a spinlock to avoid race condition
From
From: Pavel Andrianov <andrianov@ispras.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@ispras.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.

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.061 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site