linux-next: manual merge of the akpm tree with Linus' tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx

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);
  	}

Attachment: pgpbc_AK1uGe4.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux