Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment