Re: [PATCH 009 of 20] knfsd: nfsd: use ip-address-based domain insecinfo case

From: J. Bruce Fields
Date: Tue Jul 10 2007 - 12:07:09 EST


Could you fold the below into this patch? Without this the server can
oops on attempts to access a filesystem not exported to the request's
source address! Thanks to Olga Kornievskaia for the testing that found
this.

--b.

diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 333e5cf..582b494 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1261,7 +1261,7 @@ gss:
&rqstp->rq_chandle);
if (PTR_ERR(gssexp) == -ENOENT)
return exp;
- if (exp)
+ if (exp && !IS_ERR(exp))
exp_put(exp);
return gssexp;
}
@@ -1291,7 +1291,7 @@ gss:
&rqstp->rq_chandle);
if (PTR_ERR(gssexp) == -ENOENT)
return exp;
- if (exp)
+ if (exp && !IS_ERR(exp))
exp_put(exp);
return gssexp;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/