Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPV6]: ipv6_fl_socklist is inadvertently shared. [TCP]: Fix tcp_mem[] initialization. [NET]: Copy mac_len in skb_clone() as well [IPV4]: Do not disable preemption in trie_leaf_remove().
This commit is contained in:
commit
24c4ac070a
@ -463,6 +463,7 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
|
|||||||
memcpy(n->cb, skb->cb, sizeof(skb->cb));
|
memcpy(n->cb, skb->cb, sizeof(skb->cb));
|
||||||
C(len);
|
C(len);
|
||||||
C(data_len);
|
C(data_len);
|
||||||
|
C(mac_len);
|
||||||
C(csum);
|
C(csum);
|
||||||
C(local_df);
|
C(local_df);
|
||||||
n->cloned = 1;
|
n->cloned = 1;
|
||||||
|
@ -1527,7 +1527,6 @@ static int trie_leaf_remove(struct trie *t, t_key key)
|
|||||||
t->revision++;
|
t->revision++;
|
||||||
t->size--;
|
t->size--;
|
||||||
|
|
||||||
preempt_disable();
|
|
||||||
tp = NODE_PARENT(n);
|
tp = NODE_PARENT(n);
|
||||||
tnode_free((struct tnode *) n);
|
tnode_free((struct tnode *) n);
|
||||||
|
|
||||||
@ -1537,7 +1536,6 @@ static int trie_leaf_remove(struct trie *t, t_key key)
|
|||||||
rcu_assign_pointer(t->trie, trie_rebalance(t, tp));
|
rcu_assign_pointer(t->trie, trie_rebalance(t, tp));
|
||||||
} else
|
} else
|
||||||
rcu_assign_pointer(t->trie, NULL);
|
rcu_assign_pointer(t->trie, NULL);
|
||||||
preempt_enable();
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2458,11 +2458,18 @@ void __init tcp_init(void)
|
|||||||
sysctl_max_syn_backlog = 128;
|
sysctl_max_syn_backlog = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allow no more than 3/4 kernel memory (usually less) allocated to TCP */
|
/* Set the pressure threshold to be a fraction of global memory that
|
||||||
sysctl_tcp_mem[0] = (1536 / sizeof (struct inet_bind_hashbucket)) << order;
|
* is up to 1/2 at 256 MB, decreasing toward zero with the amount of
|
||||||
sysctl_tcp_mem[1] = sysctl_tcp_mem[0] * 4 / 3;
|
* memory, with a floor of 128 pages.
|
||||||
|
*/
|
||||||
|
limit = min(nr_all_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT);
|
||||||
|
limit = (limit * (nr_all_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11);
|
||||||
|
limit = max(limit, 128UL);
|
||||||
|
sysctl_tcp_mem[0] = limit / 4 * 3;
|
||||||
|
sysctl_tcp_mem[1] = limit;
|
||||||
sysctl_tcp_mem[2] = sysctl_tcp_mem[0] * 2;
|
sysctl_tcp_mem[2] = sysctl_tcp_mem[0] * 2;
|
||||||
|
|
||||||
|
/* Set per-socket limits to no more than 1/128 the pressure threshold */
|
||||||
limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7);
|
limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7);
|
||||||
max_share = min(4UL*1024*1024, limit);
|
max_share = min(4UL*1024*1024, limit);
|
||||||
|
|
||||||
|
@ -1453,6 +1453,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
|
|||||||
First: no IPv4 options.
|
First: no IPv4 options.
|
||||||
*/
|
*/
|
||||||
newinet->opt = NULL;
|
newinet->opt = NULL;
|
||||||
|
newnp->ipv6_fl_list = NULL;
|
||||||
|
|
||||||
/* Clone RX bits */
|
/* Clone RX bits */
|
||||||
newnp->rxopt.all = np->rxopt.all;
|
newnp->rxopt.all = np->rxopt.all;
|
||||||
|
Loading…
Reference in New Issue
Block a user