Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85835
b: refs/heads/master
c: f47b725
h: refs/heads/master
i:
  85833: a59bc49
  85831: 3fd30ad
v: v3
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Feb 18, 2008
1 parent c845055 commit bd2dd2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: 9bf1d83e7ee653862ef740435a7f41e8fd6452a9
refs/heads/master: f47b7257c7368698eabff6fd7b340071932af640
13 changes: 11 additions & 2 deletions trunk/net/ax25/ax25_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
unsigned char *p;
int frontlen, len, fragno, ka9qfrag, first = 1;

if (paclen < 16) {
WARN_ON_ONCE(1);
kfree_skb(skb);
return;
}

if ((skb->len - 1) > paclen) {
if (*skb->data == AX25_P_TEXT) {
skb_pull(skb, 1); /* skip PID */
Expand Down Expand Up @@ -251,8 +257,6 @@ void ax25_kick(ax25_cb *ax25)
if (start == end)
return;

ax25->vs = start;

/*
* Transmit data until either we're out of data to send or
* the window is full. Send a poll on the final I frame if
Expand All @@ -261,8 +265,13 @@ void ax25_kick(ax25_cb *ax25)

/*
* Dequeue the frame and copy it.
* Check for race with ax25_clear_queues().
*/
skb = skb_dequeue(&ax25->write_queue);
if (!skb)
return;

ax25->vs = start;

do {
if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) {
Expand Down

0 comments on commit bd2dd2e

Please sign in to comment.