Hello community,
here is the log from the commit of package xf86-input-libinput for
openSUSE:Factory checked in at 2016-10-28 10:42:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-input-libinput (Old)
and /work/SRC/openSUSE:Factory/.xf86-input-libinput.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xf86-input-libinput"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-input-libinput/xf86-input-libinput.changes
2016-10-22 13:01:49.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.xf86-input-libinput.new/xf86-input-libinput.changes
2016-10-28 10:42:06.000000000 +0200
@@ -1,0 +2,12 @@
+Fri Oct 21 17:20:45 UTC 2016 - [email protected]
+
+- Update to version 0.22.0:
+ + Fix the new tap button map option handling.
+ + When the first device was removed (and subsequently freed by
+ the server) the input thread would continue to call that
+ device's read_input() func, eventually causing a crash.
+- Drop
+ U_xf86-input-libinput-Fix_tap_button_map_option_handling.patch:
+ Fixed upstream.
+
+-------------------------------------------------------------------
Old:
----
U_xf86-input-libinput-Fix_tap_button_map_option_handling.patch
xf86-input-libinput-0.20.0.tar.bz2
xf86-input-libinput-0.20.0.tar.bz2.sig
New:
----
xf86-input-libinput-0.22.0.tar.bz2
xf86-input-libinput-0.22.0.tar.bz2.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xf86-input-libinput.spec ++++++
--- /var/tmp/diff_new_pack.VQyR5o/_old 2016-10-28 10:42:09.000000000 +0200
+++ /var/tmp/diff_new_pack.VQyR5o/_new 2016-10-28 10:42:09.000000000 +0200
@@ -17,7 +17,7 @@
Name: xf86-input-libinput
-Version: 0.20.0
+Version: 0.22.0
Release: 0
Summary: Libinput driver for the Xorg X server
License: MIT
@@ -27,7 +27,6 @@
Source1:
http://xorg.freedesktop.org/releases/individual/driver/%{name}-%{version}.tar.bz2.sig
Source2: %{name}.keyring
Patch0: n_enable-tapping.patch
-Patch1: U_xf86-input-libinput-Fix_tap_button_map_option_handling.patch
BuildRequires: pkg-config
BuildRequires: pkgconfig(inputproto) >= 2.2
BuildRequires: pkgconfig(libinput) >= 1.4.901
@@ -59,7 +58,6 @@
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%build
%configure --with-xorg-conf-dir="%{_sysconfdir}/X11/xorg.conf.d/"
++++++ xf86-input-libinput-0.20.0.tar.bz2 -> xf86-input-libinput-0.22.0.tar.bz2
++++++
++++ 6140 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/xf86-input-libinput-0.20.0/ChangeLog
new/xf86-input-libinput-0.22.0/ChangeLog
--- old/xf86-input-libinput-0.20.0/ChangeLog 2016-09-30 09:08:21.000000000
+0200
+++ new/xf86-input-libinput-0.22.0/ChangeLog 2016-10-19 02:58:53.000000000
+0200
@@ -1,3 +1,57 @@
+commit 728217775626e2086d7c3acd0d242562390f145b
+Author: Peter Hutterer <[email protected]>
+Date: Wed Oct 19 10:55:12 2016 +1000
+
+ xf86-input-libinput 0.22.0
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit 1dd61abf7e6af9cdd12d8f5a35fe90954aa03e64
+Author: Peter Hutterer <[email protected]>
+Date: Wed Oct 19 10:37:32 2016 +1000
+
+ Wrap the input_lock calls into ifdefs
+
+ Missing from a790ff35f9
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit c80954386d536b83f2c9290e1a88515c04505818
+Author: Peter Hutterer <[email protected]>
+Date: Wed Oct 19 09:24:37 2016 +1000
+
+ xf86-input-libinput 0.21.0
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
+commit a790ff35f90e459fe03e0c78ab6f4e9dd5045dd0
+Author: Peter Hutterer <[email protected]>
+Date: Fri Oct 14 17:00:41 2016 +1000
+
+ Swap the registered input device on DEVICE_OFF when needed
+
+ If we don't swap out the pInfo previously passed to xf86AddEnabledDevice(),
+ the thread eventually calls read_input on a struct that has been deleted.
+ Avoid this by swapping out the to-be-destroyed pInfo with the first one we
+ find.
+
+ Reproducer: sudo udevadm trigger --type=devices --action=add
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+ Reviewed-by: Hans de Goede <[email protected]>
+
+commit 6318ac420b644c7f7a6f2c8e47a64238a4afebeb
+Author: Peter Hutterer <[email protected]>
+Date: Fri Oct 14 13:34:56 2016 +1000
+
+ Fix tap button map option handling
+
+ Copy/paste error
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=97989
+
+ Signed-off-by: Peter Hutterer <[email protected]>
+
commit cd02040a5d4a8f120d225a4c09f5d1dfc751c0a8
Author: Peter Hutterer <[email protected]>
Date: Fri Sep 30 17:01:21 2016 +1000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/xf86-input-libinput-0.20.0/configure.ac
new/xf86-input-libinput-0.22.0/configure.ac
--- old/xf86-input-libinput-0.20.0/configure.ac 2016-09-30 09:00:10.000000000
+0200
+++ new/xf86-input-libinput-0.22.0/configure.ac 2016-10-19 02:54:59.000000000
+0200
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-libinput],
- [0.20.0],
+ [0.22.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-input-libinput])
AC_CONFIG_SRCDIR([Makefile.am])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/xf86-input-libinput-0.20.0/src/xf86libinput.c
new/xf86-input-libinput-0.22.0/src/xf86libinput.c
--- old/xf86-input-libinput-0.20.0/src/xf86libinput.c 2016-09-30
09:01:38.000000000 +0200
+++ new/xf86-input-libinput-0.22.0/src/xf86libinput.c 2016-10-19
02:38:15.000000000 +0200
@@ -87,6 +87,7 @@
struct xf86libinput_driver {
struct libinput *libinput;
int device_enabled_count;
+ void *registered_InputInfoPtr;
};
static struct xf86libinput_driver driver_context;
@@ -583,6 +584,7 @@
if (driver_context.device_enabled_count == 0) {
#if HAVE_THREADED_INPUT
xf86AddEnabledDevice(pInfo);
+ driver_context.registered_InputInfoPtr = pInfo;
#else
/* Can't use xf86AddEnabledDevice on an epollfd */
AddEnabledDevice(pInfo->fd);
@@ -1131,6 +1133,47 @@
return 0;
}
+static bool
+is_libinput_device(InputInfoPtr pInfo)
+{
+ char *driver;
+ BOOL rc;
+
+ driver = xf86CheckStrOption(pInfo->options, "driver", "");
+ rc = strcmp(driver, "libinput") == 0;
+ free(driver);
+
+ return rc;
+}
+
+static void
+swap_registered_device(InputInfoPtr pInfo)
+{
+ InputInfoPtr next;
+
+ if (pInfo != driver_context.registered_InputInfoPtr)
+ return;
+
+ next = xf86FirstLocalDevice();
+ while (next == pInfo || !is_libinput_device(next))
+ next = next->next;
+
+#if HAVE_THREADED_INPUT
+ input_lock();
+#else
+ int sigstate = xf86BlockSIGIO();
+#endif
+ xf86RemoveEnabledDevice(pInfo);
+ if (next) /* shouldn't ever be NULL anyway */
+ xf86AddEnabledDevice(next);
+ driver_context.registered_InputInfoPtr = next;
+#if HAVE_THREADED_INPUT
+ input_unlock();
+#else
+ xf86UnblockSIGIO(sigstate);
+#endif
+}
+
static void
xf86libinput_destroy(DeviceIntPtr dev)
{
@@ -1138,6 +1181,17 @@
struct xf86libinput *driver_data = pInfo->private;
struct xf86libinput_device *shared_device = driver_data->shared_device;
+ /* If the device being destroyed is the one we used for
+ * xf86AddEnabledDevice(), we need to swap it out for one that is
+ * still live. xf86AddEnabledDevice() buffers some data and once the
+ * deletes pInfo (when DEVICE_OFF completes) the thread will keep
+ * calling that struct's read_input because we never removed it.
+ * Avoid this by removing ours and substituting one that's still
+ * valid, the fd is the same anyway (libinput's epollfd).
+ */
+ if (driver_context.device_enabled_count > 0)
+ swap_registered_device(pInfo);
+
xorg_list_del(&driver_data->shared_device_link);
if (driver_data->tablet_tool)
@@ -2146,10 +2200,10 @@
free(str);
}
- if (libinput_device_config_send_events_set_mode(device, map) !=
+ if (libinput_device_config_tap_set_button_map(device, map) !=
LIBINPUT_CONFIG_STATUS_SUCCESS) {
xf86IDrvMsg(pInfo, X_ERROR,
- "Failed to set Tapping Drag Lock to %d\n",
+ "Failed to set Tapping Button Map to %d\n",
map);
map = libinput_device_config_tap_get_button_map(device);
}