]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: nx - Fix RCU warning in nx842_OF_upd_status
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 17 Jun 2021 07:57:12 +0000 (15:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:53:24 +0000 (16:53 +0200)
commit13cc86b6832715e1cd72c22360ca4d9135ccd076
tree204782a51a627915c235ab95bc874bea9cfc12d0
parente2b179a5d0fa852df47bf8f0664f403e022388cf
crypto: nx - Fix RCU warning in nx842_OF_upd_status

[ Upstream commit 2a96726bd0ccde4f12b9b9a9f61f7b1ac5af7e10 ]

The function nx842_OF_upd_status triggers a sparse RCU warning when
it directly dereferences the RCU-protected devdata.  This appears
to be an accident as there was another variable of the same name
that was passed in from the caller.

After it was removed (because the main purpose of using it, to
update the status member was itself removed) the global variable
unintenionally stood in as its replacement.

This patch restores the devdata parameter.

Fixes: 263387be3a59 ("crypto: nx - remove pSeries NX 'status' field")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/nx/nx-842-pseries.c