X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=net%2Fcore%2Frequest_sock.c;h=79ebd75fbe4dec5c57ddd34c4501c5858b04d8fb;hb=e92b43a3455d3e817c13481bb3ea3cd29d0a47f4;hp=98f0fc923f9195326ed9d0fe538e58fd7528d8d7;hpb=133a58c1fd97022690d53dd58df56579193cbc1d;p=powerpc.git diff --git a/net/core/request_sock.c b/net/core/request_sock.c index 98f0fc923f..79ebd75fbe 100644 --- a/net/core/request_sock.c +++ b/net/core/request_sock.c @@ -38,20 +38,18 @@ int reqsk_queue_alloc(struct request_sock_queue *queue, { const int lopt_size = sizeof(struct listen_sock) + nr_table_entries * sizeof(struct request_sock *); - struct listen_sock *lopt = kmalloc(lopt_size, GFP_KERNEL); + struct listen_sock *lopt = kzalloc(lopt_size, GFP_KERNEL); if (lopt == NULL) return -ENOMEM; - memset(lopt, 0, lopt_size); - for (lopt->max_qlen_log = 6; (1 << lopt->max_qlen_log) < sysctl_max_syn_backlog; lopt->max_qlen_log++); get_random_bytes(&lopt->hash_rnd, sizeof(lopt->hash_rnd)); rwlock_init(&queue->syn_wait_lock); - queue->rskq_accept_head = queue->rskq_accept_head = NULL; + queue->rskq_accept_head = NULL; lopt->nr_table_entries = nr_table_entries; write_lock_bh(&queue->syn_wait_lock);