From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754601AbbJNVyM (ORCPT ); Wed, 14 Oct 2015 17:54:12 -0400 Received: from mail-qg0-f43.google.com ([209.85.192.43]:36197 "EHLO mail-qg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157AbbJNVyK (ORCPT ); Wed, 14 Oct 2015 17:54:10 -0400 From: Paul Moore To: Scott Matheina Cc: eparis@redhat.com, linux-audit@redhat.com, linux-kernel@vger.kernel.org, trivial@kernel.org Subject: Re: [PATCH 2/2] Fixed Trivial Warnings in file: Deleted Spaces prior to tabs, and added lines. modified: kernel/auditfilter.c Date: Wed, 14 Oct 2015 17:54:08 -0400 Message-ID: <10476084.rIoW7K08e6@sifl> User-Agent: KMail/4.14.10 (Linux/4.1.5-gentoo; KDE/4.14.12; x86_64; ; ) In-Reply-To: <1444528675-13184-1-git-send-email-scott@matheina.com> References: <1444528675-13184-1-git-send-email-scott@matheina.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, October 10, 2015 08:57:55 PM Scott Matheina wrote: > Signed-off-by: Scott Matheina > --- > kernel/auditfilter.c | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) Sorry for the delay in reviewing this, comments inline ... > diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c > index 7714d93..774f9ad 100644 > --- a/kernel/auditfilter.c > +++ b/kernel/auditfilter.c > @@ -39,13 +39,13 @@ > * Locking model: > * > * audit_filter_mutex: > - * Synchronizes writes and blocking reads of audit's filterlist > - * data. Rcu is used to traverse the filterlist and access > - * contents of structs audit_entry, audit_watch and opaque > - * LSM rules during filtering. If modified, these structures > - * must be copied and replace their counterparts in the filterlist. > - * An audit_parent struct is not accessed during filtering, so may > - * be written directly provided audit_filter_mutex is held. > + * Synchronizes writes and blocking reads of audit's filterlist > + * data. Rcu is used to traverse the filterlist and access > + * contents of structs audit_entry, audit_watch and opaque > + * LSM rules during filtering. If modified, these structures > + * must be copied and replace their counterparts in the filterlist. > + * An audit_parent struct is not accessed during filtering, so may > + * be written directly provided audit_filter_mutex is held. > */ Okay, that's fine. > /* Audit filter lists, defined in */ > @@ -109,6 +109,7 @@ void audit_free_rule_rcu(struct rcu_head *head) > { > struct audit_entry *e = container_of(head, struct audit_entry, rcu); > audit_free_rule(e); > + > } Why? > /* Initialize an audit filterlist entry. */ > @@ -176,9 +177,11 @@ static __u32 *classes[AUDIT_SYSCALL_CLASSES]; > int __init audit_register_class(int class, unsigned *list) > { > __u32 *p = kcalloc(AUDIT_BITMASK_SIZE, sizeof(__u32), GFP_KERNEL); > + > if (!p) > return -ENOMEM; Okay. > while (*list != ~0U) { > + > unsigned n = *list++; > if (n >= AUDIT_BITMASK_SIZE * 32 - AUDIT_SYSCALL_CLASSES) { > kfree(p); Why? -- paul moore www.paul-moore.com