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)
Sat, Sep 21, 11:21 PM
Unknown Object (File)
Fri, Sep 20, 8:48 PM
Unknown Object (File)
Fri, Sep 20, 1:21 PM
Unknown Object (File)
Wed, Sep 18, 7:51 PM
Unknown Object (File)
Wed, Sep 18, 2:08 PM
Unknown Object (File)
Mon, Sep 16, 12:40 PM
Unknown Object (File)
Sun, Sep 8, 7:48 AM
Unknown Object (File)
Thu, Sep 5, 10:03 PM

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 Passed
Unit
No Test Coverage
Build Status
Buildable 56096
Build 52985: arc lint + arc unit

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
3736

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().

3751

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