Commit 43d3b2f0 authored by Richard Cochran's avatar Richard Cochran Committed by Kamal Mostafa

net: dp83640: fix improper double spin locking.

[ Upstream commit adbe088f ]

A pair of nested spin locks was introduced in commit 63502b8d
"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: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent ed9c72a0
......@@ -845,7 +845,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;
......@@ -860,7 +860,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment