]> err.no Git - linux-2.6/blobdiff - net/ipv4/tcp_minisocks.c
Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerp...
[linux-2.6] / net / ipv4 / tcp_minisocks.c
index 383cb38461c56ac2875c5dfd0dd367605ede24fc..4a3889dd194352a0e26f1f1c1b486ccad4c36a5c 100644 (file)
@@ -45,8 +45,7 @@ struct inet_timewait_death_row tcp_death_row = {
        .tw_timer       = TIMER_INITIALIZER(inet_twdr_hangman, 0,
                                            (unsigned long)&tcp_death_row),
        .twkill_work    = __WORK_INITIALIZER(tcp_death_row.twkill_work,
-                                            inet_twdr_twkill_work,
-                                            &tcp_death_row),
+                                            inet_twdr_twkill_work),
 /* Short-time timewait calendar */
 
        .twcal_hand     = -1,
@@ -351,8 +350,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
                 * socket up.  We've got bigger problems than
                 * non-graceful socket closings.
                 */
-               if (net_ratelimit())
-                       printk(KERN_INFO "TCP: time wait bucket table overflow\n");
+               LIMIT_NETDEBUG(KERN_INFO "TCP: time wait bucket table overflow\n");
        }
 
        tcp_update_metrics(sk);
@@ -667,11 +665,11 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
                                 * newsk structure. If we fail to get memory then we
                                 * end up not copying the key across. Shucks.
                                 */
-                               char *newkey = kmalloc(key->keylen, GFP_ATOMIC);
+                               char *newkey = kmemdup(key->key, key->keylen,
+                                                      GFP_ATOMIC);
                                if (newkey) {
                                        if (!tcp_alloc_md5sig_pool())
                                                BUG();
-                                       memcpy(newkey, key->key, key->keylen);
                                        tp->af_specific->md5_add(child, child,
                                                                 newkey,
                                                                 key->keylen);