vfs: Don't copy mount bind mounts of /proc/<pid>/ns/mnt between namespaces
[platform/adaptation/renesas_rcar/renesas_kernel.git] / net / ipv4 / tcp_minisocks.c
index 0f01788..ab1c086 100644 (file)
@@ -317,7 +317,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
                        key = tp->af_specific->md5_lookup(sk, sk);
                        if (key != NULL) {
                                tcptw->tw_md5_key = kmemdup(key, sizeof(*key), GFP_ATOMIC);
-                               if (tcptw->tw_md5_key && tcp_alloc_md5sig_pool(sk) == NULL)
+                               if (tcptw->tw_md5_key && !tcp_alloc_md5sig_pool())
                                        BUG();
                        }
                } while (0);
@@ -358,10 +358,8 @@ void tcp_twsk_destructor(struct sock *sk)
 #ifdef CONFIG_TCP_MD5SIG
        struct tcp_timewait_sock *twsk = tcp_twsk(sk);
 
-       if (twsk->tw_md5_key) {
-               tcp_free_md5sig_pool();
+       if (twsk->tw_md5_key)
                kfree_rcu(twsk->tw_md5_key, rcu);
-       }
 #endif
 }
 EXPORT_SYMBOL_GPL(tcp_twsk_destructor);