summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorGuangshuo Li <lgs201920130244@gmail.com>2026-09-15 22:05:11 +0800
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-10-04 17:32:42 +0200
commit19449e913cf0cb866957fe7ddc9b357f7244d079 (patch)
tree86dff3f06a30a39832afbf7031a7125c622c5c07 /rust/kernel/alloc
parent7ec8fd17f3a8059dcf94101065a35d0136031794 (diff)
media: rkvdec: do not destroy borrowed SRAM pool
rkvdec_probe() obtains a provider-owned SRAM pool with of_gen_pool_get(), but its error path incorrectly destroys the borrowed pool with gen_pool_destroy(). of_gen_pool_get() returns a pool managed by the SRAM provider. The pool is not created or owned by the rkvdec driver and is destroyed by the provider when its own managed resources are released. Destroying it when rkvdec_v4l2_init() fails can invalidate the pool while the provider and other consumers still reference it, and can also result in the provider attempting to destroy it again later. Remove the incorrect gen_pool_destroy() call from the probe failure path. This issue was found by manual code inspection. Fixes: e5640dbb991c ("media: rkvdec: Add RCB and SRAM support") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Reviewed-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions