提交 83aa2e96 编写于 作者: D Denis V. Lunev 提交者: David S. Miller

netlabel: return msg overflow error from netlbl_cipsov4_list faster

Currently, we are trying to place the information from the kernel to
1, 2, 3 and 4 pages sequentially. These pages are allocated via slab.
Though, from the slab point of view steps 3 and 4 are equivalent on
most architectures. So, lets skip 3 pages attempt.

By the way, should we switch from .doit to .dumpit interface here?
The amount of data seems quite big for me.
Signed-off-by: NDenis V. Lunev <den@openvz.org>
Acked-by: NPaul Moore <paul.moore@hp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7197914c
......@@ -591,7 +591,7 @@ static int netlbl_cipsov4_list(struct sk_buff *skb, struct genl_info *info)
if (nlsze_mult < 4) {
rcu_read_unlock();
kfree_skb(ans_skb);
nlsze_mult++;
nlsze_mult *= 2;
goto list_start;
}
list_failure_lock:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册