[asterisk-bugs] [DAHDI-linux 0009379]: [patch] zt_specchan_open race because ZT_FLAG_OPEN testing and setting is not atomic
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Oct 20 07:23:19 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=9379
======================================================================
Reported By: Matti
Assigned To: sruffell
======================================================================
Project: DAHDI-linux
Issue ID: 9379
Category: zaptel (the module)
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: assigned
JIRA:
Reviewboard Link:
======================================================================
Date Submitted: 2007-03-26 07:55 CDT
Last Modified: 2010-10-20 07:23 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
======================================================================
----------------------------------------------------------------------
(0128229) svnbot (reporter) - 2010-10-20 07:23
https://issues.asterisk.org/view.php?id=9379#c128229
----------------------------------------------------------------------
Repository: dahdi
Revision: 9444
U linux/trunk/drivers/dahdi/dahdi-base.c
U linux/trunk/drivers/dahdi/tor2.c
U linux/trunk/drivers/dahdi/wct1xxp.c
U linux/trunk/drivers/dahdi/wct4xxp/base.c
U linux/trunk/drivers/dahdi/wcte11xp.c
U linux/trunk/drivers/dahdi/wcte12xp/base.c
U linux/trunk/include/dahdi/kernel.h
------------------------------------------------------------------------
r9444 | sruffell | 2010-10-20 07:23:18 -0500 (Wed, 20 Oct 2010) | 12 lines
dahdi: Atomically set/test if channel has associated network device.
Push all tests for the DAHDI_FLAGBIT_NETDEV flag behind a
'dahdi_have_netdev' function so if CONFIG_DAHDI_NET is not defined the
compiler can just remove all the flag tests. Also, makes sure that the
bit is checked / set atomically.
(closes issue https://issues.asterisk.org/view.php?id=9379)
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Kinsey Moore <kmoore at digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>
------------------------------------------------------------------------
http://svn.digium.com/view/dahdi?view=rev&revision=9444
Issue History
Date Modified Username Field Change
======================================================================
2010-10-20 07:23 svnbot Checkin
2010-10-20 07:23 svnbot Note Added: 0128229
======================================================================
More information about the asterisk-bugs
mailing list