HomeFreeBSD

vmci: fix panic due to freeing unallocated resources

Description

vmci: fix panic due to freeing unallocated resources

Summary:
An error mapping PCI resources results in a panic due to unallocated
resources being freed up. This change puts the appropriate checks in
place to prevent the panic.

PR: 252445
Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Tested by: marcus
MFC after: 1 week
Sponsored by: VMware

Test Plan:
Along with user testing, also simulated error by inserting a ENXIO
return in vmci_map_bars().

Reviewed by: marcus
Subscribers: imp
Differential Revision: https://reviews.freebsd.org/D32016

(cherry picked from commit 0f14bcbe384091c729464cb770372aeb79061070)

Details

Provenance
mpAuthored on Oct 9 2021, 9:21 PM
Reviewer
marcus
Differential Revision
D32016: vmci: fix panic due to freeing unallocated resources
Parents
rGa8dfac9caa7b: ng_ppp(4): Fix a typo in a comment
Branches
Unknown
Tags
Unknown