From 4310a375e905840481862c6c351152fe29df81c9 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Wed, 31 Mar 2010 22:22:01 +0000 Subject: [PATCH] Fix msgsnd indirect ipccall decoding 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 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ipc.c b/ipc.c index 553aa81f..4c902bf0 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; -- 2.40.0