nfs: remove net pointer from messages
Publishing of net pointer is not safe, use net->ns.inum instead Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
4112be70be
commit
e4949e4b3d
|
@ -48,15 +48,15 @@ static int nfs4_callback_up_net(struct svc_serv *serv, struct net *net)
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
goto out_err;
|
goto out_err;
|
||||||
nn->nfs_callback_tcpport = ret;
|
nn->nfs_callback_tcpport = ret;
|
||||||
dprintk("NFS: Callback listener port = %u (af %u, net %p)\n",
|
dprintk("NFS: Callback listener port = %u (af %u, net %x)\n",
|
||||||
nn->nfs_callback_tcpport, PF_INET, net);
|
nn->nfs_callback_tcpport, PF_INET, net->ns.inum);
|
||||||
|
|
||||||
ret = svc_create_xprt(serv, "tcp", net, PF_INET6,
|
ret = svc_create_xprt(serv, "tcp", net, PF_INET6,
|
||||||
nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
|
nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
nn->nfs_callback_tcpport6 = ret;
|
nn->nfs_callback_tcpport6 = ret;
|
||||||
dprintk("NFS: Callback listener port = %u (af %u, net %p)\n",
|
dprintk("NFS: Callback listener port = %u (af %u, net %x\n",
|
||||||
nn->nfs_callback_tcpport6, PF_INET6, net);
|
nn->nfs_callback_tcpport6, PF_INET6, net->ns.inum);
|
||||||
} else if (ret != -EAFNOSUPPORT)
|
} else if (ret != -EAFNOSUPPORT)
|
||||||
goto out_err;
|
goto out_err;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -184,7 +184,7 @@ static void nfs_callback_down_net(u32 minorversion, struct svc_serv *serv, struc
|
||||||
if (--nn->cb_users[minorversion])
|
if (--nn->cb_users[minorversion])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dprintk("NFS: destroy per-net callback data; net=%p\n", net);
|
dprintk("NFS: destroy per-net callback data; net=%x\n", net->ns.inum);
|
||||||
svc_shutdown_net(serv, net);
|
svc_shutdown_net(serv, net);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv,
|
||||||
if (nn->cb_users[minorversion]++)
|
if (nn->cb_users[minorversion]++)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
dprintk("NFS: create per-net callback data; net=%p\n", net);
|
dprintk("NFS: create per-net callback data; net=%x\n", net->ns.inum);
|
||||||
|
|
||||||
ret = svc_bind(serv, net);
|
ret = svc_bind(serv, net);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
@ -222,7 +222,7 @@ err_socks:
|
||||||
err_bind:
|
err_bind:
|
||||||
nn->cb_users[minorversion]--;
|
nn->cb_users[minorversion]--;
|
||||||
dprintk("NFS: Couldn't create callback socket: err = %d; "
|
dprintk("NFS: Couldn't create callback socket: err = %d; "
|
||||||
"net = %p\n", ret, net);
|
"net = %x\n", ret, net->ns.inum);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue