]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: 'Directory with parent 'rpc_clnt' already present!'
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 13 May 2020 22:38:40 +0000 (18:38 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 14 May 2020 20:31:09 +0000 (16:31 -0400)
commit0139488fdca6de3cc636a11bcd536ceba7e29ca5
tree40931f5dc3896bfc6378df9aa54b3fcfcbfc427d
parentb43125cbb0e130ad9883f07c43683473876ffc13
SUNRPC: 'Directory with parent 'rpc_clnt' already present!'

Each rpc_client has a cl_clid which is allocated from a global ida, and
a debugfs directory which is named after cl_clid.

We're releasing the cl_clid before we free the debugfs directory named
after it.  As soon as the cl_clid is released, that value is available
for another newly created client.

That leaves a window where another client may attempt to create a new
debugfs directory with the same name as the not-yet-deleted debugfs
directory from the dying client.  Symptoms are log messages like

Directory 4 with parent 'rpc_clnt' already present!

Fixes: 2c91b5e17b68 "SUNRPC: defer slow parts of rpc_free_client() to a workqueue."
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/clnt.c