[asterisk-bugs] [Zaptel 0009379]: [patch] zt_specchan_open race because ZT_FLAG_OPEN testing and setting is not atomic

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Jun 7 13:59:54 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=9379 
====================================================================== 
Reported By:                Matti
Assigned To:                mattf
====================================================================== 
Project:                    Zaptel
Issue ID:                   9379
Category:                   zaptel (the module)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     assigned
Zaptel Version:             1.4.7.1  
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             03-26-2007 07:55 CDT
Last Modified:              06-07-2008 13:59 CDT
====================================================================== 
Summary:                    [patch] zt_specchan_open race because ZT_FLAG_OPEN
testing and setting is not atomic
Description: 
Function zt_specchan_open in file zaptel.c can have a race condition
because ZT_FLAG_OPEN testing and setting is not atomic. The function should
check and set the flag holding the spin lock continuously in and between
the following lines:
if (chans[unit]->flags & ZT_FLAG_OPEN)
chans[unit]->flags |= ZT_FLAG_OPEN;
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0010806 Channel opening and unregistering race
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 06-07-08 13:59  
---------------------------------------------------------------------- 
Repository: dahdi
Revision: 4183

_U  branches/1.4/
U   branches/1.4/kernel/zaptel-base.c
U   branches/1.4/kernel/zaptel.h

------------------------------------------------------------------------
r4183 | mattf | 2008-06-07 13:59:53 -0500 (Sat, 07 Jun 2008) | 1 line

Partial fix for http://bugs.digium.com/view.php?id=9379.  Fixes potential race
condition in open and close
routines for zaptel devices
------------------------------------------------------------------------

http://svn.digium.com/view/dahdi?view=rev&revision=4183 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-07-08 13:59  svnbot         Checkin                                      
06-07-08 13:59  svnbot         Note Added: 0088417                          
======================================================================




More information about the asterisk-bugs mailing list