Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348273
b: refs/heads/master
c: 51eeaca
h: refs/heads/master
i:
  348271: 1ddca6c
v: v3
  • Loading branch information
Stanislav Kinsbursky authored and Linus Torvalds committed Jan 5, 2013
1 parent 25f0830 commit 24e2a1a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b30efe2775ee0a1d911514292579770b214d31c3
refs/heads/master: 51eeacaa07d1372a7bc9612548ffe6cd846f4f2f
25 changes: 9 additions & 16 deletions trunk/ipc/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,16 +770,6 @@ static long do_msg_fill(void __user *dest, struct msg_msg *msg, size_t bufsz)
}

#ifdef CONFIG_CHECKPOINT_RESTORE
static inline struct msg_msg *fill_copy(unsigned long copy_nr,
unsigned long msg_nr,
struct msg_msg *msg,
struct msg_msg *copy)
{
if (copy_nr == msg_nr)
return copy_msg(msg, copy);
return NULL;
}

static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz,
int msgflg, long *msgtyp,
unsigned long *copy_number)
Expand All @@ -803,8 +793,6 @@ static inline void free_copy(struct msg_msg *copy)
free_msg(copy);
}
#else
#define fill_copy(copy_nr, msg_nr, msg, copy) NULL

static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz,
int msgflg, long *msgtyp,
unsigned long *copy_number)
Expand Down Expand Up @@ -868,11 +856,16 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
walk_msg->m_type != 1) {
msgtyp = walk_msg->m_type - 1;
} else if (msgflg & MSG_COPY) {
msg = fill_copy(copy_number,
msg_counter,
walk_msg, copy);
if (msg)
if (copy_number == msg_counter) {
/*
* Found requested message.
* Copy it.
*/
msg = copy_msg(msg, copy);
if (IS_ERR(msg))
goto out_unlock;
break;
}
} else
break;
msg_counter++;
Expand Down
5 changes: 5 additions & 0 deletions trunk/ipc/msgutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst)

return dst;
}
#else
struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst)
{
return ERR_PTR(-ENOSYS);
}
#endif
int store_msg(void __user *dest, struct msg_msg *msg, int len)
{
Expand Down

0 comments on commit 24e2a1a

Please sign in to comment.