]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/sock.h
Pull bugzilla-9535 into release branch
[linux-2.6-omap-h63xx.git] / include / net / sock.h
index 567e468d74929c993f6c8fd14271068dc6bc0eb3..6e1542da33a1ae26ddc93b80a2071401c6f73c09 100644 (file)
@@ -944,7 +944,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
                return err;
        
        rcu_read_lock_bh();
-       filter = sk->sk_filter;
+       filter = rcu_dereference(sk->sk_filter);
        if (filter) {
                unsigned int pkt_len = sk_run_filter(skb, filter->insns,
                                filter->len);
@@ -1236,6 +1236,9 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
 {
        struct sk_buff *skb;
 
+       /* The TCP header must be at least 32-bit aligned.  */
+       size = ALIGN(size, 4);
+
        skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp);
        if (skb) {
                skb->truesize += mem;