lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f4845fc0807091116s58b0b492p9f28281fcdca4e17@mail.gmail.com>
Date:	Wed, 9 Jul 2008 20:16:43 +0200
From:	"Julius Volz" <juliusv@...gle.com>
To:	"Patrick McHardy" <kaber@...sh.net>
Cc:	netdev@...r.kernel.org, lvs-devel@...r.kernel.org,
	vbusam@...gle.com, horms@...ge.net.au, davem@...emloft.net
Subject: Re: [PATCH 2/2] IPVS: Add genetlink interface implementation

On Wed, Jul 9, 2008, Patrick McHardy wrote:
> Just a few quick comments, will try to do a full review later:

Thanks!

>> + * Policy used for commands that operate on service, destination
>> + * or daemon entries
>> + */
>> +static struct nla_policy ip_vs_entries_policy[IPVS_ENTRY_ATTR_MAX + 1]
>> +__read_mostly = {
>
> These can all be const (and have the __read_mostly annotation removed).

Ok!

>> +static int ip_vs_genl_fill_stats(struct sk_buff *skb, int container_type,
>> +                                struct ip_vs_stats *stats)
>> +{
>> +       struct nlattr *nl_stats = nla_nest_start(skb, container_type);
>> +       if (!nl_stats)
>> +               goto nla_put_failure;
>
> Unbalanced locking.

Whoa, right! Will correct that.

>> +static int ip_vs_genl_set_cmd(struct sk_buff *skb, struct genl_info
>> *info)
>> +{
>> +       struct ip_vs_service *svc;
>> +       struct ip_vs_service_user usvc;
>> +       struct ip_vs_dest_user udest;
>> +       int ret = 0, cmd, flags;
>> +       int need_full_svc = 0, need_full_dest = 0;
>> +
>> +       cmd = info->genlhdr->cmd;
>> +       flags = info->nlhdr->nlmsg_flags;
>> +
>> +       /* increase the module use count */
>> +       ip_vs_use_count_inc();
>
> This looks fishy - the reference probably must be taken by
> genetlink before calling the command handler.

That would seem better, but is that possible? I took this from the
sockopt interface. What would you generally want to do in this
situation?

>> +void ip_vs_genl_unregister(void)
>> +{
>> +       genl_unregister_family(&ip_vs_genl_family);
>
> Doesn't it also has to unregister the ops?

No, that happens automatically when you unregister the family.

Julius

-- 
Google Switzerland GmbH
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ