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

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Jun 7 13:46:42 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10791 
====================================================================== 
Reported By:                Matti
Assigned To:                russell
====================================================================== 
Project:                    Zaptel
Issue ID:                   10791
Category:                   zaptel (the module)
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             09-21-2007 09:34 CDT
Last Modified:              06-07-2008 13:46 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
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0007620 [patch] hard-safe -> hard-unsafe loc...
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 06-07-08 13:46  
---------------------------------------------------------------------- 
Repository: dahdi
Revision: 3664

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

------------------------------------------------------------------------
r3664 | russell | 2008-06-07 13:46:41 -0500 (Sat, 07 Jun 2008) | 16 lines

Merged revisions 3663 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2

........
r3663 | russell | 2008-01-11 14:38:47 -0600 (Fri, 11 Jan 2008) | 8 lines

Revert an unnecessary trylock.  Multiple people have looked at this and
nobody
can see any reason why this would be required.

(closes issue http://bugs.digium.com/view.php?id=10791)
Reported by: Matti
Patches:
      patch uploaded by Matti (license 109)

........

------------------------------------------------------------------------

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

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




More information about the asterisk-bugs mailing list