Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-microblaze.git] / drivers / crypto / chelsio / chtls / chtls_io.c
index 0891ab8..6c29b2c 100644 (file)
@@ -97,7 +97,7 @@ static struct sk_buff *create_flowc_wr_skb(struct sock *sk,
        if (!skb)
                return NULL;
 
-       memcpy(__skb_put(skb, flowclen), flowc, flowclen);
+       __skb_put_data(skb, flowc, flowclen);
        skb_set_queue_mapping(skb, (csk->txq_idx << 1) | CPL_PRIORITY_DATA);
 
        return skb;
@@ -1702,7 +1702,7 @@ int chtls_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
                return peekmsg(sk, msg, len, nonblock, flags);
 
        if (sk_can_busy_loop(sk) &&
-           skb_queue_empty(&sk->sk_receive_queue) &&
+           skb_queue_empty_lockless(&sk->sk_receive_queue) &&
            sk->sk_state == TCP_ESTABLISHED)
                sk_busy_loop(sk, nonblock);
 
@@ -1841,8 +1841,7 @@ skip_copy:
                        tp->urg_data = 0;
 
                if (avail + offset >= skb->len) {
-                       if (likely(skb))
-                               chtls_free_skb(sk, skb);
+                       chtls_free_skb(sk, skb);
                        buffers_freed++;
 
                        if  (copied >= target &&