Re: 2.6.14-mm1

From: Jiri Slaby
Date: Mon Nov 07 2005 - 07:00:19 EST


Andrew Morton wrote:
>Changes since 2.6.14-rc5-mm1:
>
[...]
> git-audit.patch
There are many errors produced by this patch. I don't have any security model
enabled and in audit_ipc_context security_ipc_getsecurity returns -EOPNOTSUPP,
that causes audit_panic("error in audit_ipc_context");

>char *audit_ipc_context(struct kern_ipc_perm *ipcp)
>{
> struct audit_context *context = current->audit_context;
> char *ctx = NULL;
> int len = 0;
>
> if (likely(!context))
> return NULL;
>
> len = security_ipc_getsecurity(ipcp, NULL, 0);
This fails here with -EOPNOTSUPP, and it goes to the error_path label.

> if (len < 0)
> goto error_path;
>
> ctx = kmalloc(len, GFP_ATOMIC);
> if (!ctx)
> goto error_path;
>
> len = security_ipc_getsecurity(ipcp, ctx, len);
> if (len < 0)
> goto error_path;
>
> return ctx;
>
>error_path:
> if (ctx)
> kfree(ctx);
> audit_panic("error in audit_ipc_context");
> return NULL;
>}
There should be something like if (len == -EOPNOTSUPP) goto ret, where ret
should be right before return NULL. Or am I missing something? David, it's from
your tree, do you have any comments, ideas?

regards,
--
Jiri Slaby www.fi.muni.cz/~xslaby
\_.-^-._ jirislaby@xxxxxxxxx _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/