diff options
author | Nam Cao <namcao@linutronix.de> | 2025-08-06 15:09:11 +0300 |
---|---|---|
committer | Gabriele Monaco <gmonaco@redhat.com> | 2025-09-15 09:36:35 +0300 |
commit | de090d1ccae1e191af4beb92964591c6e4f31f28 (patch) | |
tree | 6052341270f1d018f942aa675607bd5fd8344c91 /net/lapb/lapb_out.c | |
parent | 03ee64b5e525c40e9bc723885c6b0b9c6188b55b (diff) | |
download | linux-de090d1ccae1e191af4beb92964591c6e4f31f28.tar.xz |
rv: Fix wrong type cast in enabled_monitors_next()
Argument 'p' of enabled_monitors_next() is not a pointer to struct
rv_monitor, it is actually a pointer to the list_head inside struct
rv_monitor. Therefore it is wrong to cast 'p' to struct rv_monitor *.
This wrong type cast has been there since the beginning. But it still
worked because the list_head was the first field in struct rv_monitor_def.
This is no longer true since commit 24cbfe18d55a ("rv: Merge struct
rv_monitor_def into struct rv_monitor") moved the list_head, and this wrong
type cast became a functional problem.
Properly use container_of() instead.
Fixes: 24cbfe18d55a ("rv: Merge struct rv_monitor_def into struct rv_monitor")
Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
Link: https://lore.kernel.org/r/20250806120911.989365-1-namcao@linutronix.de
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions