HomeFreeBSD

Fix double-free bug within ena_detach()

Description

Fix double-free bug within ena_detach()

There is ena_free_all_io_rings_resources() called twice on device
detach:

ena_detach():

ena_destroy_device():
/* First call */
ena_free_all_io_rings_resources()

/* Second call */
ena_free_all_io_rings_resources()

The double-free causes panic() on kldunload, for example.

As the ena_destroy_device() is also called by ena_reset_task() it is
better to stay unchanged. Thus, remove the "Second call" of the function.

Submitted by: Maciej Bielski <mba@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.

Details

Provenance
mwAuthored on May 26 2020, 4:02 PM
Parents
rG0b432b702ef4: Allow disabling meta caching for ENA Tx path
Branches
Unknown
Tags
Unknown

Event Timeline