Page MenuHomeFreeBSD

cuse: Use make_dev_s() to create client devices
AcceptedPublic

Authored by christos on Mon, Sep 21, 12:27 PM.
Tags
None
Referenced Files
F173342205: D59874.id187328.diff
Fri, Sep 25, 8:32 AM
F173317597: D59874.diff
Fri, Sep 25, 5:11 AM
Unknown Object (File)
Thu, Sep 24, 4:32 PM
Unknown Object (File)
Thu, Sep 24, 2:45 PM
Unknown Object (File)
Thu, Sep 24, 2:02 PM
Unknown Object (File)
Thu, Sep 24, 1:56 PM
Unknown Object (File)
Thu, Sep 24, 11:40 AM
Unknown Object (File)
Thu, Sep 24, 4:21 AM
Subscribers

Details

Reviewers
markj
emaste
kib
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 77136
Build 74019: arc lint + arc unit