Skip to content
Commit 5d113262 authored by Paul Walmsley's avatar Paul Walmsley Committed by paul
Browse files

OMAP: powerdomain: Fix overflow when doing powerdomain deps lookups.



At the end of the list pd is a pointer to a NULL struct, so checking
if the address == NULL doesn't help here. In fact the original code
will just keep running past the struct to read who knows what in
memory.

This case manifests itself when from clkdms_setup() when enabling auto
idle for a clock domain and the clockdomain usecount is greater than
0. When _clkdm_add_autodeps() tries to add the a dependency that does
not exist in the powerdomain->wkdep_srcs array the for loop will run
past the wkdep_srcs array.

Currently in linux-omap you won't hit this because the not found case
is never executed, unless you start modifying powerdomains and their
wakeup/sleep deps.

Signed-off-by: default avatarMike Chan <mike@android.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 36d568ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment