Commit 5bd30d39 authored by Cong Wang's avatar Cong Wang Committed by David S. Miller
Browse files

netpoll: fix a missing dev refcounting

__dev_get_by_name() doesn't refcount the network device,
so we have to do this by ourselves. Noticed by Eric.

Cc: Eric Dumazet <>
Cc: Jiri Pirko <>
Cc: David S. Miller <>
Signed-off-by: default avatarCong Wang <>
Signed-off-by: default avatarDavid S. Miller <>
parent 07f623d3
......@@ -1056,6 +1056,7 @@ int netpoll_setup(struct netpoll *np)
err = -ENODEV;
goto unlock;
if (netdev_master_upper_dev_get(ndev)) {
np_err(np, "%s is a slave device, aborting\n", np->dev_name);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment