From 2aeda3cb0452d5d208f59c861df25aaa8d9447d1 Mon Sep 17 00:00:00 2001 From: Stanislav Kinsbursky Date: Fri, 4 Jan 2013 15:35:03 -0800 Subject: [PATCH] --- yaml --- r: 348274 b: refs/heads/master c: 3fcfe78658695b424314ddb76abc8d58b4fc98e6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/ipc/msg.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index c991225b2ae1..7e785ec361e6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 51eeacaa07d1372a7bc9612548ffe6cd846f4f2f +refs/heads/master: 3fcfe78658695b424314ddb76abc8d58b4fc98e6 diff --git a/trunk/ipc/msg.c b/trunk/ipc/msg.c index 8493e1d7e353..950572f9d796 100644 --- a/trunk/ipc/msg.c +++ b/trunk/ipc/msg.c @@ -770,6 +770,10 @@ static long do_msg_fill(void __user *dest, struct msg_msg *msg, size_t bufsz) } #ifdef CONFIG_CHECKPOINT_RESTORE +/* + * This function creates new kernel message structure, large enough to store + * bufsz message bytes. + */ static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz, int msgflg, long *msgtyp, unsigned long *copy_number) @@ -881,6 +885,10 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, msg = ERR_PTR(-E2BIG); goto out_unlock; } + /* + * If we are copying, then do not unlink message and do + * not update queue parameters. + */ if (msgflg & MSG_COPY) goto out_unlock; list_del(&msg->m_list);