Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1465975

Re: [PATCH] smc91c92_cs : add a spinlock to avoid race condition

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] smc91c92_cs : add a spinlock to avoid race condition
Date 2016-08-19 06:10 +0200
Message-ID <s7Ji2-H0-5@gated-at.bofh.it> (permalink)
References <s6ML1-3GS-55@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] smc91c92_cs : add a spinlock to avoid race condition Pavel Andrianov <andrianov@ispras.ru> - 2016-08-16 15:40 +0200
  Re: [PATCH] smc91c92_cs : add a spinlock to avoid race condition David Miller <davem@davemloft.net> - 2016-08-19 06:10 +0200
    Re: [PATCH] smc91c92_cs : add a spinlock to avoid race condition Vaishali Thakkar <vaishali.thakkar@oracle.com> - 2016-08-19 06:50 +0200
      Re: [PATCH] smc91c92_cs : add a spinlock to avoid race condition David Miller <davem@davemloft.net> - 2016-08-19 08:10 +0200

csiph-web