From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu Zhiguo Subject: Re: [PATCH] Fix the kernel panic of audit_filter_task when key field is set Date: Sat, 02 Aug 2008 10:51:21 +0800 Message-ID: <4893CBA9.9020008@cn.fujitsu.com> References: <4892F063.1080109@cn.fujitsu.com> <4893C42A.60803@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4893C42A.60803@cn.fujitsu.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: zhangxiliang Cc: Linux Kernel Mailing List , viro@zeniv.linux.org.uk, Linux Audit List-Id: linux-audit@redhat.com zhangxiliang wrote: > static int audit_match_perm(struct audit_context *ctx, int mask) > { > + if(!ctx) > + return 0; > unsigned n = ctx->major; Please check this patch with scripts/checkpatch.pl and then resend it. > switch (audit_classify_syscall(ctx->arch, n)) { > case 0: /* native */ > @@ -284,6 +286,8 @@ static int audit_match_filetype(struct audit_context *ctx, int which) > { > unsigned index = which & ~S_IFMT; > mode_t mode = which & S_IFMT; > + if(!ctx) > + return 0; > if (index >= ctx->name_count) > return 0; > if (ctx->names[index].ino == -1) > >