HomeFreeBSD

Don't jam the softc in the device_probe routine. The softc isn't owned by

Description

Don't jam the softc in the device_probe routine. The softc isn't owned by
the driver here, so it shouldn't be accessed, let alone written to. Remove
the nearby debug line, it's the only thing that depended on the softc, and
it depended on it in a way that couldn't work in this part of the code.

This fixes some reports of use-after-free and system instability with
DEBUG_MEMGUARD enabled.

Submitted by: Matthew Macy
MFC after: 3 days

Details

Provenance
scottlAuthored on
Parents
rS299589: Instead of ignoring the EEXIST from link(), unconditionally unlink
Branches
Unknown
Tags
Unknown