Hello community,
here is the log from the commit of package xf86-input-vmmouse for openSUSE:Factory checked in at 2014-06-02 07:04:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-input-vmmouse (Old)
and /work/SRC/openSUSE:Factory/.xf86-input-vmmouse.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xf86-input-vmmouse"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-input-vmmouse/xf86-input-vmmouse.changes 2014-02-15 08:54:02.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xf86-input-vmmouse.new/xf86-input-vmmouse.changes 2014-06-02 07:04:13.000000000 +0200
@@ -1,0 +2,7 @@
+Tue May 13 10:59:29 UTC 2014 - eich@suse.com
+
+- u_Don-t-access-hardware-register-while-switched-away.patch:
+ Avoid crash when vmmouse is hotplugged while switched away
+ (bnc#877132).
+
+-------------------------------------------------------------------
New:
----
u_Don-t-access-hardware-register-while-switched-away.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xf86-input-vmmouse.spec ++++++
--- /var/tmp/diff_new_pack.YRkw4g/_old 2014-06-02 07:04:14.000000000 +0200
+++ /var/tmp/diff_new_pack.YRkw4g/_new 2014-06-02 07:04:14.000000000 +0200
@@ -31,6 +31,7 @@
Url: http://xorg.freedesktop.org/
Source0: http://xorg.freedesktop.org/releases/individual/driver/%{name}-%{version}.tar.bz2
Patch1: u_Revert-Remove-call-to-iopl-.-It-s-not-portable-and-i.patch
+Patch2: u_Don-t-access-hardware-register-while-switched-away.patch
BuildRequires: pkg-config
# For directory ownership
BuildRequires: udev
@@ -55,6 +56,7 @@
%prep
%setup -q
%patch1 -p1
+%patch2 -p1
%build
%configure --with-xorg-conf-dir=/etc/X11/xorg.conf.d --with-udev-rules-dir=%{_udevrulesdir}
++++++ u_Don-t-access-hardware-register-while-switched-away.patch ++++++
From: Egbert Eich
Date: Mon May 12 23:00:03 2014 +0200
Subject: [PATCH]Don't access hardware register while switched away
Patch-mainline: to be upstreamed
Git-commit: d7507f2225ddc71b8f1dc7d8b7f326d3f3fb1a0c
Git-repo: git://anongit.freedesktop.org/git/xorg/driver/xf86-input-vmmouse
References: bnc#877132
Signed-off-by: Egbert Eich
Hotplug events for the vmmouse may come in while the Xserver is
switched away. In this case PreInit() iscalled which normally
accesses the hardware (ie. enables and disables the vmmouse)
to determine if it is there.
It is not a good idea to do this while the Xserver is switched
away and therefore not the owner of the device:
1. The state change due to enabling/disabling the device may
affect the owner at that time.
2. The Xserver may crash since enabling/disabling the vmmouse
will do PIO accesses. This is not an issue on VMWare but
on KVM.
The current solution is still slightly racy but since hotplug
events should be rather infrequent this race should be quite
rare.
Signed-off-by: Egbert Eich
---
src/vmmouse.c | 41 ++++++++++++++++++++++++++---------------
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/src/vmmouse.c b/src/vmmouse.c
index cac8306..c53f369 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -354,25 +354,36 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
}
/*
- * try to enable vmmouse here
+ * We must not fiddle with the VMmouse when switched away:
+ * - we may 'disable' someone elses mouse ie put it into a
+ * different state.
+ * - we may even crash ourselves as we do direct PIO access.
+ * This is not an issue with vmware but with KVM.
*/
- if (!VMMouseClient_Enable()) {
+ if (xf86VTOwner()) {
/*
- * vmmouse failed
- * Fall back to normal mouse module
+ * try to enable vmmouse here
*/
- xf86Msg(X_ERROR, "VMWARE(0): vmmouse enable failed\n");
- return VMMouseInitPassthru(drv, dev, flags);
+ if (!VMMouseClient_Enable()) {
+ /*
+ * vmmouse failed
+ * Fall back to normal mouse module
+ */
+ xf86Msg(X_ERROR, "VMWARE(0): vmmouse enable failed\n");
+ return VMMouseInitPassthru(drv, dev, flags);
+ } else {
+ /*
+ * vmmouse is available
+ */
+ xf86Msg(X_INFO, "VMWARE(0): vmmouse is available\n");
+ /*
+ * Disable the absolute pointing device for now
+ * It will be enabled during DEVICE_ON phase
+ */
+ VMMouseClient_Disable();
+ }
} else {
- /*
- * vmmouse is available
- */
- xf86Msg(X_INFO, "VMWARE(0): vmmouse is available\n");
- /*
- * Disable the absolute pointing device for now
- * It will be enabled during DEVICE_ON phase
- */
- VMMouseClient_Disable();
+ xf86Msg(X_WARNING, "VMWARE(0): Plugged while switched away: Cannot check for Passthrough - VM pointer might not work.\n");
}
if (!(pInfo = xf86AllocateInput(drv, 0))) {
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org