This patch replaces some error-prone ~350 line long C&P initialization code with a simple for-loop doing the same.
Conflict resolution was required due to commits missing in 4.9: - ca97d939 (security: mark LSM hooks as __ro_after_init) - 791ec491 (prlimit,security,selinux: add a security hook for prlimit) - d69dece5 (LSM: Add /sys/kernel/security/lsm)
Those add new (security) features and hence are now allowed according to the stable kernel rules. See e.g. rejection of the first patch for 4.9 in https://lore.kernel.org/all/YsrfDfe3urGkepvJ@kroah.com/
If any of the above commits are reconsidered for 4.9 I can provide backports of those.
Tetsuo Handa (1): LSM: Initialize security_hook_heads upon registration.
security/security.c | 359 +------------------------------------------- 1 file changed, 7 insertions(+), 352 deletions(-)