linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Joshua Thompson <funaho@jurai.org>,
	linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] m68k/mac: Don't send uninitialized data in IOP message reply
Date: Sun, 31 May 2020 09:12:13 +1000	[thread overview]
Message-ID: <8e35df4d193b082cb6285b1f30c949ff7e30e99e.1590880333.git.fthain@telegraphics.com.au> (raw)
In-Reply-To: <cover.1590880333.git.fthain@telegraphics.com.au>

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.

Cc: Joshua Thompson <funaho@jurai.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 arch/m68k/mac/iop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c
index 5fc3b59ba811..8d6946edf2c8 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);
 	}
 }
-- 
2.26.2


  parent reply	other threads:[~2020-05-30 23:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-30 23:12 [PATCH 0/4] Mac IOP driver fixes Finn Thain
2020-05-30 23:12 ` [PATCH 1/4] m68k/mac: Don't send IOP message until channel is idle Finn Thain
2020-05-30 23:12 ` Finn Thain [this message]
2020-05-30 23:12 ` [PATCH 2/4] m68k/mac: Fix IOP status/control register writes Finn Thain
2020-05-30 23:12 ` [PATCH 4/4] m68k/mac: Improve IOP debug messages Finn Thain
2020-05-31  8:41 ` [PATCH 0/4] Mac IOP driver fixes Geert Uytterhoeven
2020-06-01  0:05   ` Finn Thain
2020-06-01  6:09     ` Brad Boyer
2020-06-01 23:32       ` Finn Thain
2020-06-02  2:21         ` Brad Boyer
2020-06-02  3:48           ` Finn Thain
2020-06-04  3:19             ` Brad Boyer
2020-06-04  4:49               ` Finn Thain
2020-06-04  7:43                 ` Brad Boyer
2020-06-05  3:50                   ` Finn Thain
2020-06-05  4:23                     ` Finn Thain
2020-06-05  9:11                       ` Brad Boyer
2020-06-29 21:39   ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e35df4d193b082cb6285b1f30c949ff7e30e99e.1590880333.git.fthain@telegraphics.com.au \
    --to=fthain@telegraphics.com.au \
    --cc=funaho@jurai.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).