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
F168216024: D58612.id.diff
Wed, Aug 26, 11:13 PM
Unknown Object (File)
Sun, Aug 23, 4:31 AM
Unknown Object (File)
Sat, Aug 22, 9:37 AM
Unknown Object (File)
Fri, Aug 21, 9:02 PM
Unknown Object (File)
Fri, Aug 21, 11:24 AM
Unknown Object (File)
Thu, Aug 20, 10:41 AM
Unknown Object (File)
Tue, Aug 18, 9:08 PM
Unknown Object (File)
Sun, Aug 16, 1:13 AM
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