Skip to content

Commit

Permalink
netlabel: return msg overflow error from netlbl_cipsov4_list faster
Browse files Browse the repository at this point in the history
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 <den@openvz.org>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Jul 15, 2008
1 parent 7197914 commit 83aa2e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netlabel/netlabel_cipso_v4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 83aa2e9

Please sign in to comment.