41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From e47530e266b8e7f84004978e9fd247b5e6df0fb7 Mon Sep 17 00:00:00 2001
|
|
From: Adam Jackson <ajax@redhat.com>
|
|
Date: Tue, 26 Jun 2012 13:15:45 -0400
|
|
Subject: [PATCH 2/3] linux: Make failure to iopl non-fatal
|
|
|
|
We load the driver list, then enable I/O, then call driver probe based
|
|
on whether I/O enable succeeded. That's bad, because the loaded
|
|
security policy might forbid port access. We happen to treat that as
|
|
fatal for some reason, which means even drivers that don't need I/O
|
|
access (like kms and fbdev) don't get the chance to run. Facepalm.
|
|
|
|
How about we just make that non-fatal instead, that sounds like a much
|
|
better plan.
|
|
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
---
|
|
hw/xfree86/os-support/linux/lnx_video.c | 7 ++-----
|
|
1 files changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
|
|
index 895a79b..d9a5da1 100644
|
|
--- a/hw/xfree86/os-support/linux/lnx_video.c
|
|
+++ b/hw/xfree86/os-support/linux/lnx_video.c
|
|
@@ -510,11 +510,8 @@ static Bool
|
|
hwEnableIO(void)
|
|
{
|
|
if (ioperm(0, 1024, 1) || iopl(3)) {
|
|
- if (errno == ENODEV)
|
|
- ErrorF("xf86EnableIOPorts: no I/O ports found\n");
|
|
- else
|
|
- FatalError("xf86EnableIOPorts: failed to set IOPL"
|
|
- " for I/O (%s)\n", strerror(errno));
|
|
+ ErrorF("xf86EnableIOPorts: failed to set IOPL for I/O (%s)\n",
|
|
+ strerror(errno));
|
|
return FALSE;
|
|
}
|
|
#if !defined(__alpha__)
|
|
--
|
|
1.7.7.6
|
|
|