[PATCH] Fix msgsnd indirect ipccall

Anton Blanchard anton at samba.org
Tue Apr 6 12:53:51 UTC 2010


Hi,

> Nice catch.  Apparently, your patch fixes regression introduced by
> my commit v4.5.18-136-g783f5bc.
> Would you like to write a commit message in ChangeLog style?

Sure!
Anton
--

2010-04-05  Anton Blanchard  <anton at samba.org>

Fix regression in msgsnd indirect ipccall:

    * ipc.c (tprint_msgsnd): Add flags parameter
    (sys_msgsnd): Pass in correct flags to tprint_msgsnd()

diff --git a/ipc.c b/ipc.c
index 553aa81..4c902bf 100644
--- a/ipc.c
+++ b/ipc.c
@@ -212,7 +212,8 @@ struct tcb *tcp;
 }
 
 static void
-tprint_msgsnd(struct tcb *tcp, long addr, unsigned long count)
+tprint_msgsnd(struct tcb *tcp, long addr, unsigned long count,
+	      unsigned long flags)
 {
 	long mtype;
 
@@ -224,7 +225,7 @@ tprint_msgsnd(struct tcb *tcp, long addr, unsigned long count)
 		tprintf("}");
 	}
 	tprintf(", %lu, ", count);
-	printflags(msg_flags, tcp->u_arg[3], "MSG_???");
+	printflags(msg_flags, flags, "MSG_???");
 }
 
 int sys_msgsnd(struct tcb *tcp)
@@ -232,9 +233,11 @@ int sys_msgsnd(struct tcb *tcp)
 	if (entering(tcp)) {
 		tprintf("%d, ", (int) tcp->u_arg[0]);
 		if (indirect_ipccall(tcp)) {
-			tprint_msgsnd(tcp, tcp->u_arg[3], tcp->u_arg[1]);
+			tprint_msgsnd(tcp, tcp->u_arg[3], tcp->u_arg[1],
+				      tcp->u_arg[2]);
 		} else {
-			tprint_msgsnd(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+			tprint_msgsnd(tcp, tcp->u_arg[1], tcp->u_arg[2],
+				      tcp->u_arg[3]);
 		}
 	}
 	return 0;




More information about the Strace-devel mailing list