projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da2e852
)
net: l2tp_eth: fix kernel panic on rmmod l2tp_eth
author
Eric Dumazet
<
[email protected]
>
Thu, 7 Jun 2012 00:07:20 +0000
(
00:07
+0000)
committer
David S. Miller
<
[email protected]
>
Thu, 7 Jun 2012 20:02:20 +0000
(13:02 -0700)
We must prevent module unloading if some devices are still attached to
l2tp_eth driver.
Signed-off-by: Eric Dumazet <
[email protected]
>
Reported-by: Denys Fedoryshchenko <
[email protected]
>
Tested-by: Denys Fedoryshchenko <
[email protected]
>
Cc: James Chapman <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/l2tp/l2tp_eth.c
patch
|
blob
|
history
diff --git
a/net/l2tp/l2tp_eth.c
b/net/l2tp/l2tp_eth.c
index 443591d629caadff0da53b2c861b8748e61edf7e..185f12f4a5fa21a90bbce5641b7d751722d8c9ca 100644
(file)
--- a/
net/l2tp/l2tp_eth.c
+++ b/
net/l2tp/l2tp_eth.c
@@
-162,6
+162,7
@@
static void l2tp_eth_delete(struct l2tp_session *session)
if (dev) {
unregister_netdev(dev);
spriv->dev = NULL;
+ module_put(THIS_MODULE);
}
}
}
@@
-249,6
+250,7
@@
static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 p
if (rc < 0)
goto out_del_dev;
+ __module_get(THIS_MODULE);
/* Must be done after register_netdev() */
strlcpy(session->ifname, dev->name, IFNAMSIZ);