[xorg-x11-drv-wacom/f21] Make sure we close the file descriptors correctly (#1198863)

Peter Hutterer whot at fedoraproject.org
Wed Mar 11 02:58:38 UTC 2015


commit 2a2c78bc2edf295e60e60958433e5139cee7ca8c
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Mar 11 12:58:17 2015 +1000

    Make sure we close the file descriptors correctly (#1198863)

 ...ure-input-device-fd-gets-closed-after-use.patch | 35 ++++++++++++++++++++++
 xorg-x11-drv-wacom.spec                            |  8 ++++-
 2 files changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/0001-Ensure-input-device-fd-gets-closed-after-use.patch b/0001-Ensure-input-device-fd-gets-closed-after-use.patch
new file mode 100644
index 0000000..c119bd2
--- /dev/null
+++ b/0001-Ensure-input-device-fd-gets-closed-after-use.patch
@@ -0,0 +1,35 @@
+From debc83723927f0fb3d16098f8b7388bdb6db855b Mon Sep 17 00:00:00 2001
+From: Jason Gerecke <killertofu at gmail.com>
+Date: Fri, 5 Dec 2014 13:39:26 -0800
+Subject: [PATCH] Ensure input device fd gets closed after use
+
+Fixes a minor error in commit 52fe01c which results in the driver
+invalidating an fd prior to (potentially) closing it. This reversed
+order causes us to leak the fd and can result in eventual exhasution.
+
+Fixes SF #263
+
+Signed-off-by: Jason Gerecke <killertofu at gmail.com>
+Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
+---
+ src/xf86Wacom.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
+index e6962dd..55b8b7c 100644
+--- a/src/xf86Wacom.c
++++ b/src/xf86Wacom.c
+@@ -753,9 +753,9 @@ static void wcmDevClose(InputInfoPtr pInfo)
+ 
+ 	if (pInfo->fd >= 0)
+ 	{
+-		pInfo->fd = -1;
+ 		if (!--common->fd_refs)
+ 			wcmClose(pInfo);
++		pInfo->fd = -1;
+ 	}
+ }
+ 
+-- 
+2.1.0
+
diff --git a/xorg-x11-drv-wacom.spec b/xorg-x11-drv-wacom.spec
index 97afadb..28b86ae 100644
--- a/xorg-x11-drv-wacom.spec
+++ b/xorg-x11-drv-wacom.spec
@@ -9,7 +9,7 @@
 Summary:    Xorg X11 wacom input driver
 Name:       xorg-x11-drv-wacom
 Version:    0.25.0
-Release:    2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
+Release:    3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
 URL:        http://www.x.org
 License:    GPLv2+
 Group:      User Interface/X Hardware Support
@@ -22,6 +22,8 @@ Source2: commitid
 Source0: http://prdownloads.sourceforge.net/linuxwacom/xf86-input-wacom-%{version}.tar.bz2
 %endif
 
+Patch01: 0001-Ensure-input-device-fd-gets-closed-after-use.patch
+
 ExcludeArch: s390 s390x
 
 BuildRequires: xorg-x11-server-devel >= 1.10.99.902
@@ -41,6 +43,7 @@ X.Org X11 wacom input driver for Wacom tablets.
 
 %prep
 %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
+%patch01 -p1
 
 %build
 autoreconf --force -v --install || exit 1
@@ -100,6 +103,9 @@ X.Org X11 wacom input driver development files.
 %{_bindir}/isdv4-serial-debugger
 
 %changelog
+* Wed Mar 11 2015 Peter Hutterer <peter.hutterer at redhat.com> 0.25.0-3
+- Make sure we close the file descriptors correctly (#1198863)
+
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.25.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list