[asterisk-bugs] [Zaptel 0009364]: [patch] ZT_CHANDIAG: allocate in heap, and enable by default

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Jun 7 12:49:42 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=9364 
====================================================================== 
Reported By:                tzafrir
Assigned To:                russell
====================================================================== 
Project:                    Zaptel
Issue ID:                   9364
Category:                   Core/General
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     closed
Zaptel Version:             1.4.1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        Yes 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             03-24-2007 04:36 CDT
Last Modified:              06-07-2008 12:49 CDT
====================================================================== 
Summary:                    [patch] ZT_CHANDIAG: allocate in heap, and enable by
default
Description: 
when the ioctl ZT_CHANDIAG is called, zaptel copies the zt_chan structure
aside and dumps it with printk-s. However it currently allocates the struct
on the stack. 

This big allocation on the stack gives a good chance for stack overrun,
and it seems that for that reason ZT_CHANDIAG is disabled by default. As it
is disabled, ztdiag does nothing.

The attached patch allocates the struct on the stack, and removes the
ifdef around that code.
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 06-07-08 12:49  
---------------------------------------------------------------------- 
Repository: dahdi
Revision: 2390

_U  team/mattf/zaptel-hotwct4xxp/
U   team/mattf/zaptel-hotwct4xxp/README.Linux26
U   team/mattf/zaptel-hotwct4xxp/wct4xxp/base.c
U   team/mattf/zaptel-hotwct4xxp/xpp/utils/genzaptelconf
U   team/mattf/zaptel-hotwct4xxp/xpp/utils/genzaptelconf.8
U   team/mattf/zaptel-hotwct4xxp/zaptel.c
U   team/mattf/zaptel-hotwct4xxp/zaptel.init
U   team/mattf/zaptel-hotwct4xxp/zaptel.xml

------------------------------------------------------------------------
r2390 | mattf | 2008-06-07 12:49:34 -0500 (Sat, 07 Jun 2008) | 186 lines

Merged revisions 2309,2324,2332,2344,2349,2355-2357,2360,2382-2384 via
svnmerge from 
https://origsvn.digium.com/svn/zaptel/trunk

................
r2309 | mattf | 2007-03-14 10:11:22 -0600 (Wed, 14 Mar 2007) | 18 lines

Merged revisions 2308 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.4

................
r2308 | mattf | 2007-03-14 10:08:55 -0600 (Wed, 14 Mar 2007) | 10 lines

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

........
r2307 | mattf | 2007-03-14 10:03:18 -0600 (Wed, 14 Mar 2007) | 2 lines

Fix bug in J1 mode configuration.

........

................

................
r2324 | file | 2007-03-19 10:32:03 -0600 (Mon, 19 Mar 2007) | 18 lines

Merged revisions 2323 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.4

................
r2323 | file | 2007-03-19 12:30:37 -0400 (Mon, 19 Mar 2007) | 10 lines

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

........
r2322 | file | 2007-03-19 12:28:58 -0400 (Mon, 19 Mar 2007) | 2 lines

Update documentation to match current Makefile. linux26 is no longer a
valid target. (issue http://bugs.digium.com/view.php?id=9296 reported by valley)

........

................

................
r2332 | tzafrir | 2007-03-22 01:01:21 -0600 (Thu, 22 Mar 2007) | 8 lines

* genzaptelconf -z will also generate the output of zapscan (The
additional 
  /etc/asterisk/zapscan.conf the asterisk gui needs).
* Also put every digital span N in group 10+N (in addition to 0 / 5).
* Removed useless fxs/fxo-s lists, and other unused code.
* Add wcte12xp to the modules list. Prefer vzaphfc to zaphfc.
* Default to ptmp for zapbri signalling.
* Should be more readable.

................
r2344 | russell | 2007-03-27 12:50:56 -0600 (Tue, 27 Mar 2007) | 21 lines

Merged revisions 2343 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.4

................
r2343 | russell | 2007-03-27 13:49:01 -0500 (Tue, 27 Mar 2007) | 13 lines

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

........
r2342 | russell | 2007-03-27 13:48:23 -0500 (Tue, 27 Mar 2007) | 5 lines

When debug is enabled, ensure that "debug=1" gets passed to the zaptel
module,
and not just the hardware modules.  Also, run "ztcfg -s" at the beginning
of
the "stop" action of the script.
(issue http://bugs.digium.com/view.php?id=7409, PCadach and tzafrir)

........

................

................
r2349 | russell | 2007-03-29 10:07:03 -0600 (Thu, 29 Mar 2007) | 18 lines

Blocked revisions 2348 via svnmerge

................
r2348 | russell | 2007-03-29 11:06:28 -0500 (Thu, 29 Mar 2007) | 11 lines

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

........
r2347 | russell | 2007-03-29 11:05:32 -0500 (Thu, 29 Mar 2007) | 3 lines

Add a README for HPEC, and add support for HPEC in the init script.
(issue http://bugs.digium.com/view.php?id=9413, chozian)

........

................

................
r2355 | qwell | 2007-03-30 13:00:28 -0600 (Fri, 30 Mar 2007) | 20 lines

Merged revisions 2354 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.4

................
r2354 | qwell | 2007-03-30 13:57:48 -0500 (Fri, 30 Mar 2007) | 12 lines

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

........
r2353 | qwell | 2007-03-30 13:56:46 -0500 (Fri, 30 Mar 2007) | 4 lines

Fix an issue where an echo can was freed incorrectly in certain
circumstances.

Issue 9292, fix suggested by ddv2005.

........

................

................
r2356 | qwell | 2007-03-30 13:18:40 -0600 (Fri, 30 Mar 2007) | 2 lines

Need to revert this last change.  trunk doesn't yet have all the right
stuff in place.

................
r2357 | qwell | 2007-03-30 13:19:13 -0600 (Fri, 30 Mar 2007) | 19 lines

Blocked revisions 2354 via svnmerge

................
r2354 | qwell | 2007-03-30 13:57:48 -0500 (Fri, 30 Mar 2007) | 12 lines

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

........
r2353 | qwell | 2007-03-30 13:56:46 -0500 (Fri, 30 Mar 2007) | 4 lines

Fix an issue where an echo can was freed incorrectly in certain
circumstances.

Issue 9292, fix suggested by ddv2005.

........

................

................
r2360 | mattf | 2007-03-30 15:07:03 -0600 (Fri, 30 Mar 2007) | 10 lines

Merged revisions 2359 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.4

........
r2359 | mattf | 2007-03-30 15:03:19 -0600 (Fri, 30 Mar 2007) | 2 lines

Fix potential spinlock recursion issue.

........

................
r2382 | russell | 2007-04-03 13:28:17 -0500 (Tue, 03 Apr 2007) | 2 lines

Improve the descriptions for things shown in menuselect.  (issue
http://bugs.digium.com/view.php?id=9450,
caio1982)

................
r2383 | qwell | 2007-04-03 14:08:30 -0500 (Tue, 03 Apr 2007) | 4 lines

Fix a couple of typos, and fix a small bug with remove_on_change for
wct4xxp driver.

Try to get a little closer to the 1.4 version.

................
r2384 | russell | 2007-04-03 18:39:58 -0500 (Tue, 03 Apr 2007) | 5 lines

The ZT_CHANDIAG ioctl was disabled by default because the large zt_chan
struct
that was being allocated on the stack is too big for some systems (those
with
4k stacks).  So, change the code to allocate the struct on the heap, and
let
the ioctl be always enabled.  (issue http://bugs.digium.com/view.php?id=9364,
patch by tzafrir, with minor
mods)

................

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

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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-07-08 12:49  svnbot         Checkin                                      
06-07-08 12:49  svnbot         Note Added: 0088278                          
======================================================================




More information about the asterisk-bugs mailing list