mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
net/mlx5: fw_tracer, Fix event handling
[ Upstream commit341a80de24] mlx5 driver needs to parse traces with event_id inside the range of first_string_trace and num_string_trace. However, mlx5 is parsing all events with event_id >= first_string_trace. Fix it by checking for the correct range. Fixes:c71ad41ccb("net/mlx5: FW tracer, events handling") Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3a7793ae69
commit
d002e0287d
@@ -483,7 +483,7 @@ static void poll_trace(struct mlx5_fw_tracer *tracer,
|
||||
(u64)timestamp_low;
|
||||
break;
|
||||
default:
|
||||
if (tracer_event->event_id >= tracer->str_db.first_string_trace ||
|
||||
if (tracer_event->event_id >= tracer->str_db.first_string_trace &&
|
||||
tracer_event->event_id <= tracer->str_db.first_string_trace +
|
||||
tracer->str_db.num_string_trace) {
|
||||
tracer_event->type = TRACER_EVENT_TYPE_STRING;
|
||||
|
||||
Reference in New Issue
Block a user