HomeFreeBSD

iflib: fix potential NULL dereference

Description

iflib: fix potential NULL dereference

iflib_softirq_alloc_generic() can be called with a NULL irq parameter
(as done by for example the bnxt and ixl drivers). If
iflib_irq_set_affinity() then returns an error we'd try to dereference
the NULL irq pointer.

Check irq, and pass '-1' (which taskqgroup_attach() expects) if we don't
have an irq.

Direct commit to stable/12, because this issue does not exist on main
and stable/13.

Reviewed by: kbowling
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31758

Details

Provenance
kpAuthored on Aug 31 2021, 12:11 PM
Reviewer
kbowling
Differential Revision
D31758: stable/12: iflib: fix potential NULL dereference
Parents
rGfe61b012dcae: Silence more gtest warnings, now in fusefs tests
Branches
Unknown
Tags
Unknown