svn commit: r362962 - head/sys/net
Hans Petter Selasky
hps at selasky.org
Thu Jul 9 10:14:04 UTC 2020
On 2020-07-06 16:52, Mark Johnston wrote:
> Author: markj
> Date: Mon Jul 6 14:52:09 2020
> New Revision: 362962
> URL: https://svnweb.freebsd.org/changeset/base/362962
>
> Log:
> iflib: Fix handling of mbuf cluster allocation failures.
>
> When refilling an rx freelist, make sure we only update the hardware
> producer index if at least one cluster was allocated. Otherwise the
> NIC is programmed to write a previously used cluster, typically
> resulting in a use-after-free when packet data is written by the
> hardware.
>
> Also make sure that we don't update the fragment index cursor if the
> last allocation attempt didn't succeed. For at least Intel drivers,
> iflib assumes that the consumer index and fragment index cursor stay in
> lockstep, but this assumption was violated in the face of cluster
> allocation failures.
>
Hi Mark,
Thanks for working on this. I can confirm the issue Mellanox has seen in
this area is solved by your patch.
--HPS
More information about the svn-src-all
mailing list