lkml.org 
[lkml]   [2013]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectlinux-next: manual merge of the akpm tree with Linus' tree
Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in ipc/msg.c
between commit 8ac6ed5857c8 ("ipc: implement MSG_COPY as a new receive
mode") from Linus' tree and commit "revert "ipc: don't allocate a copy
larger than max"" from the akpm tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

[ The whole patch looks like this, now:

diff --git a/ipc/msg.c b/ipc/msg.c
index d0c6d96..2978721 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -827,16 +827,15 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
struct ipc_namespace *ns;
struct msg_msg *copy = NULL;

- ns = current->nsproxy->ipc_ns;
-
if (msqid < 0 || (long) bufsz < 0)
return -EINVAL;
if (msgflg & MSG_COPY) {
- copy = prepare_copy(buf, min_t(size_t, bufsz, ns->msg_ctlmax));
+ copy = prepare_copy(buf, bufsz);
if (IS_ERR(copy))
return PTR_ERR(copy);
}
mode = convert_mode(&msgtyp, msgflg);
+ ns = current->nsproxy->ipc_ns;

msq = msg_lock_check(ns, msqid);
if (IS_ERR(msq)) {
]
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au

diff --cc ipc/msg.c
index d0c6d96,4eaf3fd..0000000
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@@ -826,13 -818,12 +826,11 @@@ long do_msgrcv(int msqid, void __user *
int mode;
struct ipc_namespace *ns;
struct msg_msg *copy = NULL;
- unsigned long copy_number = 0;
if (msqid < 0 || (long) bufsz < 0)
return -EINVAL;
if (msgflg & MSG_COPY) {
- copy = prepare_copy(buf, min_t(size_t, bufsz, ns->msg_ctlmax));
- copy = prepare_copy(buf, bufsz, msgflg, &msgtyp, &copy_number);
++ copy = prepare_copy(buf, bufsz);
if (IS_ERR(copy))
return PTR_ERR(copy);
}[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-05-02 08:41    [W:0.024 / U:1.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site