Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:58701 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752430AbbG3TxS (ORCPT ); Thu, 30 Jul 2015 15:53:18 -0400 Subject: Patch "ima: cleanup ima_init_policy() a little" has been added to the 4.1-stable tree To: dan.carpenter@oracle.com, gregkh@linuxfoundation.org, zohar@linux.vnet.ibm.com Cc: , From: Date: Thu, 30 Jul 2015 12:53:17 -0700 Message-ID: <143828599717232@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >From 5577857f8e26e9027271f10daf96361640907300 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 7 Apr 2015 12:22:11 +0300 Subject: ima: cleanup ima_init_policy() a little From: Dan Carpenter 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 Signed-off-by: Mimi Zohar Signed-off-by: Greg Kroah-Hartman --- 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@oracle.com 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