[Asterisk-cvs] zaptel wcfxs.c, 1.84.2.7, 1.84.2.8 wct4xxp.c,
1.51.2.3, 1.51.2.4 wcte11xp.c, 1.1.2.5, 1.1.2.6
russell at lists.digium.com
russell at lists.digium.com
Thu Mar 31 17:03:52 CST 2005
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv26626
Modified Files:
Tag: v1-0
wcfxs.c wct4xxp.c wcte11xp.c
Log Message:
add use counts to prevent kernel panics (bug #3773)
Index: wcfxs.c
===================================================================
RCS file: /usr/cvsroot/zaptel/Attic/wcfxs.c,v
retrieving revision 1.84.2.7
retrieving revision 1.84.2.8
diff -u -d -r1.84.2.7 -r1.84.2.8
--- wcfxs.c 28 Feb 2005 00:41:29 -0000 1.84.2.7
+++ wcfxs.c 31 Mar 2005 22:57:19 -0000 1.84.2.8
@@ -1660,7 +1660,9 @@
wc->usecount++;
#ifndef LINUX26
MOD_INC_USE_COUNT;
-#endif
+#else
+ try_module_get(THIS_MODULE);
+#endif
return 0;
}
@@ -1678,6 +1680,8 @@
wc->usecount--;
#ifndef LINUX26
MOD_DEC_USE_COUNT;
+#else
+ module_put(THIS_MODULE);
#endif
for (x=0;x<wc->cards;x++)
wc->mod.fxs.idletxhookstate[x] = 1;
Index: wct4xxp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wct4xxp.c,v
retrieving revision 1.51.2.3
retrieving revision 1.51.2.4
diff -u -d -r1.51.2.3 -r1.51.2.4
--- wct4xxp.c 17 Jan 2005 01:58:09 -0000 1.51.2.3
+++ wct4xxp.c 31 Mar 2005 22:57:19 -0000 1.51.2.4
@@ -544,7 +544,10 @@
{
#ifndef LINUX26
MOD_INC_USE_COUNT;
+#else
+ try_module_get(THIS_MODULE);
#endif
+
return 0;
}
@@ -552,6 +555,8 @@
{
#ifndef LINUX26
MOD_DEC_USE_COUNT;
+#else
+ module_put(THIS_MODULE);
#endif
return 0;
}
Index: wcte11xp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcte11xp.c,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- wcte11xp.c 1 Mar 2005 14:35:16 -0000 1.1.2.5
+++ wcte11xp.c 31 Mar 2005 22:57:19 -0000 1.1.2.6
@@ -226,6 +226,8 @@
wc->usecount++;
#ifndef LINUX26
MOD_INC_USE_COUNT;
+#else
+ try_module_get(THIS_MODULE);
#endif
return 0;
}
@@ -346,6 +348,8 @@
wc->usecount--;
#ifndef LINUX26
MOD_DEC_USE_COUNT;
+#else
+ module_put(THIS_MODULE);
#endif
/* If we're dead, release us now */
if (!wc->usecount && wc->dead)
More information about the svn-commits
mailing list