Page MenuHomeFreeBSD

LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls
ClosedPublic

Authored by bz on Feb 18 2024, 10:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 8:47 AM
Unknown Object (File)
Tue, Oct 29, 10:36 AM
Unknown Object (File)
Tue, Oct 29, 7:26 AM
Unknown Object (File)
Mon, Oct 21, 6:14 AM
Unknown Object (File)
Mon, Oct 21, 6:13 AM
Unknown Object (File)
Mon, Oct 21, 6:13 AM
Unknown Object (File)
Mon, Oct 21, 5:56 AM
Unknown Object (File)
Thu, Oct 17, 11:08 AM

Details

Summary

Lock the two TX MO downcalls into driver/firmware in
lkpi_80211_txq_tx_one() to make sure they cannot happen in the
middle of other (net80211 triggered) updates calling down into
the driver/firmware.

MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Feb 18 2024, 10:03 PM

I think LKPI_80211_LHW_LOCK_ASSERT can help remind us of such LKPI_80211_LHW_LOCK requirement for lkpi_80211_mo_* functions.

sys/compat/linuxkpi/common/src/linux_80211.c
3773–3774

Please start by adding the LKPI_80211_LHW_LOCK_ASSERT for each lkpi_80211_mo_*. Here we shall add LKPI_80211_LHW_LOCK_ASSERT in lkpi_80211_mo_wake_tx_queue().

3788–3789

Here we shall add LKPI_80211_LHW_LOCK_ASSERT in lkpi_80211_mo_tx().

cc requested changes to this revision.Mar 6 2024, 2:04 PM
This revision now requires changes to proceed.Mar 6 2024, 2:04 PM

@cc Adding LOCK asserts is a very good idea; not all the functions need them if I remember correctly. Should I really add it to this "fix" or should I do a separate full pass on the linux_80211_macops.c file?

In D43966#1023788, @bz wrote:

@cc Adding LOCK asserts is a very good idea; not all the functions need them if I remember correctly. Should I really add it to this "fix" or should I do a separate full pass on the linux_80211_macops.c file?

If you put a separate "full pass of asserts" on a plan, with more scrutiny and tests, then I think we can move forward with this fix.

This revision is now accepted and ready to land.Apr 23 2024, 2:09 PM