Page MenuHomeFreeBSD

ena: Fix crash when interrupt arrives after admin command timeout
Needs ReviewPublic

Authored by osamaabb_amazon.com on Aug 20 2024, 8:46 AM.
Tags
None
Referenced Files
F161025168: D46344.id142203.diff
Mon, Jun 29, 10:51 PM
Unknown Object (File)
Sun, Jun 28, 3:19 PM
Unknown Object (File)
Tue, Jun 23, 1:19 PM
Unknown Object (File)
Mon, Jun 8, 3:56 AM
Unknown Object (File)
Sun, Jun 7, 8:48 AM
Unknown Object (File)
Thu, Jun 4, 2:15 AM
Unknown Object (File)
Apr 28 2026, 5:34 AM
Unknown Object (File)
Apr 27 2026, 7:23 PM
Subscribers

Details

Reviewers
cperciva
Summary

Bug description:
When invoking an admin command, in interrupt mode, if the interrupt
is received after timeout and also after the calling function finished
running, the response will be written into a memory that is no longer
valid.

We fix this by applying the following:

  1. Verifying that comp_ctx is occupied during the interrupt handler, otherwise it doesn't make sense to update its fields.
  2. Set user_cqe to NULL when the admin command times out. When the interrupt handler is later invoked, it will check if it is NULL and will not use it.

Approved by: cperciva
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 59073
Build 55960: arc lint + arc unit