rpms/kernel/F-11 drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch, NONE, 1.1 kernel.spec, 1.1620, 1.1621

Kyle McMartin kyle at fedoraproject.org
Fri May 22 21:52:02 UTC 2009


Author: kyle

Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24875

Modified Files:
	kernel.spec 
Added Files:
	drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch 
Log Message:
* Fri May 22 2009 Kyle McMartin <kyle at redhat.com> 2.6.29.3-159
- drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch:
  Fix possible hang in drmWaitVblank.
   upstream 9b6fe313bfce27d4a261257da70196be0ac2bef5.


drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch:

--- NEW FILE drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch ---
From: Michel Dänzer <daenzer at vmware.com>
Date: Wed, 20 May 2009 11:32:00 +0000 (+0200)
Subject: drm: Copy back ioctl data to userspace regardless of return code.
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9b6fe313bfce27d4a261257da70196be0ac2bef5

drm: Copy back ioctl data to userspace regardless of return code.

Fixes a regression from commit 9d5b3ffc42f7820e8ee07705496955e4c2c38dd9
('drm: fixup some of the ioctl function exit paths'): The vblank ioctl
needs to update the userspace parameters when interrupted by a signal,
which was prevented by the return code check. This could cause the X
server to hang in drmWaitVBlank().

Signed-off-by: Michel Dänzer <daenzer at vmware.com>
Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index f01def1..019b7c5 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -481,7 +481,7 @@ int drm_ioctl(struct inode *inode, struct file *filp,
 		}
 		retcode = func(dev, kdata, file_priv);
 
-		if ((retcode == 0) && (cmd & IOC_OUT)) {
+		if (cmd & IOC_OUT) {
 			if (copy_to_user((void __user *)arg, kdata,
 					 _IOC_SIZE(cmd)) != 0)
 				retcode = -EFAULT;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1620
retrieving revision 1.1621
diff -u -p -r1.1620 -r1.1621
--- kernel.spec	22 May 2009 16:44:33 -0000	1.1620
+++ kernel.spec	22 May 2009 21:51:32 -0000	1.1621
@@ -706,6 +706,7 @@ Patch1831: drm-intel-include-965gme-pci-
 Patch1832: drm-intel-gem-use-dma32-on-pae.patch
 Patch1833: drm-intel-i8xx-cursors.patch
 Patch1834: drm-intel-vmalloc.patch
+Patch1835: drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch
 
 # kludge to make ich9 e1000 work
 Patch2000: linux-2.6-e1000-ich9.patch
@@ -1380,6 +1381,7 @@ ApplyPatch linux-2.6.29.3-boot-vga.patch
 ApplyPatch drm-intel-gem-use-dma32-on-pae.patch
 ApplyPatch drm-intel-i8xx-cursors.patch
 ApplyPatch drm-intel-vmalloc.patch
+ApplyPatch drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch
 
 # linux1394 git patches
 ApplyPatch linux-2.6-firewire-git-update.patch
@@ -2004,6 +2006,11 @@ fi
 # and build.
 
 %changelog
+* Fri May 22 2009 Kyle McMartin <kyle at redhat.com> 2.6.29.3-159
+- drm-copyback-ioctl-data-to-userspace-regardless-of-retcode.patch:
+  Fix possible hang in drmWaitVblank.
+   upstream 9b6fe313bfce27d4a261257da70196be0ac2bef5.
+
 * Fri May 22 2009 John W. Linville <linville at redhat.com> - 2.6.29.3-158
 - back-port "iwl3945: use cancel_delayed_work_sync to cancel rfkill_poll"
 - modify changelog entry from Apr 13 2009 to reference correct patch




More information about the fedora-extras-commits mailing list