diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-10-06 16:47:48 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-06 18:58:47 +0200 |
commit | 8750de90ac28d646f6a57f6d23d9997aa685dffd (patch) | |
tree | b26afc73cc30377abbc75d79b9d17d5e39353097 /tools/bpf/bpf_asm.c | |
parent | 6c75a92a0065a009429cec2c69f922f07cbbcd1e (diff) |
staging: vchiq: Fix list_for_each exit tests
After a list_for_each_entry() loop, the list iterator is always non-NULL
so these conditions don't work. If the "waiter" is not found then this
results in an out of bounds access.
I have fixed it by introducing a new "found" variable. In one case, I
used an else statement for readability.
Fixes: 46e4b9ec4fa4 ("staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201006134748.GA2076872@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/bpf/bpf_asm.c')
0 files changed, 0 insertions, 0 deletions