Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device Pa...
details: https://anonhg.NetBSD.org/src/rev/aef0f925482b
branches: trunk
changeset: 341424:aef0f925482b
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Nov 05 20:32:39 2015 +0000
description:
Paranoia about mmio register mapping size.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r f70632aa2d24 -r aef0f925482b sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c Thu Nov 05 20:31:26 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c Thu Nov 05 20:32:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_device_base.c,v 1.7 2015/11/05 20:31:26 riastradh Exp $ */
+/* $NetBSD: nouveau_engine_device_base.c,v 1.8 2015/11/05 20:32:39 riastradh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.7 2015/11/05 20:31:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.8 2015/11/05 20:32:39 riastradh Exp $");
#include <core/object.h>
#include <core/device.h>
@@ -177,6 +177,8 @@
if (!(args->disable & NV_DEVICE_DISABLE_IDENTIFY) &&
!device->card_type) {
#ifdef __NetBSD__
+ if (mmio_size < 0x102000)
+ return -ENOMEM;
/* XXX errno NetBSD->Linux */
ret = -bus_space_map(mmiot, mmio_base, mmio_size, 0, &mmioh);
if (ret)
Home |
Main Index |
Thread Index |
Old Index