diff options
author | Richard Cochran <richardcochran@gmail.com> | 2015-05-25 12:55:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-26 01:21:59 +0300 |
commit | adbe088f6f8b0b7701fe07f51fe6f2bd602a6665 (patch) | |
tree | 49480fdc4359c842f64a480ead42a9531addcc2c /drivers/net | |
parent | a935865c828c8cd20501f618c69f659a5b6d6a5f (diff) | |
download | linux-adbe088f6f8b0b7701fe07f51fe6f2bd602a6665.tar.xz |
net: dp83640: fix improper double spin locking.
A pair of nested spin locks was introduced in commit 63502b8d0
"dp83640: Fix receive timestamp race condition".
Unfortunately the 'flags' parameter was reused for the inner lock,
clobbering the originally saved IRQ state. This patch fixes the issue
by changing the inner lock to plain spin_lock without irqsave.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/dp83640.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index e570036275e2..00cb41e71312 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -846,7 +846,7 @@ static void decode_rxts(struct dp83640_private *dp83640, list_del_init(&rxts->list); phy2rxts(phy_rxts, rxts); - spin_lock_irqsave(&dp83640->rx_queue.lock, flags); + spin_lock(&dp83640->rx_queue.lock); skb_queue_walk(&dp83640->rx_queue, skb) { struct dp83640_skb_info *skb_info; @@ -861,7 +861,7 @@ static void decode_rxts(struct dp83640_private *dp83640, break; } } - spin_unlock_irqrestore(&dp83640->rx_queue.lock, flags); + spin_unlock(&dp83640->rx_queue.lock); if (!shhwtstamps) list_add_tail(&rxts->list, &dp83640->rxts); |