Patchwork drivers/net/eql.c:fix a dev leakage

login
register
mail settings
Submitter Yang Hongyang
Date April 8, 2009, 3:06 a.m.
Message ID <49DC14B3.9020308@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/25701/
State Accepted
Delegated to: David Miller
Headers show

Comments

Yang Hongyang - April 8, 2009, 3:06 a.m.
After dev_get_by_name(),we should follow a dev_put().build test only.

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>

---
 drivers/net/eql.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
David Miller - April 8, 2009, 10:56 p.m.
From: Yang Hongyang <yanghy@cn.fujitsu.com>
Date: Wed, 08 Apr 2009 11:06:27 +0800

> After dev_get_by_name(),we should follow a dev_put().build test only.
> 
> Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/eql.c b/drivers/net/eql.c
index 51ead79..5210bb1 100644
--- a/drivers/net/eql.c
+++ b/drivers/net/eql.c
@@ -542,6 +542,8 @@  static int eql_s_slave_cfg(struct net_device *dev, slave_config_t __user *scp)
 	}
 	spin_unlock_bh(&eql->queue.lock);
 
+	dev_put(slave_dev);
+
 	return ret;
 }