diff options
| author | Xiaomeng Tong <[email protected]> | 2022-04-14 14:21:03 +0800 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2022-05-18 23:31:35 +1000 |
| commit | 300981abddcb13f8f06ad58f52358b53a8096775 (patch) | |
| tree | c63a5d60a31097ba4e18d34a2bd1906f67b43398 /tools/perf/scripts/python/sctop.py | |
| parent | d53c36e6c83863fde4a2748411c31bc4853a0936 (diff) | |
KVM: PPC: Book3S HV: fix incorrect NULL check on list iterator
The bug is here:
if (!p)
return ret;
The list iterator value 'p' will *always* be set and non-NULL by
list_for_each_entry(), so it is incorrect to assume that the iterator
value will be NULL if the list is empty or no element is found.
To fix the bug, Use a new value 'iter' as the list iterator, while use
the old value 'p' as a dedicated variable to point to the found element.
Fixes: dfaa973ae960 ("KVM: PPC: Book3S HV: In H_SVM_INIT_DONE, migrate remaining normal-GFNs to secure-GFNs")
Cc: [email protected] # v5.9+
Signed-off-by: Xiaomeng Tong <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions