[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 Oct 5 12:57:21 CDT 2007


The following issue has been ASSIGNED. 
====================================================================== 
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:              10-05-2007 12:57 CDT
====================================================================== 
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
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-05-07 12:57  qwell          Status                   new => assigned     
10-05-07 12:57  qwell          Assigned To               => mattf           
======================================================================




More information about the asterisk-bugs mailing list