diff options
| author | Riccardo Oliva <oliva.scorza@gmail.com> | 2026-10-11 22:40:20 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-10-14 17:44:32 +0200 |
| commit | ac086c03d031832ea3f1cf6c306812b50355c770 (patch) | |
| tree | 37128e7ba0dc98df013fb212ca16a0d8ac84a750 /include/linux/debugobjects.h | |
| parent | 3228900f80c24f0ce8d52d924a44f54e2b355f9b (diff) | |
staging: vme_user: avoid iterator variable access outside list loop
In vme_slave_request(), vme_master_request(), vme_dma_request(), and
vme_lm_request(), the list iterators (slave_image, master_image,
dma_ctrlr, and lm) are accessed in the err_alloc error paths after
exiting the list_for_each_entry() loops.
While the iterator variable retains its pointer value upon hitting a
break, accessing list iterators outside the loop body violates modern
kernel coding standards.
Fix this by referencing the dedicated allocated resource pointers
(allocated_image, allocated_ctrlr, allocated_lm) in the error cleanup
blocks instead.
Signed-off-by: Riccardo Oliva <oliva.scorza@gmail.com>
Link: https://patch.msgid.link/20261012034020.100737-1-oliva.scorza@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
