diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2017-11-08 00:57:32 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2017-11-17 16:43:51 -0500 |
commit | 6c67a3e4a46a95c8aa8228dafb3676bc1a9b4871 (patch) | |
tree | a620bfdb790abac00c3c4d3b42488b22c2d15061 /net | |
parent | e4949e4b3d5e056bcecebd340d4c8fab7ed1c20d (diff) |
sunrpc: remove net pointer from messages
Publishing of net pointer is not safe, use net->ns.inum as net ID
[ 171.391947] RPC: created new rpcb local clients
(rpcb_local_clnt: ..., rpcb_local_clnt4: ...) for net f00001e7
[ 171.767188] NFSD: starting 90-second grace period (net f00001e7)
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 8 | ||||
-rw-r--r-- | net/sunrpc/rpcb_clnt.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 61a504fb1ae2..7803f3b6aa53 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -1410,8 +1410,8 @@ rpc_fill_super(struct super_block *sb, void *data, int silent) | |||
1410 | return PTR_ERR(gssd_dentry); | 1410 | return PTR_ERR(gssd_dentry); |
1411 | } | 1411 | } |
1412 | 1412 | ||
1413 | dprintk("RPC: sending pipefs MOUNT notification for net %p%s\n", | 1413 | dprintk("RPC: sending pipefs MOUNT notification for net %x%s\n", |
1414 | net, NET_NAME(net)); | 1414 | net->ns.inum, NET_NAME(net)); |
1415 | mutex_lock(&sn->pipefs_sb_lock); | 1415 | mutex_lock(&sn->pipefs_sb_lock); |
1416 | sn->pipefs_sb = sb; | 1416 | sn->pipefs_sb = sb; |
1417 | err = blocking_notifier_call_chain(&rpc_pipefs_notifier_list, | 1417 | err = blocking_notifier_call_chain(&rpc_pipefs_notifier_list, |
@@ -1462,8 +1462,8 @@ static void rpc_kill_sb(struct super_block *sb) | |||
1462 | goto out; | 1462 | goto out; |
1463 | } | 1463 | } |
1464 | sn->pipefs_sb = NULL; | 1464 | sn->pipefs_sb = NULL; |
1465 | dprintk("RPC: sending pipefs UMOUNT notification for net %p%s\n", | 1465 | dprintk("RPC: sending pipefs UMOUNT notification for net %x%s\n", |
1466 | net, NET_NAME(net)); | 1466 | net->ns.inum, NET_NAME(net)); |
1467 | blocking_notifier_call_chain(&rpc_pipefs_notifier_list, | 1467 | blocking_notifier_call_chain(&rpc_pipefs_notifier_list, |
1468 | RPC_PIPEFS_UMOUNT, | 1468 | RPC_PIPEFS_UMOUNT, |
1469 | sb); | 1469 | sb); |
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index ea0676f199c8..c526f8fb37c9 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c | |||
@@ -216,9 +216,9 @@ static void rpcb_set_local(struct net *net, struct rpc_clnt *clnt, | |||
216 | smp_wmb(); | 216 | smp_wmb(); |
217 | sn->rpcb_users = 1; | 217 | sn->rpcb_users = 1; |
218 | dprintk("RPC: created new rpcb local clients (rpcb_local_clnt: " | 218 | dprintk("RPC: created new rpcb local clients (rpcb_local_clnt: " |
219 | "%p, rpcb_local_clnt4: %p) for net %p%s\n", | 219 | "%p, rpcb_local_clnt4: %p) for net %x%s\n", |
220 | sn->rpcb_local_clnt, sn->rpcb_local_clnt4, | 220 | sn->rpcb_local_clnt, sn->rpcb_local_clnt4, |
221 | net, (net == &init_net) ? " (init_net)" : ""); | 221 | net->ns.inum, (net == &init_net) ? " (init_net)" : ""); |
222 | } | 222 | } |
223 | 223 | ||
224 | /* | 224 | /* |