diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-23 00:57:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-23 00:57:21 -0400 |
commit | 1d4a31dde95af56edac4dee268249a29a21fa7c0 (patch) | |
tree | 68d9bd2d277aa13da4020111d2e8420b129dc373 /include/linux | |
parent | 0b815a1a6d43ab498674b8430c8c35ab08487a16 (diff) |
net: Fix bus in SKB queue splicing interfaces.
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/skbuff.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 027b06170b40..4a144e8d0538 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -738,7 +738,7 @@ static inline void skb_queue_splice(const struct sk_buff_head *list, | |||
738 | { | 738 | { |
739 | if (!skb_queue_empty(list)) { | 739 | if (!skb_queue_empty(list)) { |
740 | __skb_queue_splice(list, (struct sk_buff *) head, head->next); | 740 | __skb_queue_splice(list, (struct sk_buff *) head, head->next); |
741 | head->qlen = list->qlen; | 741 | head->qlen += list->qlen; |
742 | } | 742 | } |
743 | } | 743 | } |
744 | 744 | ||
@@ -754,7 +754,7 @@ static inline void skb_queue_splice_init(struct sk_buff_head *list, | |||
754 | { | 754 | { |
755 | if (!skb_queue_empty(list)) { | 755 | if (!skb_queue_empty(list)) { |
756 | __skb_queue_splice(list, (struct sk_buff *) head, head->next); | 756 | __skb_queue_splice(list, (struct sk_buff *) head, head->next); |
757 | head->qlen = list->qlen; | 757 | head->qlen += list->qlen; |
758 | __skb_queue_head_init(list); | 758 | __skb_queue_head_init(list); |
759 | } | 759 | } |
760 | } | 760 | } |
@@ -769,7 +769,7 @@ static inline void skb_queue_splice_tail(const struct sk_buff_head *list, | |||
769 | { | 769 | { |
770 | if (!skb_queue_empty(list)) { | 770 | if (!skb_queue_empty(list)) { |
771 | __skb_queue_splice(list, head->prev, (struct sk_buff *) head); | 771 | __skb_queue_splice(list, head->prev, (struct sk_buff *) head); |
772 | head->qlen = list->qlen; | 772 | head->qlen += list->qlen; |
773 | } | 773 | } |
774 | } | 774 | } |
775 | 775 | ||
@@ -786,7 +786,7 @@ static inline void skb_queue_splice_tail_init(struct sk_buff_head *list, | |||
786 | { | 786 | { |
787 | if (!skb_queue_empty(list)) { | 787 | if (!skb_queue_empty(list)) { |
788 | __skb_queue_splice(list, head->prev, (struct sk_buff *) head); | 788 | __skb_queue_splice(list, head->prev, (struct sk_buff *) head); |
789 | head->qlen = list->qlen; | 789 | head->qlen += list->qlen; |
790 | __skb_queue_head_init(list); | 790 | __skb_queue_head_init(list); |
791 | } | 791 | } |
792 | } | 792 | } |