diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2013-01-04 23:35:03 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-05 00:11:46 (GMT) |
commit | 3fcfe78658695b424314ddb76abc8d58b4fc98e6 (patch) | |
tree | 755f48f8377acf7e226f0168bfacb870aba7781e | |
parent | 51eeacaa07d1372a7bc9612548ffe6cd846f4f2f (diff) | |
download | linux-3fcfe78658695b424314ddb76abc8d58b4fc98e6.tar.xz |
ipc: add more comments to message copying related code
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | ipc/msg.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |