NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/39777: NFS client triggers kernel panics
On Fri, Oct 31, 2008 at 06:30:11PM +0000, Matthias Scheler wrote:
> This looks like a stack overflow to me.
It seems that I'm right. The following change caused the problem:
http://mail-index.netbsd.org/source-changes/2008/10/17/msg211423.html
If I reduce the size of the stack arrays like this ...
Index: nfs_bio.c
===================================================================
RCS file: /cvsroot/src/sys/nfs/nfs_bio.c,v
retrieving revision 1.179
diff -u -r1.179 nfs_bio.c
--- nfs_bio.c 17 Oct 2008 14:24:43 -0000 1.179
+++ nfs_bio.c 31 Oct 2008 18:57:40 -0000
@@ -921,7 +921,7 @@
int iomode;
bool stalewriteverf = false;
int i, npages = (bp->b_bcount + PAGE_SIZE - 1) >> PAGE_SHIFT;
- struct vm_page **pgs, *spgs[64];
+ struct vm_page **pgs, *spgs[16];
#ifndef NFS_V2_ONLY
bool needcommit = true; /* need only COMMIT RPC */
#else
@@ -1224,7 +1224,7 @@
struct uvm_object *uobj = &vp->v_uobj;
struct nfsnode *np = VTONFS(vp);
const int npages = *ap->a_count;
- struct vm_page *pg, **pgs, **opgs, *spgs[64];
+ struct vm_page *pg, **pgs, **opgs, *spgs[16];
off_t origoffset, len;
int i, error;
bool v3 = NFS_ISV3(vp);
... the machine doesn't panic.
But that is probably not an appropriate fix. I wonder whether the stack
optimization should be eliminated.
Kind regards
--
Matthias Scheler http://zhadum.org.uk/
Home |
Main Index |
Thread Index |
Old Index