* Patrick McHardy <[EMAIL PROTECTED]> 2005-08-13 02:36

> [NETLINK]: Support dynamic number of multicast groups per netlink family
> 
> Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
> 
> -     if ((err = __netlink_create(sock, protocol) < 0))
> +     nlk->groups = kmalloc(NLGRPSZ(groups), GFP_KERNEL);
> +     if (nlk->groups == NULL) {
> +             err = -ENOMEM;
>               goto out_module;
> +     }

Inteded to depute the cleanup of __netlink_create to a
call to sock_release() by the caller?

Given we remove the minimal group size of 32 introduced
in a later patch would it make sense to not allocate if
groups==0 at the cost of a few additional runtime checks?
I only see a real cost in do_one_broacast() but the
check for group -  1 >= ngroups already ensures it to be
allocated so I don't see any problems performance wise.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to