mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 07:00:03 +01:00
Fix mach64 driver crash
Due to lack of iopl(3), mach64 driver crashes when ior(BUS_CNTL) is
called. Since BUS_CNTL is out of the range 0x0000-0x03ff, ioperm(0,
1024, 1) is not sufficient and the ior() causes access violation.
This patch reintroduce iopl(3) call in the function hwEnableIO().
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1110521
Fixes: a0f738a673 ("Fixed ioperm calls in hwEnableIO")
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2052>
This commit is contained in:
parent
ed92eae84d
commit
3b39aebf98
1 changed files with 2 additions and 2 deletions
|
|
@ -123,8 +123,8 @@ hwEnableIO(void)
|
||||||
char *buf=NULL, target[5];
|
char *buf=NULL, target[5];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
if (ioperm(0, 1024, 1)) {
|
if (ioperm(0, 1024, 1) || iopl(3)) {
|
||||||
ErrorF("xf86EnableIO: failed to enable I/O ports 0000-03ff (%s)\n",
|
ErrorF("xf86EnableIO: failed to enable I/O ports access (%s)\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue