[kernel] r16286 - in dists/sid/linux-2.6/debian: . patches/bugfix/all/stable patches/series

Ben Hutchings benh at alioth.debian.org
Thu Sep 16 00:31:08 UTC 2010


Author: benh
Date: Thu Sep 16 00:31:04 2010
New Revision: 16286

Log:
Add mistakenly omitted vgaarb changes from 2.6.32.12

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/all/stable/2.6.32.12-vgaarb.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/23

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Wed Sep 15 22:53:18 2010	(r16285)
+++ dists/sid/linux-2.6/debian/changelog	Thu Sep 16 00:31:04 2010	(r16286)
@@ -4,6 +4,8 @@
   * cgroupfs: create /sys/fs/cgroup to mount cgroupfs on (Closes: #595964)
   * r8169: Fix MDIO timing (Closes: #583139; mistakenly reverted in 2.6.32-19)
   * gro: Fix bogus gso_size on the first fraglist entry (Closes: #596802)
+  * vgaarb: Fix VGA arbiter to accept PCI domains other than 0 (from stable
+    2.6.32.12; mistakenly omitted in 2.6.32-12)
 
   [ maximilian attems ]
   * openvz: cfq-iosched: do not force idling for sync workload.

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/stable/2.6.32.12-vgaarb.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/stable/2.6.32.12-vgaarb.patch	Thu Sep 16 00:31:04 2010	(r16286)
@@ -0,0 +1,69 @@
+Subject: [PATCH] Rest of stable 2.6.32.12
+
+Changes to vgaarb were wrongly omitted from 2.6.32.12.patch.
+
+--- a/drivers/gpu/vga/vgaarb.c
++++ b/drivers/gpu/vga/vgaarb.c
+@@ -954,6 +954,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
+ 		}
+ 
+ 	} else if (strncmp(curr_pos, "target ", 7) == 0) {
++		struct pci_bus *pbus;
+ 		unsigned int domain, bus, devfn;
+ 		struct vga_device *vgadev;
+ 
+@@ -961,7 +962,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
+ 		remaining -= 7;
+ 		pr_devel("client 0x%p called 'target'\n", priv);
+ 		/* if target is default */
+-		if (!strncmp(buf, "default", 7))
++		if (!strncmp(curr_pos, "default", 7))
+ 			pdev = pci_dev_get(vga_default_device());
+ 		else {
+ 			if (!vga_pci_str_to_vars(curr_pos, remaining,
+@@ -969,18 +970,31 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
+ 				ret_val = -EPROTO;
+ 				goto done;
+ 			}
+-
+-			pdev = pci_get_bus_and_slot(bus, devfn);
++			pr_devel("vgaarb: %s ==> %x:%x:%x.%x\n", curr_pos,
++				domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
++
++			pbus = pci_find_bus(domain, bus);
++			pr_devel("vgaarb: pbus %p\n", pbus);
++			if (pbus == NULL) {
++				pr_err("vgaarb: invalid PCI domain and/or bus address %x:%x\n",
++					domain, bus);
++				ret_val = -ENODEV;
++				goto done;
++			}
++			pdev = pci_get_slot(pbus, devfn);
++			pr_devel("vgaarb: pdev %p\n", pdev);
+ 			if (!pdev) {
+-				pr_info("vgaarb: invalid PCI address!\n");
++				pr_err("vgaarb: invalid PCI address %x:%x\n",
++					bus, devfn);
+ 				ret_val = -ENODEV;
+ 				goto done;
+ 			}
+ 		}
+ 
+ 		vgadev = vgadev_find(pdev);
++		pr_devel("vgaarb: vgadev %p\n", vgadev);
+ 		if (vgadev == NULL) {
+-			pr_info("vgaarb: this pci device is not a vga device\n");
++			pr_err("vgaarb: this pci device is not a vga device\n");
+ 			pci_dev_put(pdev);
+ 			ret_val = -ENODEV;
+ 			goto done;
+@@ -998,7 +1012,8 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
+ 			}
+ 		}
+ 		if (i == MAX_USER_CARDS) {
+-			pr_err("vgaarb: maximum user cards number reached!\n");
++			pr_err("vgaarb: maximum user cards (%d) number reached!\n",
++				MAX_USER_CARDS);
+ 			pci_dev_put(pdev);
+ 			/* XXX: which value to return? */
+ 			ret_val =  -ENOMEM;

Modified: dists/sid/linux-2.6/debian/patches/series/23
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/23	Wed Sep 15 22:53:18 2010	(r16285)
+++ dists/sid/linux-2.6/debian/patches/series/23	Thu Sep 16 00:31:04 2010	(r16286)
@@ -2,3 +2,6 @@
 + bugfix/all/r8169-fix-random-mdio_write-failures.patch
 + bugfix/all/r8169-fix-mdio_read-and-update-mdio_write.patch
 + bugfix/all/gro-Fix-bogus-gso_size-on-the-first-fraglist-entry.patch
+- bugfix/all/vgaarb-fix-target-default-passing.patch
+- bugfix/all/vgaarb-fix-incorrect-dereference-of-userspace-pointe.patch
++ bugfix/all/stable/2.6.32.12-vgaarb.patch



More information about the Kernel-svn-changes mailing list