netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PKT_SCHED]: act_api: Fix module leak while flushing actions
@ 2006-07-09 14:20 Thomas Graf
  2006-07-09 18:38 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Graf @ 2006-07-09 14:20 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

Module reference needs to be given back if message header
construction fails.

Signed-off-by: Thomas Graf <tgraf@suug.ch>

Index: net-2.6.git/net/sched/act_api.c
===================================================================
--- net-2.6.git.orig/net/sched/act_api.c
+++ net-2.6.git/net/sched/act_api.c
@@ -602,8 +602,8 @@ static int tca_action_flush(struct rtatt
 	return err;
 
 rtattr_failure:
-	module_put(a->ops->owner);
 nlmsg_failure:
+	module_put(a->ops->owner);
 err_out:
 	kfree_skb(skb);
 	kfree(a);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PKT_SCHED]: act_api: Fix module leak while flushing actions
  2006-07-09 14:20 [PKT_SCHED]: act_api: Fix module leak while flushing actions Thomas Graf
@ 2006-07-09 18:38 ` David Miller
  2006-07-09 19:57   ` Thomas Graf
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2006-07-09 18:38 UTC (permalink / raw)
  To: tgraf; +Cc: netdev

From: Thomas Graf <tgraf@suug.ch>
Date: Sun, 9 Jul 2006 16:20:43 +0200

> Module reference needs to be given back if message header
> construction fails.
> 
> Signed-off-by: Thomas Graf <tgraf@suug.ch>

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PKT_SCHED]: act_api: Fix module leak while flushing actions
  2006-07-09 18:38 ` David Miller
@ 2006-07-09 19:57   ` Thomas Graf
  2006-07-10  1:18     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Graf @ 2006-07-09 19:57 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

* David Miller <davem@davemloft.net> 2006-07-09 11:38
> From: Thomas Graf <tgraf@suug.ch>
> Date: Sun, 9 Jul 2006 16:20:43 +0200
> 
> > Module reference needs to be given back if message header
> > construction fails.
> > 
> > Signed-off-by: Thomas Graf <tgraf@suug.ch>
> 
> 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.

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PKT_SCHED]: act_api: Fix module leak while flushing actions
  2006-07-09 19:57   ` Thomas Graf
@ 2006-07-10  1:18     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2006-07-10  1:18 UTC (permalink / raw)
  To: tgraf; +Cc: netdev

From: Thomas Graf <tgraf@suug.ch>
Date: Sun, 9 Jul 2006 21:57:34 +0200

> * David Miller <davem@davemloft.net> 2006-07-09 11:38
> > 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-10  1:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-09 14:20 [PKT_SCHED]: act_api: Fix module leak while flushing actions Thomas Graf
2006-07-09 18:38 ` David Miller
2006-07-09 19:57   ` Thomas Graf
2006-07-10  1:18     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).