[asterisk-bugs] [DAHDI-linux 0015252]: [patch] procfs in dahdi can produce wrong (broken) data and warning

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Jun 4 16:14:54 CDT 2009


The following issue has been RESOLVED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15252 
====================================================================== 
Reported By:                biohumanoid
Assigned To:                sruffell
====================================================================== 
Project:                    DAHDI-linux
Issue ID:                   15252
Category:                   dahdi (the module)
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-06-02 06:11 CDT
Last Modified:              2009-06-04 16:14 CDT
====================================================================== 
Summary:                    [patch] procfs in dahdi can produce wrong (broken)
data and warning
Description: 
/* In Linux 2.6, this MUST NOT EXECEED 1024 bytes in one read! */
It's not truth...

/* In Linux 2.6, page is always PROC_BLOCK_SIZE=(PAGE_SIZE-1024) bytes.
 * 0<count<=PROC_BLOCK_SIZE . count=1 will produce an error in
 * vsnprintf ('head -c 1 /proc/dahdi/1', 'dd bs=1').*/

head -c 10 /proc/dahdi/1 or if you have a lot of channels, you will see
the following:
May 25 15:48:28 asteroid kernel: [  722.051812] WARNING: at
lib/vsprintf.c:609 vsnprintf+0x38/0x452()
and a broken output...

====================================================================== 

---------------------------------------------------------------------- 
 (0106029) svnbot (reporter) - 2009-06-04 16:14
 https://issues.asterisk.org/view.php?id=15252#c106029 
---------------------------------------------------------------------- 
Repository: dahdi
Revision: 6675

U   linux/trunk/drivers/dahdi/dahdi-base.c

------------------------------------------------------------------------
r6675 | sruffell | 2009-06-04 16:14:53 -0500 (Thu, 04 Jun 2009) | 7 lines

dahdi-base: Fix bug in procfs handling.

Fix bug in procfs handling where it was possible to get a warning in
lib/vsprintf.c when reading from /proc/dahdi/x.

Patch by: biohumanoid
(closes issue https://issues.asterisk.org/view.php?id=15252)
------------------------------------------------------------------------

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-06-04 16:14 svnbot         Checkin                                      
2009-06-04 16:14 svnbot         Note Added: 0106029                          
2009-06-04 16:14 svnbot         Status                   acknowledged =>
assigned
2009-06-04 16:14 svnbot         Status                   assigned => resolved
2009-06-04 16:14 svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list