mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
[PATCH] genetlink: don't touch module ref count
Increasing the module ref count at registration will block the module from ever being unloaded. In fact, genetlink should not care about the owner at all. This patch removes the owner field from the struct registered with genetlink. Signed-off-by: Per Liden <per.liden@ericsson.com> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2e4e6a17af
commit
23b0ca5bf5
3 changed files with 0 additions and 9 deletions
|
@ -222,11 +222,6 @@ int genl_register_family(struct genl_family *family)
|
|||
goto errout_locked;
|
||||
}
|
||||
|
||||
if (!try_module_get(family->owner)) {
|
||||
err = -EBUSY;
|
||||
goto errout_locked;
|
||||
}
|
||||
|
||||
if (family->id == GENL_ID_GENERATE) {
|
||||
u16 newid = genl_generate_id();
|
||||
|
||||
|
@ -283,7 +278,6 @@ int genl_unregister_family(struct genl_family *family)
|
|||
INIT_LIST_HEAD(&family->ops_list);
|
||||
genl_unlock();
|
||||
|
||||
module_put(family->owner);
|
||||
kfree(family->attrbuf);
|
||||
genl_ctrl_event(CTRL_CMD_DELFAMILY, family);
|
||||
return 0;
|
||||
|
@ -535,7 +529,6 @@ static struct genl_family genl_ctrl = {
|
|||
.name = "nlctrl",
|
||||
.version = 0x1,
|
||||
.maxattr = CTRL_ATTR_MAX,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static int __init genl_init(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue