Subject: Re: Solution(?) to kern/28804: quotacheck crashes on FFSv2
To: None <tech-kern@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 02/15/2007 09:39:39
--d9ADC0YsG2v16Js0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 12, 2007 at 07:59:27PM +0100, Edgar Fu? wrote:
> I don't know where this should belong.
>=20
> The original PR has been reported as kern, but it's really a userland
> problem.

Looks like it. The issue, though, is that more of our fs expertise hangs=20
on tech-kern, so this is a good list to use.

> Also, the PR (kern/28804) is more than two years old, so the people
> recorded as interested parties may no longer be active. I've replied to
> the PR, but probably no-one is going to read that unless I hint at it.

> There seem to be at least two obvious bugs in quotacheck.

> While comparing the source to fbd's version, I also noticed that fbd
> seems to have incorporated several enhancements, mostly by McKusick,
> thay may be worthwile to import. They deal with not accounting for
> either the accounting files themselves or snapshots and an optimisation
> regarding soft dependencies I don't understand.
>=20
> The following patch corrects the two problems (not setting ino, using a
> superblock field for sizing a malloc before reading in the SB):

It also strips the NetBSD header. Please don't do that. :-)

I would like someone else to look at it too, but the patch seems to fix=20
what you describe and looks good.

> --- quotacheck.c.orig	2004-12-12 06:57:03.000000000 +0100
> +++ quotacheck.c	2007-02-11 16:32:55.000000000 +0100
> @@ -1,5 +1,3 @@
> -/*	$NetBSD: quotacheck.c,v 1.36 2004/12/12 05:57:03 christos Exp $	*/
> -
>  /*
>   * Copyright (c) 1980, 1990, 1993
>   *	The Regents of the University of California.  All rights reserved.

As above, don't do this. Otherwise, looks good.

Take care,

Bill

--d9ADC0YsG2v16Js0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFF1JrbWz+3JHUci9cRArg7AJ9vni8BOYXp3BEBoYCdVTLEbZMUkQCePG35
FhbAFRNLlPGxzBLvscyEdwo=
=nhNx
-----END PGP SIGNATURE-----

--d9ADC0YsG2v16Js0--