Subject: CVS commit: src
To: None <source-changes@netbsd.org>
From: Jason R Thorpe <thorpej@netbsd.org>
List: source-changes
Date: 03/13/1999 14:26:48
Module Name:	src
Committed By:	thorpej
Date:		Sat Mar 13 22:26:48 UTC 1999

Modified Files:
	src/sys/miscfs/procfs: procfs_cmdline.c
Log Message:
malloc the arg temporary buffer, rather than declaring it as an automatic
array of ARG_MAX size.  ARG_MAX is currently 256k, which causes a rather
serious stack overflow (kernel stacks are not very large, usually 8k).

Fixes memory corruption problems observed after accessig /proc/1/cmdline
during tests.  Problem in my case manifested itself as massive lossage
in ffs_sync(), resulting in a crash, and sometimes, pooched file systems.

XXX This could, and probably should, be rewritten to use a much smaller
temporary buffer, and a loop around uiomove().