Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc27e0d4 authored by Jeff Layton's avatar Jeff Layton Committed by J. Bruce Fields
Browse files

nfsd: don't allow legacy client tracker init for anything but init_net



This code isn't set up for containers, so don't allow it to be
used for anything but init_net.

Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 813fd320
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -416,6 +416,13 @@ nfsd4_load_reboot_recovery_data(struct net *net)
{
	int status;

	/* XXX: The legacy code won't work in a container */
	if (net != &init_net) {
		WARN(1, KERN_ERR "NFSD: attempt to initialize legacy client "
			"tracking in a container!\n");
		return -EINVAL;
	}

	nfs4_lock_state();
	status = nfsd4_init_recdir();
	if (!status)