: act_api: Fix module leak while flushing actions
Subsystems (3)
Module reference needs to be given back if message header construction fails.
net/sched/act_api.c +1 -1
@@ -602,8 +602,8 @@ static int tca_action_flush(struct rtattreturn err; rtattr_failure: -module_put (a->ops->owner); nlmsg_failure: +module_put (a->ops->owner); err_out:kfree_skb (skb);kfree (a);
From: Thomas Graf <[email protected]>
Date: Sun, 9 Jul 2006 16:20:43 +0200
Quoted 4 lines
Module reference needs to be given back if message header construction fails.
Signed-off-by Thomas Graf <[email protected]>
Applied, thanks Thomas.
This reminds me of something, not only are non-networking developers getting tripped up constantly about these magic code labels referenced from the netlink macros, they are tripping us up as well.
I really think it's time, at a minimum, to explicitly mention the labels as an argument to the macros, or something like that.
I'll try to cons something up when I get a chance. The current situation is too error prone.
* David Miller <[email protected]> 2006-07-09 11:38
Quoted 14 lines
From: Thomas Graf <[email protected]>
Date: Sun, 9 Jul 2006 16:20:43 +0200Quoted 4 lines
Module reference needs to be given back if message header construction fails.
Signed-off-by Thomas Graf <[email protected]>Applied, thanks Thomas.
This reminds me of something, not only are non-networking developers getting tripped up constantly about these magic code labels referenced from the netlink macros, they are tripping us up as well.
Quoted 5 lines
I really think it's time, at a minimum, to explicitly mention the labels as an argument to the macros, or something like that.
I'll try to cons something up when I get a chance. The current situation is too error prone.
I agree, that's why the new netlink api offers label free methods. The transformation patches for 2.6.19 converting all netlink users to use the new api will resolved these issues.
David Miller
maintainerFrom: Thomas Graf <[email protected]>
Date: Sun, 9 Jul 2006 21:57:34 +0200
Quoted 8 lines
* David Miller <[email protected]> 2006-07-09 11:38
Quoted 2 lines
I'll try to cons something up when I get a chance. The current situation is too error prone.
I agree, that's why the new netlink api offers label free methods. The transformation patches for 2.6.19 converting all netlink users to use the new api will resolved these issues.
Awesome, I look forward to seeing those patches.