Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87220
b: refs/heads/master
c: e653181
h: refs/heads/master
v: v3
  • Loading branch information
James Chapman authored and David S. Miller committed Mar 6, 2008
1 parent 46be36b commit 5649fc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf3752e2d203bbbfc88d29e362e6938cef4339b3
refs/heads/master: e653181dd6b3ad38ce14904351b03a5388f4b0f7
11 changes: 8 additions & 3 deletions trunk/drivers/net/pppol2tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,11 @@ static struct pppol2tp_tunnel *pppol2tp_tunnel_find(u16 tunnel_id)
static void pppol2tp_recv_queue_skb(struct pppol2tp_session *session, struct sk_buff *skb)
{
struct sk_buff *skbp;
struct sk_buff *tmp;
u16 ns = PPPOL2TP_SKB_CB(skb)->ns;

spin_lock_bh(&session->reorder_q.lock);
skb_queue_walk(&session->reorder_q, skbp) {
skb_queue_walk_safe(&session->reorder_q, skbp, tmp) {
if (PPPOL2TP_SKB_CB(skbp)->ns > ns) {
__skb_insert(skb, skbp->prev, skbp, &session->reorder_q);
PRINTK(session->debug, PPPOL2TP_MSG_SEQ, KERN_DEBUG,
Expand All @@ -371,10 +372,9 @@ static void pppol2tp_recv_dequeue_skb(struct pppol2tp_session *session, struct s
int length = PPPOL2TP_SKB_CB(skb)->length;
struct sock *session_sock = NULL;

/* We're about to requeue the skb, so unlink it and return resources
/* We're about to requeue the skb, so return resources
* to its current owner (a socket receive buffer).
*/
skb_unlink(skb, &session->reorder_q);
skb_orphan(skb);

tunnel->stats.rx_packets++;
Expand Down Expand Up @@ -470,6 +470,11 @@ static void pppol2tp_recv_dequeue(struct pppol2tp_session *session)
goto out;
}
}
__skb_unlink(skb, &session->reorder_q);

/* Process the skb. We release the queue lock while we
* do so to let other contexts process the queue.
*/
spin_unlock_bh(&session->reorder_q.lock);
pppol2tp_recv_dequeue_skb(session, skb);
spin_lock_bh(&session->reorder_q.lock);
Expand Down

0 comments on commit 5649fc7

Please sign in to comment.