]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cxgbe(4): Save proper zone index on low memory in refill_fl().
authorAlexander Motin <mav@FreeBSD.org>
Wed, 17 Feb 2021 02:15:28 +0000 (21:15 -0500)
committerNavdeep Parhar <np@FreeBSD.org>
Tue, 23 Feb 2021 00:46:10 +0000 (16:46 -0800)
commitd7296b893969c3e77df8bdd001b008050d974c11
treed2990bbede92efe2b0ee1990255ea1e9c7695d90
parentae093a0614f30d4cdffb853e4eba93322e8ed8f4
cxgbe(4): Save proper zone index on low memory in refill_fl().

When refill_fl() fails to allocate large (9/16KB) mbuf cluster, it
falls back to safe (4KB) ones.  But it still saved into sd->zidx
the original fl->zidx instead of fl->safe_zidx.  It caused problems
with the later use of that cluster, including memory and/or data
corruption.

While there, make refill_fl() to use the safe zone for all following
clusters for the call, since it is unlikely that large succeed.

Approved by: re@ (gjb@)
Sponsored by: iXsystems, Inc.
Reviewed by: np, jhb
Differential Revision: https://reviews.freebsd.org/D28716

(cherry picked from commit 294e62bebf36f873fd083d2fe8edd78919dda4e8)
(cherry picked from commit c930816b76713623ccdef09d682e41266c1d724f)
sys/dev/cxgbe/t4_sge.c