The main change in this series is the introduction of local spinlock_t
which replaces the previous use of completion's raw spinlock. This allows
us to make consistent use of the xn_bm_lock when accessing the free_xn_bm
bitmap, while also avoiding nested raw/bh spinlock issue on PREEMPT_RT
kernels. Additionally, we ensure that the payload size is set before
invoking the async handler, to make sure it doesn't error out prematurely
due to invalid size check.

Changelog:
v1->v2:
- Avoid the nested raw/bh spinlocks by not using the raw spinlock from
the completion API. As suggested by Sebastian Andrzej Siewior.
- With the above change, the ordering of the patches is changed to first
introduce the local spinlock, then fix the locking around the bitmap and
finally make sure the payload size is set for the async handler.

v1:
https://lore.kernel.org/netdev/[email protected]/

Emil Tantilov (3):
  idpf: fix PREEMPT_RT raw/bh spinlock nesting for async VC handling
  idpf: idpf: improve locking around idpf_vc_xn_push_free()
  idpf: set the payload size before calling the async handler

 .../net/ethernet/intel/idpf/idpf_virtchnl.c   | 20 ++++++++++---------
 .../net/ethernet/intel/idpf/idpf_virtchnl.h   |  5 +++--
 2 files changed, 14 insertions(+), 11 deletions(-)

-- 
2.37.3

Reply via email to