Skip to content

Commit

Permalink
nfsd: don't allow legacy client tracker init for anything but init_net
Browse files Browse the repository at this point in the history
This code isn't set up for containers, so don't allow it to be
used for anything but init_net.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Jeff Layton authored and J. Bruce Fields committed Mar 26, 2012
1 parent 813fd32 commit cc27e0d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/nfsd/nfs4recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cc27e0d

Please sign in to comment.