From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Graf Subject: Re: [PATCH 2/2] IPVS: Add genetlink interface implementation Date: Thu, 10 Jul 2008 16:43:08 +0200 Message-ID: <20080710144308.GV20815@postel.suug.ch> References: <1215616317-11386-1-git-send-email-juliusv@google.com> <1215616317-11386-3-git-send-email-juliusv@google.com> <4874EABC.4000301@trash.net> <4875FD75.1090107@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Patrick McHardy , netdev@vger.kernel.org, lvs-devel@vger.kernel.org, vbusam@google.com, horms@verge.net.au, davem@davemloft.net To: Julius Volz Return-path: Content-Disposition: inline In-Reply-To: Sender: lvs-devel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org * Julius Volz 2008-07-10 15:58 > On Thu, Jul 10, 2008 at 2:15 PM, Patrick McHardy wrote: > > 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. > > There seems to be no such thing in genetlink. af_netlink.c tracks the > owner of a netlink socket, but that would increase the use count of > the genetlink module. > > First I would have suspected the genl_mutex to be held while dumping, > so that at least unregistering the family at module unload would > block. But the mutex is explicitly unlocked for the duration of the > netlink dump: It used to be like before the locking during dumps was revised. I promised to redo the locking and module owner tracking but haven't gotten around. Patrick's suggestion certainly makes sense. > net/netlink/genetlink.c: > > genl_unlock(); > err = netlink_dump_start(genl_sock, skb, nlh, > ops->dumpit, ops->done); > genl_lock(); > > Julius