[PATCH] c/r: Initialize msg_msg security pointer at restart.

Serge E. Hallyn serge.hallyn at ubuntu.com
Wed Mar 30 20:29:54 PDT 2011


Quoting Jose R. Santos (jrs at linux.vnet.ibm.com):
> This small oversight was causing either crashes on free_msg() or
> restart failures under some message queue workloads.
> 
> Signed-off-by: Jose R. Santos <jrs at linux.vnet.ibm.com>

What kernel is this?

Starting with the last line in your context, there is:

	/* set default MAC attributes */
	ret = security_msg_msg_alloc(msg);
	if (ret < 0)
		goto out;

which should take care of that.  I don't know of an LSM which
doesn't define msg_msg_alloc() but does define msg_msg_free().
Do you have a stack trace to show where it was getting
freed?

> CC: Oren Laadan <orenl at cs.columbia.edu>
> ---
>  ipc/checkpoint_msg.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/ipc/checkpoint_msg.c b/ipc/checkpoint_msg.c
> index 0a19d1f..6fa2c8e 100644
> --- a/ipc/checkpoint_msg.c
> +++ b/ipc/checkpoint_msg.c
> @@ -233,6 +233,7 @@ static struct msg_msg *restore_msg_contents_one(struct ckpt_ctx *ctx, int *clen)
>  		goto out;
>  	}
>  	msg->next = NULL;
> +        msg->security = NULL;
>  	pseg = &msg->next;
>  
>  	/* set default MAC attributes */
> -- 
> 1.7.1
> 
> _______________________________________________
> Containers mailing list
> Containers at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
Url : http://lists.linux-foundation.org/pipermail/containers/attachments/20110330/93c0e660/attachment.pgp 


More information about the Containers mailing list