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:
1807a1a
)
synclink_gt fix module reference
author
Paul Fulghum
<
[email protected]
>
Wed, 22 Aug 2007 21:01:50 +0000
(14:01 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 23 Aug 2007 02:52:46 +0000
(19:52 -0700)
Get module reference on open() by generic HDLC to prevent module from
unloading while interface is active.
Signed-off-by: Paul Fulghum <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/char/synclink_gt.c
patch
|
blob
|
history
diff --git
a/drivers/char/synclink_gt.c
b/drivers/char/synclink_gt.c
index bbb7f1292665267bf22f3a59afb455abfb5aaf00..2f97d2f8f916fbd3b003e717e16e9d021632a1bc 100644
(file)
--- a/
drivers/char/synclink_gt.c
+++ b/
drivers/char/synclink_gt.c
@@
-1565,6
+1565,9
@@
static int hdlcdev_open(struct net_device *dev)
int rc;
unsigned long flags;
+ if (!try_module_get(THIS_MODULE))
+ return -EBUSY;
+
DBGINFO(("%s hdlcdev_open\n", dev->name));
/* generic HDLC layer open processing */
@@
-1634,6
+1637,7
@@
static int hdlcdev_close(struct net_device *dev)
info->netcount=0;
spin_unlock_irqrestore(&info->netlock, flags);
+ module_put(THIS_MODULE);
return 0;
}