HomeFreeBSD

ixgbe: Avoid sbuf_trim(9) in sysctl handler

Description

ixgbe: Avoid sbuf_trim(9) in sysctl handler

This was an error, we cannot use sbuf_trim(9) in the
ixgbe_sbuf_fw_version function because it also gets called in
the context of sbuf_new_for_sysctl(9). sbuf(9) explains the interaction
with drain functions as used by sbuf_new_for_sysctl(9).

Reviewed by: imp
Fixes: 7660e4ea5cb7
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D31633

(cherry picked from commit 5de5419b5e8685ab2261edaafe6fdb6fc36e8bbc)

Event Timeline