]> granicus.if.org Git - strace/commitdiff
Fix msgsnd indirect ipccall decoding
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 31 Mar 2010 22:22:01 +0000 (22:22 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 31 Mar 2010 22:22:01 +0000 (22:22 +0000)
This regression was introduced by commit v4.5.18-136-g783f5bc.
* ipc.c (tprint_msgsnd): Add and use "flags" argument.
(sys_msgsnd): Pass "flags" argument to tprint_msgsnd().
Patch by Anton Blanchard.

ipc.c

diff --git a/ipc.c b/ipc.c
index 553aa81fa92def58ebf7f65c9bd062923e5c1398..4c902bf0cd8bd32e2bf96f63174c13bb1cf3ce65 100644 (file)
--- 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;