]> www.infradead.org Git - users/willy/pagecache.git/commit
rtase: Fix improper release of ring list entries in rtase_sw_reset
authorJustin Lai <justinlai0215@realtek.com>
Thu, 6 Mar 2025 07:05:10 +0000 (15:05 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 11 Mar 2025 12:25:49 +0000 (13:25 +0100)
commit415f135ace7fd824cde083184a922e39156055b5
tree3a4974b9c446310eec870b29ea6e362624bed922
parent3121a1ef966e1eabcccf3960929b50d625bda78c
rtase: Fix improper release of ring list entries in rtase_sw_reset

Since rtase_init_ring, which is called within rtase_sw_reset, adds ring
entries already present in the ring list back into the list, it causes
the ring list to form a cycle. This results in list_for_each_entry_safe
failing to find an endpoint during traversal, leading to an error.
Therefore, it is necessary to remove the previously added ring_list nodes
before calling rtase_init_ring.

Fixes: 079600489960 ("rtase: Implement net_device_ops")
Signed-off-by: Justin Lai <justinlai0215@realtek.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250306070510.18129-1-justinlai0215@realtek.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/realtek/rtase/rtase_main.c