[PATCH] integrity: silence warning when CONFIG_SECURITYFS is not enabled

Matthew Garrett mjg59 at google.com
Mon Jun 4 17:44:52 UTC 2018


On Mon, Jun 4, 2018 at 7:05 AM Sudeep Holla <sudeep.holla at arm.com> wrote:
> When CONFIG_SECURITYFS is not enabled, securityfs_create_dir returns
> -ENODEV which throws the following error:
>         "Unable to create integrity sysfs dir: -19"
>
> However, if the feature is disabled, it can't be warning and hence
> we need to silence the error.

I think it'd be preferable to check whether it's ENODEV rather than
doing IS_ENABLED. We should also reset integrity_dir to NULL rather
than leaving it as an error - it gets passed into various other
functions, and while those should all also just be returning errors
it'd be unfortunate if one attempted to dereference it.
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the Linux-security-module-archive mailing list