Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2006 03:00:24 GMT
From:      Peter Verschoor <peter.j.verschoor@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/94528: linprocfs /proc/memory reports wrong size for swap
Message-ID:  <200603160300.k2G30ObR014799@www.freebsd.org>
Resent-Message-ID: <200603161509.k2GF9CmF081998@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         94528
>Category:       misc
>Synopsis:       linprocfs /proc/memory reports wrong size for swap
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 16 15:09:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Peter Verschoor
>Release:        5-stable
>Organization:
>Environment:
>Description:
uninitialized variables in sys/compat/linprocfs/linprocfs.c
function: linprocfs_domeminfo()  i and j are uninitialized

you call swap_pager_status(&i, &j);

swap_pager_status does
  *i += sp->sw_nblks;
  *j += sp->sw_used;
 but i and j contain random data

>How-To-Repeat:
top reports wrong size for swap
cat /proc/meminfo has wrong size

has been reported before as kern/31048
still shows as open
>Fix:
solution: initialize i and j to 0 in linprocfs.c before call
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603160300.k2G30ObR014799>