I just fixed some problems in NetBSD-current's coda kernel support.
If you are running -current, make sure you have at least revision 1.20
of src/sys/coda/coda_venus.c.
Some of this was fallout from use of struct lwp instead of struct
proc, but the readlink bug was just a bug and longstanding.
Anyone running non-current NetBSD and probably FreeBSD and OpenBSD
should probably read this diff and see about the coda_readlink fix.
Basically, the code adds CODA_MAXPATHLEN to Osize, but this must be
done before the buffer is allocated (with "ALLOC") so that there is
allocated memory for venus to write to. (I'd appreciate a clean patch
for that against netbsd-3 and test results - then I can submit a
pullup request.)
On the subject of kernel support - how do people feel about pre-realm
support? I'm inclined to rip it out of NetBSD-current - on the theory
that the number of people who want to run NetBSD-current and Coda 5 is
surely zero. Thoughts?
From: Greg Troxel <[EMAIL PROTECTED]>
Subject: CVS commit: src/sys/coda
To: [EMAIL PROTECTED]
Message-Id: <[EMAIL PROTECTED]>
Date: Wed, 15 Mar 2006 14:30:56 +0000 (UTC)
Module Name: src
Committed By: gdt
Date: Wed Mar 15 14:30:56 UTC 2006
Modified Files:
src/sys/coda: coda_venus.c
Log Message:
Add comments explaining how the 3 size variables for venus calls are
used.
Remove defect in size allocation for coda_readlink to avoid having
venus write outside malloced space by including pathname space before
allocation.
Add asserts that cred structure is non-NULL and non-FSCRED.
Check lwp against NULL before dereferencing it.
Assert that output pointer is non-NULL on a few venus returns. This "can't
happen" but has been seen in crash dumps.
With these changes, the following work on a 345 MB coda volume.
(Before, a single invocation of tar or pax on this volume would
crash.)
$ for i in $(seq 1 10); do find . -type f -print0 |xargs -0 md5 > MD5.$i & done
Two copies of
$ for i in $(seq 1 10); do pax -w /coda/[redacted] >/dev/null & done
(lwp NULL check semi-reviewed by wrstuden@)
To generate a diff of this commit:
cvs rdiff -r1.19 -r1.20 src/sys/coda/coda_venus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.