public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] Possible dereference in net/core/rtnetlink.c
@ 2006-09-26 10:50 Eric Sesterhenn
  2006-09-27  6:28 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn @ 2006-09-26 10:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: kuznet

hi,

another possible dereference spotted by coverity (#cid 1390).
if the nlmsg_parse() call fails, we goto errout, where we call
dev_put(), with dev still initialized to NULL.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.18-git5/net/core/rtnetlink.c.orig	2006-09-26 12:48:03.000000000 +0200
+++ linux-2.6.18-git5/net/core/rtnetlink.c	2006-09-26 12:48:28.000000000 +0200
@@ -562,7 +562,7 @@ static int rtnl_getlink(struct sk_buff *
 
 	err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFLA_MAX, ifla_policy);
 	if (err < 0)
-		goto errout;
+		return err;
 
 	ifm = nlmsg_data(nlh);
 	if (ifm->ifi_index >= 0) {



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

* Re: [Patch] Possible dereference in net/core/rtnetlink.c
  2006-09-26 10:50 [Patch] Possible dereference in net/core/rtnetlink.c Eric Sesterhenn
@ 2006-09-27  6:28 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-09-27  6:28 UTC (permalink / raw)
  To: snakebyte; +Cc: linux-kernel, kuznet

From: Eric Sesterhenn <snakebyte@gmx.de>
Date: Tue, 26 Sep 2006 12:50:51 +0200

> another possible dereference spotted by coverity (#cid 1390).
> if the nlmsg_parse() call fails, we goto errout, where we call
> dev_put(), with dev still initialized to NULL.
> 
> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

Applied, thanks Eric.

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

end of thread, other threads:[~2006-09-27  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-26 10:50 [Patch] Possible dereference in net/core/rtnetlink.c Eric Sesterhenn
2006-09-27  6:28 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox