Skip to content

base-manager: ensure all GUdevDevices have subsystem and name set

Under certain rare conditions (e.g. race between querying devices of a given subsystem and the kernel tearing those devices down), the subsystem reported for a GUdevDevice seems to be NULL.

So, ensure both subsystem and name are set on the GUdevDevice before we process them.

The issue has been observed on GUdevDevices listed by g_udev_client_query_by_subsystem(), not on the ones asynchronously reported via uevents, but we add the validity check on both places for consistency.

Fixes #343 (closed)

Merge request reports

Loading