]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
net: Fix bus in SKB queue splicing interfaces.
authorDavid S. Miller <davem@davemloft.net>
Tue, 23 Sep 2008 04:57:21 +0000 (21:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Sep 2008 04:57:21 +0000 (21:57 -0700)
Handle the case of head being non-empty, by adding list->qlen
to head->qlen instead of using direct assignment.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h

index 027b06170b40bc67b2e7ad391775f3a4af5570e3..4a144e8d0538bd036324a36741ed9c6d0852f2e5 100644 (file)
@@ -738,7 +738,7 @@ static inline void skb_queue_splice(const struct sk_buff_head *list,
 {
        if (!skb_queue_empty(list)) {
                __skb_queue_splice(list, (struct sk_buff *) head, head->next);
-               head->qlen = list->qlen;
+               head->qlen += list->qlen;
        }
 }
 
@@ -754,7 +754,7 @@ static inline void skb_queue_splice_init(struct sk_buff_head *list,
 {
        if (!skb_queue_empty(list)) {
                __skb_queue_splice(list, (struct sk_buff *) head, head->next);
-               head->qlen = list->qlen;
+               head->qlen += list->qlen;
                __skb_queue_head_init(list);
        }
 }
@@ -769,7 +769,7 @@ static inline void skb_queue_splice_tail(const struct sk_buff_head *list,
 {
        if (!skb_queue_empty(list)) {
                __skb_queue_splice(list, head->prev, (struct sk_buff *) head);
-               head->qlen = list->qlen;
+               head->qlen += list->qlen;
        }
 }
 
@@ -786,7 +786,7 @@ static inline void skb_queue_splice_tail_init(struct sk_buff_head *list,
 {
        if (!skb_queue_empty(list)) {
                __skb_queue_splice(list, head->prev, (struct sk_buff *) head);
-               head->qlen = list->qlen;
+               head->qlen += list->qlen;
                __skb_queue_head_init(list);
        }
 }