lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 7 Dec 2006 12:38:56 +1100
From:	Neil Brown <neilb@...e.de>
To:	Olaf Titz <Olaf.Titz@...a.de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: 2.6.19: OOPS in cat /proc/fs/nfs/exports

On Tuesday December 5, Olaf.Titz@...a.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ