]> git.baikalelectronics.ru Git - kernel.git/commitdiff
sunrpc: remove net pointer from messages
authorVasily Averin <vvs@virtuozzo.com>
Wed, 8 Nov 2017 05:57:32 +0000 (08:57 +0300)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 17 Nov 2017 21:43:51 +0000 (16:43 -0500)
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>
net/sunrpc/rpc_pipe.c
net/sunrpc/rpcb_clnt.c

index 61a504fb1ae2556c02c831b37ba9e3f598530426..7803f3b6aa53d8c1d798bd6be208f6aa73f4ec78 100644 (file)
@@ -1410,8 +1410,8 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
                return PTR_ERR(gssd_dentry);
        }
 
-       dprintk("RPC:       sending pipefs MOUNT notification for net %p%s\n",
-               net, NET_NAME(net));
+       dprintk("RPC:       sending pipefs MOUNT notification for net %x%s\n",
+               net->ns.inum, NET_NAME(net));
        mutex_lock(&sn->pipefs_sb_lock);
        sn->pipefs_sb = sb;
        err = blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
@@ -1462,8 +1462,8 @@ static void rpc_kill_sb(struct super_block *sb)
                goto out;
        }
        sn->pipefs_sb = NULL;
-       dprintk("RPC:       sending pipefs UMOUNT notification for net %p%s\n",
-               net, NET_NAME(net));
+       dprintk("RPC:       sending pipefs UMOUNT notification for net %x%s\n",
+               net->ns.inum, NET_NAME(net));
        blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
                                           RPC_PIPEFS_UMOUNT,
                                           sb);
index ea0676f199c85895f1cb47a01619c60a0bfef3bc..c526f8fb37c924a36712dd04385d1e0d4b0116e8 100644 (file)
@@ -216,9 +216,9 @@ static void rpcb_set_local(struct net *net, struct rpc_clnt *clnt,
        smp_wmb(); 
        sn->rpcb_users = 1;
        dprintk("RPC:       created new rpcb local clients (rpcb_local_clnt: "
-                       "%p, rpcb_local_clnt4: %p) for net %p%s\n",
-                       sn->rpcb_local_clnt, sn->rpcb_local_clnt4,
-                       net, (net == &init_net) ? " (init_net)" : "");
+               "%p, rpcb_local_clnt4: %p) for net %x%s\n",
+               sn->rpcb_local_clnt, sn->rpcb_local_clnt4,
+               net->ns.inum, (net == &init_net) ? " (init_net)" : "");
 }
 
 /*