2014-11-14 16:12:28

by Olga Kornievskaia

[permalink] [raw]
Subject: calls to rpc_peeraddr2str()

Should all calls to rpc_peeraddr2str() be protected with
rcu_read_lock(). callback_proc.c makes calls to rpc_peeraddr2str()
without acquiring such lock. Can somebody comment if this is a bug?

Thank you.


2014-11-14 21:36:19

by Trond Myklebust

[permalink] [raw]
Subject: Re: calls to rpc_peeraddr2str()

Hi Olga,

On Fri, Nov 14, 2014 at 11:12 AM, Olga Kornievskaia
<[email protected]> wrote:
> Should all calls to rpc_peeraddr2str() be protected with
> rcu_read_lock(). callback_proc.c makes calls to rpc_peeraddr2str()
> without acquiring such lock. Can somebody comment if this is a bug?
>

Those calls are made from inside the dprintk_rcu() macro, so they
should be safely protected by the rcu lock taken there.

Cheers
Trond
--
Trond Myklebust

Linux NFS client maintainer, PrimaryData

[email protected]