Page MenuHomeFreeBSD

kern: mountroot: avoid fd leak in .md parsing
ClosedPublic

Authored by kevans on Jul 20 2021, 10:32 AM.
Tags
None
Referenced Files
F174321183: D31229.diff
Fri, Oct 2, 9:08 AM
Unknown Object (File)
Thu, Oct 1, 8:01 AM
Unknown Object (File)
Tue, Sep 29, 1:53 AM
Unknown Object (File)
Mon, Sep 28, 2:42 PM
Unknown Object (File)
Sat, Sep 26, 5:54 PM
Unknown Object (File)
Wed, Sep 16, 5:18 PM
Unknown Object (File)
Fri, Sep 11, 12:43 AM
Unknown Object (File)
Wed, Sep 9, 2:15 PM
Subscribers

Details

Summary

parse_dir_md() opens /dev/mdctl but only closes the resulting fd on
success, not upon failure of the ioctl or when we exceed the md unit
max.

Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
X-NetApp-PR: #62

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40548
Build 37437: arc lint + arc unit

Event Timeline

kib added inline comments.
sys/kern/vfs_mountroot.c
641

I do not believe there is much use in preserving close' error.

This revision is now accepted and ready to land.Jul 20 2021, 2:28 PM
This revision was automatically updated to reflect the committed changes.
kevans marked an inline comment as done.