aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_common.h
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2024-08-08 05:25:11 -0700
committerPaolo Abeni <pabeni@redhat.com>2024-08-13 10:58:58 +0200
commit97714695ef904a4bdba75ca2f339215c0ae2b1fa (patch)
tree80b2b6a30cb2a326778c8cb0f1860a88646c6fee /drivers/net/ethernet/intel/ice/ice_common.h
parentf2ab4c1a9288774b1f9c102f0cb1b478965169bb (diff)
net: netconsole: Defer netpoll cleanup to avoid lock release during list traversal
Current issue: - The `target_list_lock` spinlock is held while iterating over target_list() entries. - Mid-loop, the lock is released to call __netpoll_cleanup(), then reacquired. - This practice compromises the protection provided by `target_list_lock`. Reason for current design: 1. __netpoll_cleanup() may sleep, incompatible with holding a spinlock. 2. target_list_lock must be a spinlock because write_msg() cannot sleep. (See commit b5427c27173e ("[NET] netconsole: Support multiple logging targets")) Defer the cleanup of the netpoll structure to outside the target_list_lock() protected area. Create another list (target_cleanup_list) to hold the entries that need to be cleaned up, and clean them using a mutex (target_cleanup_list_lock). Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_common.h')
0 files changed, 0 insertions, 0 deletions