From 83aa2e964b9b04effa304aaf3c1090b46812a04b Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Mon, 14 Jul 2008 22:28:25 -0700 Subject: [PATCH] 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: Denis V. Lunev Acked-by: Paul Moore Signed-off-by: David S. Miller --- net/netlabel/netlabel_cipso_v4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index 9080c61b71a5..0aec318bf0ef 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c @@ -591,7 +591,7 @@ list_retry: if (nlsze_mult < 4) { rcu_read_unlock(); kfree_skb(ans_skb); - nlsze_mult++; + nlsze_mult *= 2; goto list_start; } list_failure_lock: -- 2.39.5