Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9b6b9399 authored by Jiri Slaby's avatar Jiri Slaby Committed by Tony Luck
Browse files

[IA64] pci_br, fix infinite loop in find_free_ate()



When
* there is almost out of ates
* one asks for more than one ate
* there are some available at the end of ate array
then the inner for loop will end without incrementing 'index'. This
means the outer loop will start at the same point finding it's available
and runs the inner loop again from the same index. This repeats forever.

Hence make sure we check we were at the end of ate array and return
an error in such case.

Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Found-by: default avatarJeff Mahoney <jeffm@novell.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 0cced40e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment