[PATCH] Fix msgsnd indirect ipccall
Anton Blanchard
anton at samba.org
Wed Mar 31 01:31:22 UTC 2010
The flags field was bogus if we came in via an indirect ipccall, so fix it.
Signed-off-by: Anton Blanchard <anton at samba.org>
---
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