Page MenuHomeFreeBSD

vfs_register: prevent kernel crash
ClosedPublic

Authored by netchild on Sat, Sep 19, 10:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 13, 12:00 AM
Unknown Object (File)
Sun, Oct 11, 9:22 PM
Unknown Object (File)
Sun, Oct 11, 9:22 PM
Unknown Object (File)
Fri, Oct 9, 7:38 PM
Unknown Object (File)
Thu, Oct 8, 11:47 AM
Unknown Object (File)
Wed, Oct 7, 11:24 AM
Unknown Object (File)
Mon, Oct 5, 7:50 AM
Unknown Object (File)
Thu, Oct 1, 2:13 PM
Subscribers

Details

Summary

vfs_register hashes the filesystem name and uses it for sysctl oids.
A filesystem name which hashes to 0 crashes in sysctl_register_oid().

Map 0 to 1 to prevent the kernel crash.

This can be tested with "udf2" as the filesystem name.

MFC after: 1 month
MFC to: stable/15 stable/14

Diff Detail

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