Hi Martin, Thanks for your careful review. In path_discover() and declare_sysfs_get_str(), NULL will not be dereferenced. I just check all return value that will cause segfault. But you are right, the other invocations of udev_device_get_XYZ() should be checked too. Regards, Lixiaokeng On 2020/9/21 17:14, Martin Wilck wrote: > On Mon, 2020-09-21 at 12:00 +0800, lixiaokeng wrote: >> The udev_device_get_* function may return NULL, and it will be >> deregerenced in str* and sscanf func. We check the return value >> to avoid segfault. Fix all. >> > > Thanks. Let me remark that this patch does _not_ fix all invocations of > udev_device_get_XYZ() (I suppose you meant something else with "Fix > all.", but please be more specific next time then). > See path_discover(), declare_sysfs_get_str(), for instance. > > Anyway, that can be fixed later, so: > > Reviewed-by: Martin Wilck <mwilck@xxxxxxxx> > > > . > -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel