]> git.baikalelectronics.ru Git - kernel.git/commit
net: appletalk: cops: Fix data race in cops_probe1
authorSaubhik Mukherjee <saubhik.mukherjee@gmail.com>
Mon, 24 May 2021 13:37:12 +0000 (19:07 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 May 2021 21:00:32 +0000 (14:00 -0700)
commitbcd48735436c26ac8f7c7d87ad1aa548d778e22d
tree27225309b26e327b6b714fed294acac555f24a46
parent2441a5a742768f914ed861e27c32ca709508c566
net: appletalk: cops: Fix data race in cops_probe1

In cops_probe1(), there is a write to dev->base_addr after requesting an
interrupt line and registering the interrupt handler cops_interrupt().
The handler might be called in parallel to handle an interrupt.
cops_interrupt() tries to read dev->base_addr leading to a potential
data race. So write to dev->base_addr before calling request_irq().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Saubhik Mukherjee <saubhik.mukherjee@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/appletalk/cops.c