Page MenuHomeFreeBSD

bnxt_re: Fix witness reported calltrace while unloading driver
Needs ReviewPublic

Authored by sumit.saxena_broadcom.com on Aug 3 2026, 12:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 6, 11:09 AM
Unknown Object (File)
Sat, Sep 5, 10:12 AM
Unknown Object (File)
Sat, Sep 5, 2:18 AM
Unknown Object (File)
Sat, Sep 5, 2:18 AM
Unknown Object (File)
Fri, Sep 4, 8:30 PM
Unknown Object (File)
Thu, Sep 3, 2:19 PM
Unknown Object (File)
Tue, Sep 1, 10:07 PM
Unknown Object (File)
Tue, Sep 1, 2:44 PM
Subscribers
None

Details

Summary

bnxt_unregister_dev() called synchronize_rcu() while holding
bp->en_ops_lock, which witness flags as a sleeping-while-locked
violation on driver unload. Drop the lock around the RCU grace period
and reacquire it afterward.

Also gate the RoCE extended-stats hex dump in
bnxt_qplib_qext_stat() behind bootverbose instead of printing it
unconditionally.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/dev/bnxt/bnxt_en/bnxt_ulp.c
114

Aren't you still sleeping while holding a lock? This isn't our msleep, which drops the lock and re-acquires it, but the linux kpi one, which does pause_sbt() under the hood.

again, I *HATE* that you mix linux and freebsd in the driver. it makes it almost impossible to reason about

sys/dev/bnxt/bnxt_en/bnxt_ulp.c
114

Will fix up this in next revision.