]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/sock.h
[NET]: Fix race condition in sk_wait_event().
[linux-2.6-omap-h63xx.git] / include / net / sock.h
index 1806e5b6141936376352373343c3a37510af6bbf..f63d0d56712c7c13febfa7016f5cc5ef2c1f734b 100644 (file)
@@ -478,9 +478,9 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
        rc = __condition;                                       \
        if (!rc) {                                              \
                *(__timeo) = schedule_timeout(*(__timeo));      \
-               rc = __condition;                               \
        }                                                       \
        lock_sock(__sk);                                        \
+       rc = __condition;                                       \
        rc;                                                     \
 })
 
@@ -1354,12 +1354,12 @@ extern int sock_get_timestamp(struct sock *, struct timeval __user *);
  *     Enable debug/info messages 
  */
 
-#if 0
-#define NETDEBUG(fmt, args...) do { } while (0)
-#define LIMIT_NETDEBUG(fmt, args...) do { } while(0)
-#else
+#ifdef CONFIG_NETDEBUG
 #define NETDEBUG(fmt, args...) printk(fmt,##args)
 #define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0)
+#else
+#define NETDEBUG(fmt, args...) do { } while (0)
+#define LIMIT_NETDEBUG(fmt, args...) do { } while(0)
 #endif
 
 /*