diff options
| author | Manos Pitsidianakis <manos@pitsidianak.is> | 2026-06-05 14:23:51 +0300 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2026-07-05 13:19:51 +0800 |
| commit | 3a5834db2b1ce25649f330e78efe1ccde78967fd (patch) | |
| tree | b42ca03d096571c13b43a586bf5c34734f2fdd2e /tools/perf/scripts/python/stackcollapse.py | |
| parent | ba16486d79d44e3d07c713ff566be156292ed744 (diff) | |
hwrng: core - fix rng list on registration error
hwrng_register(rng) does the following:
1. Checks if rng has name and read methods set
2. Checks if the name already exists
3. Adds rng to global rng_list
4. May try to set rng to current_rng
If step 4 fails, it returns an error. However, it does not remove the
rng from rng_list, causing a dangling reference which can result in
use-after-free if the caller frees rng, since registration failed.
Add a list_del_init() cleanup step.
Fixes: 2bbb6983887f ("hwrng: use rng source with best quality")
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
