Skip to contentSkip to conversation

fcoe:Fix incorrect use of non wrapper version of skb_buff helper function in fcoe_percpu_recieve_thread

PATCH NAK Nicholas Krause 2 participants 2 messages Sep 20, 2015 – Sep 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fcoe:Fix incorrect use of non wrapper version of skb_buff helper function in fcoe_percpu_recieve_thread

This fixes the incorrect use of the non wrapper version of the function skb_dequeue in fcoe_percpu_receive_thread to use the wrapper version as we need to protect avoid other users from concurrently access on the sk_buff_head tmp used as the link list head for this call to skb_queue.

---
 drivers/scsi/fcoe/fcoe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/fcoe/fcoe.c +1 -1
index d3eb80c..f89bd4c 100644
@@ -1888,7 +1888,7 @@ retry:
 
 		spin_unlock_bh(&p->fcoe_rx_list.lock);
 
-		while ((skb = __skb_dequeue(&tmp)) != NULL)
+		while ((skb = skb_dequeue(&tmp)) != NULL)
 			fcoe_recv_frame(skb);
 
 	}
Signature · 1 line
2.1.4
#1 lore raw
Quoted 5 lines · Nicholas Krause

This fixes the incorrect use of the non wrapper version of the function skb_dequeue in fcoe_percpu_receive_thread to use the wrapper version as we need to protect avoid other users from concurrently access on the sk_buff_head tmp used as the link list head for this call to skb_queue.

The sk_buff_head tmp is a local reference on the stack, so not accessed concurrently from anywhere. It's set with skb_queue_splice_init while holding the lock for the real fcoe_rx_list, specifically to batch process without repeatedly taking and dropping the lock.

Nak, flawed reasoning for justification.

- Chris