HomeFreeBSD

stge: fix null pointer dereference

Description

stge: fix null pointer dereference

stge_attach() could fail at line 464, sc->sc_spec remains NULL when
calling stge_detach(), thus bus_release_resources() at line 704 will
trigger null pointer dereference. We need to check the nulliness before
calling bus_release_resources().

PR: 258420
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34629

Details

Provenance
ztong0001_gmail.comAuthored on Mar 31 2022, 6:16 PM
markjCommitted on Mar 31 2022, 7:54 PM
Reviewer
markj
Differential Revision
D34629: [PATCH] stge: fix null pointer dereference
Parents
rG31190aa02eef: libbe: pull props for the correct dataset in be_mounted_at()
Branches
Unknown
Tags
Unknown