This is a note to let you know that I've just added the patch titled ima: cleanup ima_init_policy() a little to the 4.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ima-cleanup-ima_init_policy-a-little.patch and it can be found in the queue-4.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 5577857f8e26e9027271f10daf96361640907300 Mon Sep 17 00:00:00 2001 From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Date: Tue, 7 Apr 2015 12:22:11 +0300 Subject: ima: cleanup ima_init_policy() a little From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> commit 5577857f8e26e9027271f10daf96361640907300 upstream. It's a bit easier to read this if we split it up into two for loops. Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- security/integrity/ima/ima_policy.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -340,16 +340,12 @@ void __init ima_init_policy(void) appraise_entries = ima_use_appraise_tcb ? ARRAY_SIZE(default_appraise_rules) : 0; - for (i = 0; i < measure_entries + appraise_entries; i++) { - if (i < measure_entries) - list_add_tail(&default_rules[i].list, - &ima_default_rules); - else { - int j = i - measure_entries; + for (i = 0; i < measure_entries; i++) + list_add_tail(&default_rules[i].list, &ima_default_rules); - list_add_tail(&default_appraise_rules[j].list, - &ima_default_rules); - } + for (i = 0; i < appraise_entries; i++) { + list_add_tail(&default_appraise_rules[i].list, + &ima_default_rules); } ima_rules = &ima_default_rules; Patches currently in stable-queue which might be from dan.carpenter@xxxxxxxxxx are queue-4.1/ima-cleanup-ima_init_policy-a-little.patch queue-4.1/usb-devio-fix-a-condition-in-async_completed.patch queue-4.1/asoc-imx-wm8962-add-a-missing-error-check.patch queue-4.1/ath9k_htc-memory-corruption-calling-set_bit.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html