[dahdi-commits] sruffell: linux/trunk r5236 - in /linux/trunk/drivers/dahdi: wctdm24xxp/ wcte...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Wed Nov 5 14:11:04 CST 2008


Author: sruffell
Date: Wed Nov  5 14:11:03 2008
New Revision: 5236

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5236
Log:
Check the return value of the down_interruptible call in order to quiet a
warning.  This semaphore does not protect any host data structures, but only
accesses to the VPMADT032 module.  The worse thing that could happen is that
the internal state of the VPM module is corrupted, and then would only happen
on module loading because otherwise access because that is the only time this
function is called in the context of a user process.  In this case, the module
would need to be reloaded again anyway.

(Closes issue #13742) 
Reported by smurfix

Modified:
    linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c
    linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c?view=diff&rev=5236&r1=5235&r2=5236
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c Wed Nov  5 14:11:03 2008
@@ -407,8 +407,11 @@
 	if (wc) {
 		struct vpm150m *vpm = wc->vpm150m;
 
-		if (vpm)
-			down_interruptible(&vpm->sem);
+		if (vpm) {
+			if (down_interruptible(&vpm->sem)) {
+				return;
+			}
+		}
 	}
 }
 

Modified: linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c?view=diff&rev=5236&r1=5235&r2=5236
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c Wed Nov  5 14:11:03 2008
@@ -1057,7 +1057,9 @@
 		struct vpm150m *vpm = wc->vpm150m;
 
 		if (vpm)
-			down_interruptible(&vpm->sem);
+			if (down_interruptible(&vpm->sem)) {
+				return;
+			}
 	}
 }
 




More information about the dahdi-commits mailing list