linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Tony Jones <tonyj@suse.de>
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH 1/1] audit: fix oops removing watch if audit disabled
Date: Sat, 23 Jun 2007 09:51:53 -0700	[thread overview]
Message-ID: <20070623095153.279c1194.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070620223820.GA16416@suse.de>

> On Wed, 20 Jun 2007 15:38:20 -0700 Tony Jones <tonyj@suse.de> wrote:
> Removing a watched file will oops if audit is disabled (auditctl -e 0).
> 
> To reproduce:
> - auditctl -e 1
> - touch /tmp/foo
> - auditctl -w /tmp/foo
> - auditctl -e 0
> - rm /tmp/foo (or mv)
> 
> Signed-off-by: Tony Jones <tonyj@suse.de>
> ---
> 
> diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
> index 74cc0fc..ce61f42 100644
> --- a/kernel/auditfilter.c
> +++ b/kernel/auditfilter.c
> @@ -947,7 +947,7 @@ static void audit_update_watch(struct au
>  
>  		/* If the update involves invalidating rules, do the inode-based
>  		 * filtering now, so we don't omit records. */
> -		if (invalidating &&
> +		if (invalidating && current->audit_context &&
>  		    audit_filter_inodes(current, current->audit_context) == AUDIT_RECORD_CONTEXT)
>  			audit_set_auditable(current->audit_context);

This looks like 2.6.22 material to me.

Question is: is it also 2.6.21.x material?

  reply	other threads:[~2007-06-23 16:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20 22:38 [PATCH 1/1] audit: fix oops removing watch if audit disabled Tony Jones
2007-06-23 16:51 ` Andrew Morton [this message]
2007-06-23 16:58   ` S.Çağlar Onur
2007-06-23 19:16   ` Al Viro
2007-06-23 19:19     ` Andrew Morton

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=20070623095153.279c1194.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tonyj@suse.de \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).