]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2013 23:31:30 +0000 (16:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2013 23:31:30 +0000 (16:31 -0700)
added patches:
drivers-uio-fix-uio-device-registration-failure.patch

queue-3.9/drivers-uio-fix-uio-device-registration-failure.patch [new file with mode: 0644]
queue-3.9/series

diff --git a/queue-3.9/drivers-uio-fix-uio-device-registration-failure.patch b/queue-3.9/drivers-uio-fix-uio-device-registration-failure.patch
new file mode 100644 (file)
index 0000000..ab486dc
--- /dev/null
@@ -0,0 +1,34 @@
+From 5ed0505c713805f89473cdc0bbfb5110dfd840cb Mon Sep 17 00:00:00 2001
+From: Damian Hobson-Garcia <dhobsong@igel.co.jp>
+Date: Tue, 26 Mar 2013 10:31:22 +0900
+Subject: drivers: uio: Fix UIO device registration failure
+
+From: Damian Hobson-Garcia <dhobsong@igel.co.jp>
+
+commit 5ed0505c713805f89473cdc0bbfb5110dfd840cb upstream.
+
+Until recently uio_get_minor() returned 0 for success and
+a negative value on failure.  This became non-negative for suceess and
+negative for failure.  Restore the original return value spec so that we can
+successfully initialize UIO devices with a non-zero minor device
+number.
+
+Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
+Cc: "Hans J. Koch" <hjk@hansjkoch.de>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/uio/uio.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/uio/uio.c
++++ b/drivers/uio/uio.c
+@@ -374,6 +374,7 @@ static int uio_get_minor(struct uio_devi
+       retval = idr_alloc(&uio_idr, idev, 0, UIO_MAX_DEVICES, GFP_KERNEL);
+       if (retval >= 0) {
+               idev->minor = retval;
++              retval = 0;
+       } else if (retval == -ENOSPC) {
+               dev_err(idev->dev, "too many uio devices\n");
+               retval = -EINVAL;
index b56a562e05129bca20e79b99d32192c9611f23c3..a7dbef970e750e1f82d1651bdc730e28f32a8114 100644 (file)
@@ -90,3 +90,4 @@ target-iscsi-don-t-corrupt-bh_count-in-iscsit_stop_time2retain_timer.patch
 rbd-use-the-correct-length-for-format-2-object-names.patch
 perf-fix-perf-mmap-bugs.patch
 perf-fix-mmap-accounting-hole.patch
+drivers-uio-fix-uio-device-registration-failure.patch