mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-01 02:33:01 +09:00
staging: vchiq_arm: Avoid NULL ptr deref in vchiq_dump_platform_instances
vchiq_get_state() can return a NULL pointer. So handle this cases and avoid a NULL pointer derefence in vchiq_dump_platform_instances. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-17-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
914813cc52
commit
aa899e686d
@@ -1204,6 +1204,9 @@ int vchiq_dump_platform_instances(void *dump_context)
|
||||
int len;
|
||||
int i;
|
||||
|
||||
if (!state)
|
||||
return -ENOTCONN;
|
||||
|
||||
/*
|
||||
* There is no list of instances, so instead scan all services,
|
||||
* marking those that have been dumped.
|
||||
|
||||
Reference in New Issue
Block a user