Subject: Re: CVS commit: src/sys
To: Jason Thorpe <thorpej@shagadelic.org>
From: Elad Efrat <elad@NetBSD.org>
List: source-changes
Date: 11/30/2006 03:43:00
Jason Thorpe wrote:

> There is a bug in the code now -- vfe->fp is initialize with
> prop_data_data(), which allocates using M_TEMP (see prop_data(3)), but
> then you free with M_VERIEXEC. 

good catch. thanks! :)

> If you want to track this accurately
> with M_VERIEXEC, then you need to use prop_data_size() to allocate the
> buffer yourself, and get a pointer to the data to copy using
> prop_data_data_nocopy().

that's one solution. I preferred to rely on a size known in the kernel
already (from the fp-ops), and just sanity check vs. prop_data_size().

-e.

-- 
Elad Efrat