From: Finn Thain Date: Sat, 30 May 2020 23:12:13 +0000 (+1000) Subject: m68k: mac: Don't send uninitialized data in IOP message reply X-Git-Tag: v5.9-rc1~209^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=adc19b2e314b3883a22e4f51654da4e6d8102d5d;p=thirdparty%2Fkernel%2Fstable.git m68k: mac: Don't send uninitialized data in IOP message reply Clear the message reply before calling iop_complete(). This code path is not normally executed but should that happen let's arrange for consistent behaviour from the IOP. Signed-off-by: Finn Thain Tested-by: Stan Johnson Cc: Joshua Thompson Link: https://lore.kernel.org/r/8e35df4d193b082cb6285b1f30c949ff7e30e99e.1590880333.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven --- diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index bfc8daf507443..8844963eea75f 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c @@ -449,6 +449,7 @@ static void iop_handle_recv(uint iop_num, uint chan) iop_pr_debug("unclaimed message on iop_num %d chan %d\n", iop_num, chan); iop_pr_debug("%*ph\n", IOP_MSG_LEN, msg->message); + memset(msg->reply, 0, IOP_MSG_LEN); iop_complete_message(msg); } }