Page MenuHomeFreeBSD

vfs_register: prevent kernel crash
ClosedPublic

Authored by netchild on Sat, Sep 19, 10:20 AM.
Tags
None
Referenced Files
F173217180: D59839.id187499.diff
Thu, Sep 24, 9:24 AM
F173216996: D59839.id187213.diff
Thu, Sep 24, 9:22 AM
F173216836: D59839.diff
Thu, Sep 24, 9:20 AM
F173205611: D59839.id187499.diff
Thu, Sep 24, 7:14 AM
F173202175: D59839.id187213.diff
Thu, Sep 24, 6:42 AM
F173181891: D59839.diff
Thu, Sep 24, 3:50 AM
F173175557: D59839.diff
Thu, Sep 24, 3:00 AM
F173144977: D59839.diff
Wed, Sep 23, 10: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