nfsd: don't alloc under spinlock in rpc_parse_scope_id
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 14 Sep 2021 16:30:32 +0000 (12:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:58 +0000 (19:16 +0100)
commitd9dacf2606711695094879b1eb4f56346eafc82c
tree022f24f9c80e803372734b4b3cd685e4eec16af8
parenta61698358b38384d1e77049e6702f073a2d812c6
nfsd: don't alloc under spinlock in rpc_parse_scope_id

[ Upstream commit 9b6e27d01adcec58e046c624874f8a124e8b07ec ]

Dan Carpenter says:

  The patch d20c11d86d8f: "nfsd: Protect session creation and client
  confirm using client_lock" from Jul 30, 2014, leads to the following
  Smatch static checker warning:

        net/sunrpc/addr.c:178 rpc_parse_scope_id()
        warn: sleeping in atomic context

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: d20c11d86d8f ("nfsd: Protect session creation and client...")
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/addr.c