All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/intel_iosf: Fix bad parameters were passed to functions
@ 2019-09-03 12:14 Daniel Mrzyglod
  2019-09-03 12:43 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Mrzyglod @ 2019-09-03 12:14 UTC (permalink / raw)
  To: igt-dev; +Cc: Lakshminarayana Vudum

There was bad parameters passed to intel_register_read() & intel_register_write()
and Dereferencing and accessing a non existant structure data member
resulting SEGFAULT

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111534
Fixes: d38950f2c0ca ("lib/intel_mmio: add additional api for multiple devices")

Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lakshminarayana Vudum <lakshminarayana.vudum@intel.com>

Signed-off-by: Daniel Mrzyglod <daniel.t.mrzyglod@intel.com>
---
 lib/intel_iosf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/intel_iosf.c b/lib/intel_iosf.c
index 16862ef4..40525b06 100644
--- a/lib/intel_iosf.c
+++ b/lib/intel_iosf.c
@@ -49,7 +49,7 @@ static int vlv_sideband_rw(struct intel_mmio_data *mmio_data, uint32_t port,
 	do {
 		usleep(1);
 		timeout++;
-	} while (intel_register_read(mmio_data->igt_mmio,
+	} while (intel_register_read(mmio_data,
 				     VLV_IOSF_DOORBELL_REQ) &
 		IOSF_SB_BUSY && timeout < TIMEOUT_US);
 
@@ -59,8 +59,8 @@ static int vlv_sideband_rw(struct intel_mmio_data *mmio_data, uint32_t port,
 	}
 
 	if (is_read)
-		*val = intel_register_read(mmio_data->igt_mmio, VLV_IOSF_DATA);
-	intel_register_write(mmio_data->igt_mmio, VLV_IOSF_DATA, 0);
+		*val = intel_register_read(mmio_data, VLV_IOSF_DATA);
+	intel_register_write(mmio_data, VLV_IOSF_DATA, 0);
 
 	return 0;
 }
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-04 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 12:14 [igt-dev] [PATCH i-g-t] lib/intel_iosf: Fix bad parameters were passed to functions Daniel Mrzyglod
2019-09-03 12:43 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-09-03 15:41 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-09-04 13:00 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.