HomeFreeBSD

Fix NULL pointer dereference during device removal in ibcore.

Description

Fix NULL pointer dereference during device removal in ibcore.

As part of ib_uverbs_remove_one which might be triggered upon
reset flow, we trigger IB_EVENT_DEVICE_FATAL event to userspace
application.
If device was removed after uverbs fd was opened but before
ib_uverbs_get_context was called, the event file will be accessed
before it was allocated, result in NULL pointer dereference:

Linux commit:
870201f95fcbd19538aef630393fe9d583eff82e

MFC after: 1 week
Sponsored by: Mellanox Technologies

Details

Provenance
hselaskyAuthored on
Parents
rS336375: Fix access to non-initialized CM_ID object in ibcore.
Branches
Unknown
Tags
Unknown