ima: Do not print policy rule with inactive LSM labels

Before printing a policy rule scan for inactive LSM labels in the policy
rule. Inactive LSM labels are identified by args_p != NULL and
rule == NULL.

Fixes: 483ec26eed42 ("ima: ima/lsm policy rule loading logic bug fixes")
Signed-off-by: Stefan Berger <>
Cc: <> # v5.6+
Acked-by: Christian Brauner <>
[ Updated "Fixes" tag]
Signed-off-by: Mimi Zohar <>
1 file changed