sctp: dubious bitfields in sctp_transport
[safe/jmp/linux-2.6] / include / net / sock.h
index aed16eb..d2a71b0 100644 (file)
@@ -312,7 +312,7 @@ struct sock {
        void                    *sk_security;
 #endif
        __u32                   sk_mark;
-       /* XXX 4 bytes hole on 64 bit */
+       u32                     sk_classid;
        void                    (*sk_state_change)(struct sock *sk);
        void                    (*sk_data_ready)(struct sock *sk, int bytes);
        void                    (*sk_write_space)(struct sock *sk);
@@ -600,12 +600,15 @@ static inline int sk_stream_memory_free(struct sock *sk)
 /* OOB backlog add */
 static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb)
 {
-       if (!sk->sk_backlog.tail) {
-               sk->sk_backlog.head = sk->sk_backlog.tail = skb;
-       } else {
+       /* dont let skb dst not refcounted, we are going to leave rcu lock */
+       skb_dst_force(skb);
+
+       if (!sk->sk_backlog.tail)
+               sk->sk_backlog.head = skb;
+       else
                sk->sk_backlog.tail->next = skb;
-               sk->sk_backlog.tail = skb;
-       }
+
+       sk->sk_backlog.tail = skb;
        skb->next = NULL;
 }
 
@@ -1071,6 +1074,14 @@ extern void *sock_kmalloc(struct sock *sk, int size,
 extern void sock_kfree_s(struct sock *sk, void *mem, int size);
 extern void sk_send_sigurg(struct sock *sk);
 
+#ifdef CONFIG_CGROUPS
+extern void sock_update_classid(struct sock *sk);
+#else
+static inline void sock_update_classid(struct sock *sk)
+{
+}
+#endif
+
 /*
  * Functions to fill in entries in struct proto_ops when a protocol
  * does not implement a particular function.
@@ -1401,7 +1412,7 @@ static inline int sk_has_allocations(const struct sock *sk)
 
 /**
  * wq_has_sleeper - check if there are any waiting processes
- * @sk: struct socket_wq
+ * @wq: struct socket_wq
  *
  * Returns true if socket_wq has waiting processes
  *