summaryrefslogtreecommitdiff
path: root/drivers/base/trace.c
diff options
context:
space:
mode:
authorXiaomeng Tong <xiam0nd.tong@gmail.com>2022-04-14 11:56:09 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-24 17:31:20 +0200
commit5a0793ac66ac0e254d292f129a4d6c526f9f2aff (patch)
tree6d08c819e99d9240ad425c89d6b6838629fa8d86 /drivers/base/trace.c
parent830a4e5c48dfc8b4c566c9af9a0a1c4d01d95e7a (diff)
firmware: stratix10-svc: fix a missing check on list iterator
The bug is here: pmem->vaddr = NULL; The list iterator 'pmem' will point to a bogus position containing HEAD if the list is empty or no element is found. This case must be checked before any use of the iterator, otherwise it will lead to a invalid memory access. To fix this bug, just gen_pool_free/set NULL/list_del() and return when found, otherwise list_del HEAD and return; Fixes: 7ca5ce896524f ("firmware: add Intel Stratix10 service layer driver") Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com> Link: https://lore.kernel.org/r/20220414035609.2239-1-xiam0nd.tong@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/trace.c')
0 files changed, 0 insertions, 0 deletions