mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
The condition to check if the actions buffer needs to be resized was
incorrect. The check `self->size >= self->len` would evaluate to
true on almost every call to `actions_new()`, causing the buffer to
be reallocated unnecessarily each time an action was added.
Fix the condition to `self->len >= self.size`, ensuring
that the buffer is only resized when it is actually full.
Cc: John Kacur <[email protected]>
Cc: Luis Goncalves <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Chang Yin <[email protected]>
Cc: Costa Shulyupin <[email protected]>
Cc: Crystal Wood <[email protected]>
Cc: Gabriele Monaco <[email protected]>
Link: https://lore.kernel.org/[email protected]
Fixes: 6ea082b171 ("rtla/timerlat: Add action on threshold feature")
Signed-off-by: Wander Lairson Costa <[email protected]>
Reviewed-by: Tomas Glozar <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>