aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_out.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 10:52:45 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 10:52:45 -0500
commit07ce198a1eb3431d04a6d59ea9fb7b71f21e33b1 (patch)
treefe6e6208bdcdfb7bbb0c81923efcb75bf73a299b /net/ax25/ax25_out.c
parent4bc87e62775052aac0be7574d5f84ff06f61c6b4 (diff)
parenta442585952f137bd4cdb1f2f3166e4157d383b82 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (60 commits) [NIU]: Bump driver version and release date. [NIU]: Fix BMAC alternate MAC address indexing. net: fix kernel-doc warnings in header files [IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route. [IPV6]: dst_entry leak in ip4ip6_err. (resend) bluetooth: do not move child device other than rfcomm bluetooth: put hci dev after del conn [NET]: Elminate spurious print_mac() calls. [BLUETOOTH] hci_sysfs.c: Kill build warning. [NET]: Remove MAC_FMT net/8021q/vlan_dev.c: Use print_mac. [XFRM]: Fix ordering issue in xfrm_dst_hash_transfer(). [BLUETOOTH] net/bluetooth/hci_core.c: Use time_* macros [IPV6]: Fix hardcoded removing of old module code [NETLABEL]: Move some initialization code into __init section. [NETLABEL]: Shrink the genl-ops registration code. [AX25] ax25_out: check skb for NULL in ax25_kick() [TCP]: Fix tcp_v4_send_synack() comment [IPV4]: fix alignment of IP-Config output Documentation: fix tcp.txt ...
Diffstat (limited to 'net/ax25/ax25_out.c')
-rw-r--r--net/ax25/ax25_out.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c
index 92b517af7260..bf706f83a5c9 100644
--- a/net/ax25/ax25_out.c
+++ b/net/ax25/ax25_out.c
@@ -117,6 +117,12 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
117 unsigned char *p; 117 unsigned char *p;
118 int frontlen, len, fragno, ka9qfrag, first = 1; 118 int frontlen, len, fragno, ka9qfrag, first = 1;
119 119
120 if (paclen < 16) {
121 WARN_ON_ONCE(1);
122 kfree_skb(skb);
123 return;
124 }
125
120 if ((skb->len - 1) > paclen) { 126 if ((skb->len - 1) > paclen) {
121 if (*skb->data == AX25_P_TEXT) { 127 if (*skb->data == AX25_P_TEXT) {
122 skb_pull(skb, 1); /* skip PID */ 128 skb_pull(skb, 1); /* skip PID */
@@ -251,8 +257,6 @@ void ax25_kick(ax25_cb *ax25)
251 if (start == end) 257 if (start == end)
252 return; 258 return;
253 259
254 ax25->vs = start;
255
256 /* 260 /*
257 * Transmit data until either we're out of data to send or 261 * Transmit data until either we're out of data to send or
258 * the window is full. Send a poll on the final I frame if 262 * the window is full. Send a poll on the final I frame if
@@ -261,8 +265,13 @@ void ax25_kick(ax25_cb *ax25)
261 265
262 /* 266 /*
263 * Dequeue the frame and copy it. 267 * Dequeue the frame and copy it.
268 * Check for race with ax25_clear_queues().
264 */ 269 */
265 skb = skb_dequeue(&ax25->write_queue); 270 skb = skb_dequeue(&ax25->write_queue);
271 if (!skb)
272 return;
273
274 ax25->vs = start;
266 275
267 do { 276 do {
268 if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) { 277 if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) {