Subject: Re: cgd failure since hackathon
To: Quentin Garnier <cube@cubidou.net>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 11/30/2006 17:27:37
On Nov 30,  8:06pm, cube@cubidou.net (Quentin Garnier) wrote:
-- Subject: Re: cgd failure since hackathon

| On Thu, Nov 30, 2006 at 10:38:38AM -0800, brad harder wrote:
| >=20
| >=20
| >  I've been running -current since it was announced that 4 was being re-br=
| anched, and had no major problems to speak of. One of the things I'm runnin=
| g succesfully is cgd(4), and an encrypted /home and swap. Kernels build fro=
| m updated sources (since hackathon) yield however, yield this:
| >=20
| > cgd: large blocksize 4294967295
| > ioctl: Cannot allocate memory
| > cgdconfig: action failed on "/etc/cgd/cgd.conf" line 1
| >=20
| >=20
| > Does anybody have an idea what's going on with this, and if it requires a=
|  work-around on my part, or is a cgd failing.
| 
| The following patch should fix it.
| 
| Anyone objects?  The size_t -> ssize_t is necessary to avoid
| signed/unsigned mismatch, if we ever want to warn on that (I thought we
| did, though).
| 
| Also, why the magic number 4096?

Because we don't want to store any more on the stack. The proper fix
is to make the config program pass the right value instead of -1 if
possible. And the field should stay size_t...

christos