]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto()
authorJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Sun, 15 Dec 2024 07:27:20 +0000 (16:27 +0900)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 21 Dec 2024 14:46:24 +0000 (22:46 +0800)
commit472a989029aac2b78ef2f0b18b27c568bf76d104
tree58a02f8cfaef9d5a44ec001a1d2a4973c20bdf98
parenta5a9d959936499a3106a1bf3b9070875d0d3dec4
crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto()

init_ixp_crypto() calls of_parse_phandle_with_fixed_args() multiple
times, but does not release all the obtained refcounts. Fix it by adding
of_node_put() calls.

This bug was found by an experimental static analysis tool that I am
developing.

Fixes: 76f24b4f46b8 ("crypto: ixp4xx - Add device tree support")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c