lkml.org 
[lkml]   [2006]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: 2.6.19: OOPS in cat /proc/fs/nfs/exports
On Tuesday December 5, Olaf.Titz@inka.de wrote:
>
> strace on exportfs shows this:nfsservctl(0x3, 0xbf875824, 0) =
> - -1 ENOMEM

What version of nfs-utils are you running? We haven't been using
nfsservctl(3, ...) on 2.6 kernels for ages - which probably explains
why exp_export() has suffered so much bit-rot. When I convinced
exportfs to use that nfsservctl I got a very similar oops.


This patch fixes it for me. Does it fix it for you too?

Thanks,
NeilBrown



diff .prev/fs/nfsd/export.c ./fs/nfsd/export.c
--- .prev/fs/nfsd/export.c 2006-12-06 14:57:24.000000000 +1100
+++ ./fs/nfsd/export.c 2006-12-07 12:36:28.000000000 +1100
@@ -983,6 +983,9 @@ exp_export(struct nfsctl_export *nxp)

dprintk("nfsd: creating export entry %p for client %p\n", exp, clp);

+ new.ex_path = kstrdup(nxp->ex_path, GFP_KERNEL);
+ if (!new.ex_path)
+ goto finish;
new.h.expiry_time = NEVER;
new.h.flags = 0;
new.ex_client = clp;
@@ -992,6 +995,9 @@ exp_export(struct nfsctl_export *nxp)
new.ex_anon_uid = nxp->ex_anon_uid;
new.ex_anon_gid = nxp->ex_anon_gid;
new.ex_fsid = nxp->ex_dev;
+ new.ex_fslocs.locations = NULL;
+ new.ex_fslocs.locations_count = 0;
+ new.ex_fslocs.migrated = 0;

exp = svc_export_lookup(&new);
if (exp)
@@ -1007,8 +1013,10 @@ exp_export(struct nfsctl_export *nxp)
cache_flush();
err = -ENOMEM;
}
-
+ err = 0;
finish:
+ if (new.ex_path)
+ kfree(new.ex_path);
if (exp)
exp_put(exp);
if (fsid_key && !IS_ERR(fsid_key))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-07 02:41    [W:0.099 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site