diff options
| author | Wander Lairson Costa <[email protected]> | 2025-09-15 18:10:56 +0000 |
|---|---|---|
| committer | Steven Rostedt (Google) <[email protected]> | 2025-09-27 10:01:20 +0000 |
| commit | 2227f273b7dc25a791ae6b152550098aa6934b2f (patch) | |
| tree | a46d3ffbec94411523c234f6c8e45976380fcc47 /drivers/gpio/gpiolib.c | |
| parent | rtla: Fix buffer overflow in actions_parse (diff) | |
| download | kernel-2227f273b7dc25a791ae6b152550098aa6934b2f.tar.gz kernel-2227f273b7dc25a791ae6b152550098aa6934b2f.zip | |
rtla/actions: Fix condition for buffer reallocation
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: 6ea082b171e00 ("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]>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
0 files changed, 0 insertions, 0 deletions
