Skip to content

Commit

Permalink
net: Fix bus in SKB queue splicing interfaces.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Sep 23, 2008
1 parent 0b815a1 commit 1d4a31d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand All @@ -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);
}
}
Expand All @@ -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;
}
}

Expand All @@ -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);
}
}
Expand Down

0 comments on commit 1d4a31d

Please sign in to comment.