提交 887e671f 编写于 作者: E Eric Dumazet 提交者: David S. Miller

decnet: netdevice refcount leak

While working on device refcount stuff, I found a device refcount leak
through DECNET.
This nasty bug can be used to hold refcounts on any !DECNET netdevice.
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f9dd09c7
......@@ -263,11 +263,10 @@ static int dn_def_dev_strategy(ctl_table *table,
return -ENODEV;
rv = -ENODEV;
if (dev->dn_ptr != NULL) {
if (dev->dn_ptr != NULL)
rv = dn_dev_set_default(dev, 1);
if (rv)
dev_put(dev);
}
if (rv)
dev_put(dev);
}
return rv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册