mbox series

[iwl-next,v4,0/3] ice: split ice_aq_wait_for_event() func into two

Message ID 20230808215417.117910-1-przemyslaw.kitszel@intel.com (mailing list archive)
Headers show
Series ice: split ice_aq_wait_for_event() func into two | expand

Message

Przemek Kitszel Aug. 8, 2023, 9:54 p.m. UTC
Mitigate race between registering on wait list and receiving
AQ Response from FW.

The first patch fixes bound check to be more inclusive;
the second one refactors code to make the third one smaller,
which is an actual fix for the race.

Thanks Simon Horman for pushing into split, it's easier to follow now.

v4: remove excessive newlines, thanks Tony for catching this up
v3: split into 3 commits

Przemek Kitszel (3):
  ice: ice_aq_check_events: fix off-by-one check when filling buffer
  ice: embed &ice_rq_event_info event into struct ice_aq_task
  ice: split ice_aq_wait_for_event() func into two

 drivers/net/ethernet/intel/ice/ice.h          | 21 +++-
 .../net/ethernet/intel/ice/ice_fw_update.c    | 45 +++++----
 drivers/net/ethernet/intel/ice/ice_main.c     | 99 ++++++++++---------
 3 files changed, 93 insertions(+), 72 deletions(-)


base-commit: b91d6ff19e94ec46cf6473e7d50ec11615e9ede6

Comments

Simon Horman Aug. 9, 2023, 5:46 p.m. UTC | #1
On Tue, Aug 08, 2023 at 05:54:14PM -0400, Przemek Kitszel wrote:
> Mitigate race between registering on wait list and receiving
> AQ Response from FW.
> 
> The first patch fixes bound check to be more inclusive;
> the second one refactors code to make the third one smaller,
> which is an actual fix for the race.
> 
> Thanks Simon Horman for pushing into split, it's easier to follow now.
> 
> v4: remove excessive newlines, thanks Tony for catching this up
> v3: split into 3 commits
> 
> Przemek Kitszel (3):
>   ice: ice_aq_check_events: fix off-by-one check when filling buffer
>   ice: embed &ice_rq_event_info event into struct ice_aq_task
>   ice: split ice_aq_wait_for_event() func into two

Thanks for the split :)

Reviewed-by: Simon Horman <horms@kernel.org>