LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH 2/2] IPVS: Add genetlink interface implementation

To: Julius Volz <juliusv@xxxxxxxxxx>
Subject: Re: [PATCH 2/2] IPVS: Add genetlink interface implementation
Cc: netdev@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, vbusam@xxxxxxxxxx, horms@xxxxxxxxxxxx, davem@xxxxxxxxxxxxx
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Thu, 10 Jul 2008 14:15:49 +0200
Julius Volz wrote:
On Wed, Jul 9, 2008, Patrick McHardy wrote:
+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?

There probably should be a struct module *owner in the
ops registered with genetlink. This is necessary at
least to make sure that modules don't disappear during
dumps.



--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>