]> git.baikalelectronics.ru Git - kernel.git/commit
NET: am79c961: fix race in link status code
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 5 Sep 2011 07:58:29 +0000 (08:58 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 5 Sep 2011 07:58:29 +0000 (08:58 +0100)
commit45881fdf0c512ac299271222f6f8de7eb4f9e2f7
tree02086e08de0cb385a332833bdc14b7c12c92b50a
parentb334b8f33d382f73f5a99aada97f35d68a01b6fe
NET: am79c961: fix race in link status code

The link status code operates from a timer, and writes the index
register without first taking a lock.  A well-placed interrupt
between writing the index register and reading the data register
could change the index register on us, which will return wrong data.
Add the necessary lock.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/net/arm/am79c961a.c