summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2018-12-24 12:45:04 +0100
committerJ. Bruce Fields <bfields@redhat.com>2018-12-28 03:01:41 +0100
commita289ce5311f406bf846614591300a948ebc42062 (patch)
tree52672e4111d17511c4b8f7c3beb7f804e790decc /fs
parentsunrpc: use-after-free in svc_process_common() (diff)
downloadlinux-a289ce5311f406bf846614591300a948ebc42062.tar.xz
linux-a289ce5311f406bf846614591300a948ebc42062.zip
sunrpc: replace svc_serv->sv_bc_xprt by boolean flag
svc_serv-> sv_bc_xprt is netns-unsafe and cannot be used as pointer. To prevent its misuse in future it is replaced by new boolean flag. Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/callback.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 509dc5adeb8f..6dd04774aedc 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -206,11 +206,13 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv,
goto err_bind;
}
- ret = -EPROTONOSUPPORT;
+ ret = 0;
if (!IS_ENABLED(CONFIG_NFS_V4_1) || minorversion == 0)
ret = nfs4_callback_up_net(serv, net);
- else if (xprt->ops->bc_up)
- ret = xprt->ops->bc_up(serv, net);
+ else if (xprt->ops->bc_setup)
+ serv->sv_bc_enabled = true;
+ else
+ ret = -EPROTONOSUPPORT;
if (ret < 0) {
printk(KERN_ERR "NFS: callback service start failed\n");