diff options
Diffstat (limited to 'net/x25/x25_out.c')
-rw-r--r-- | net/x25/x25_out.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/x25/x25_out.c b/net/x25/x25_out.c index d00649f..0144271 100644 --- a/net/x25/x25_out.c +++ b/net/x25/x25_out.c @@ -68,8 +68,11 @@ int x25_output(struct sock *sk, struct sk_buff *skb) frontlen = skb_headroom(skb); while (skb->len > 0) { - if ((skbn = sock_alloc_send_skb(sk, frontlen + max_len, - noblock, &err)) == NULL){ + release_sock(sk); + skbn = sock_alloc_send_skb(sk, frontlen + max_len, + noblock, &err); + lock_sock(sk); + if (!skbn) { if (err == -EWOULDBLOCK && noblock){ kfree_skb(skb); return sent; |