Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix wrong access in mfii_start(). I hope this fi...
details: https://anonhg.NetBSD.org/src/rev/6e40b180af1d
branches: trunk
changeset: 367686:6e40b180af1d
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Jun 22 14:29:11 2022 +0000
description:
Fix wrong access in mfii_start(). I hope this fixes kern/55192 and kern/56669.
diffstat:
sys/dev/pci/mfii.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 59a78d3a87cf -r 6e40b180af1d sys/dev/pci/mfii.c
--- a/sys/dev/pci/mfii.c Wed Jun 22 08:31:06 2022 +0000
+++ b/sys/dev/pci/mfii.c Wed Jun 22 14:29:11 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfii.c,v 1.15 2022/05/13 10:44:38 msaitoh Exp $ */
+/* $NetBSD: mfii.c,v 1.16 2022/06/22 14:29:11 msaitoh Exp $ */
/* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.15 2022/05/13 10:44:38 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.16 2022/06/22 14:29:11 msaitoh Exp $");
#include "bio.h"
@@ -1840,7 +1840,11 @@
static void
mfii_start(struct mfii_softc *sc, struct mfii_ccb *ccb)
{
+#if defined(__LP64__) && 0
u_long *r = (u_long *)&ccb->ccb_req;
+#else
+ uint32_t *r = (uint32_t *)&ccb->ccb_req;
+#endif
bus_dmamap_sync(sc->sc_dmat, MFII_DMA_MAP(sc->sc_requests),
ccb->ccb_request_offset, MFII_REQUEST_SIZE,
Home |
Main Index |
Thread Index |
Old Index