Commit 429d33ac authored by andrew hendry's avatar andrew hendry Committed by David S. Miller
Browse files

X25: Fix oops and refcnt problems from x25_dev_get



Calls to x25_dev_get check for dev = NULL which was not set.
It allowed x25 to set routes and ioctls on down interfaces.
This caused oopses and refcnt problems on device_unregister.

Signed-off-by: default avatarAndrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1fd975a0
......@@ -136,8 +136,10 @@ struct net_device *x25_dev_get(char *devname)
#if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE)
&& dev->type != ARPHRD_ETHER
#endif
)))
))){
dev_put(dev);
dev = NULL;
}
return dev;
}
......
Supports Markdown
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