[asterisk-bugs] [Zaptel 0010791]: set_tone_zone fails to read_trylock for no reason

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Jan 11 14:35:03 CST 2008


The following issue has been set as RELATED TO issue 0007620. 
====================================================================== 
http://bugs.digium.com/view.php?id=10791 
====================================================================== 
Reported By:                Matti
Assigned To:                mattf
====================================================================== 
Project:                    Zaptel
Issue ID:                   10791
Category:                   zaptel (the module)
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Zaptel Version:              SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 3052 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-21-2007 09:34 CDT
Last Modified:              01-11-2008 14:35 CST
====================================================================== 
Summary:                    set_tone_zone fails to read_trylock for no reason
Description: 
Because only userspace calls function set_tone_zone, the following
read_trylock alternative is unnecessary and the comments are wrong:

 1170 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
 1171   /* Since this routine is called both from IRQ as well as from
userspace,
 1172    * it is possible that we could be called during an IRQ while
userspace
 1173    * has locked this.  However unlikely, this could possibly cause
a
 1174    * deadlock. */
 1175   if (! read_trylock(&zone_lock))
 1176     return -EWOULDBLOCK;
 1177 #else
 1178   /* But there are no trylock macros for kernel versions before
2.6.11,
 1179    * so we do the unsafe thing anyway.  Such is the problem for
dealing
 1180    * with old, buggy kernels. */
 1181   read_lock(&zone_lock);
 1182 #endif
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0007620 [patch] hard-safe -> hard-unsafe loc...
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-11-08 14:35  russell        Relationship added       related to 0007620  
======================================================================




More information about the asterisk-bugs mailing list