Page MenuHomeFreeBSD

if_bnxt: ktls: Reject new kTLS sessions once driver is detaching
AcceptedPublic

Authored by sumit.saxena_broadcom.com on Mon, Aug 3, 12:26 PM.
Tags
None
Referenced Files
F165186137: D58612.diff
Thu, Aug 6, 2:51 PM
F165068819: D58612.id183291.diff
Wed, Aug 5, 6:04 PM
Unknown Object (File)
Wed, Aug 5, 4:18 PM
Unknown Object (File)
Mon, Aug 3, 2:46 PM
Subscribers
None

Details

Summary

bnxt_tls_snd_tag_alloc() only gated on BNXT_STATE_OPEN, which is set
once by bnxt_open()/bnxt_attach_pre() but never cleared again, so it
could not reject new sessions once bnxt_detach() started tearing
things down. The snd_tag_alloc_ref-based wait in bnxt_detach(), which
waits for in-flight allocators to exit, was already in place, but
without this gate new sessions could keep being created for the
entire duration of that wait, extending it indefinitely instead of
just draining existing ones.

Reject new sessions once softc->detached is set, and reset it back to
false in bnxt_attach_pre() so it doesn't wrongly persist across a
detach/reattach cycle.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped