mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Scott Matheina <scott@matheina.com>
To: Paul Moore <paul@paul-moore.com>
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: Sun, 18 Oct 2015 12:50:45 -0500	[thread overview]
Message-ID: <5623DBF5.8020500@matheina.com> (raw)
In-Reply-To: <10476084.rIoW7K08e6@sifl>



On 10/14/2015 04:54 PM, Paul Moore wrote:
> On Saturday, October 10, 2015 08:57:55 PM Scott Matheina wrote:
>> Signed-off-by: Scott Matheina <scott@matheina.com>
>> ---
>>  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 <linux/audit.h> */
>> @@ -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?

I was following the error messages in checkpatch.pl, but the warning went away after adding this line. No problem
with the code. 

>>  /* 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?

This is the same as above. Just going through the checkpatch.pl script, and looking for warnings to fix. 

As you might have guessed, this is one of my first patches. I wasn't sure if a patch like this would even get
reviewed, and responded to. I'm subscribed to the linux-kernel mail group, and seeing what is acceptable. 

Thanks for the review. I don't plan on making a habit of submitting such incredibly trivial patches, but you 
have to start somewhere, and I thought it'd be hard to screw up by fixing a couple of trivial style errors.  



  reply	other threads:[~2015-10-18 17:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-11  1:57 Scott Matheina
2015-10-14 21:54 ` Paul Moore
2015-10-18 17:50   ` Scott Matheina [this message]
2015-10-19 16:10     ` Richard Guy Briggs
2015-10-21 13:58       ` Joe Perches
2015-10-21 15:33         ` Richard Guy Briggs
2015-10-22  0:30           ` Scott Matheina
2015-10-22  2:15             ` Richard Guy Briggs
2015-10-22  3:27               ` Scott Matheina
2015-10-22 12:53                 ` Richard Guy Briggs
2015-10-25 23:53               ` Scott Matheina
2015-10-27 19:54               ` Joe Perches
2015-10-21 18:23     ` Paul Moore
2015-10-22  0:35       ` Scott Matheina
2015-10-22 20:47         ` Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5623DBF5.8020500@matheina.com \
    --to=scott@matheina.com \
    --cc=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®