Page MenuHomeFreeBSD

cuse: Use make_dev_s() to create client devices
ClosedPublic

Authored by christos on Mon, Sep 21, 12:27 PM.
Tags
None
Referenced Files
F176005713: D59874.id188172.diff
Thu, Oct 15, 5:56 AM
Unknown Object (File)
Wed, Oct 14, 2:12 AM
Unknown Object (File)
Thu, Oct 8, 7:37 PM
Unknown Object (File)
Thu, Oct 8, 1:42 PM
Unknown Object (File)
Wed, Oct 7, 9:04 AM
Unknown Object (File)
Wed, Oct 7, 4:53 AM
Unknown Object (File)
Wed, Oct 7, 3:52 AM
Unknown Object (File)
Wed, Oct 7, 1:31 AM
Subscribers

Details

Summary

make_dev_s() sets si_drv1 before the node is published in devfs, which
avoids a race where cuse_client_open() could see it as NULL. It also now
reports finer-grained errors on failure, instead of only ENOMEM.

While here, drop the NULL checks on kern_dev in cuse_server_free_dev(),
since a device is only added to the server's list once it has been
created.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable