]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.7-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Feb 2013 18:08:16 +0000 (10:08 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Feb 2013 18:08:16 +0000 (10:08 -0800)
added patches:
drm-i915-fix-up-mismerge-of-3490ea5d-in-3.7.y.patch
target-fix-divide-by-zero-bug-in-fabric_max_sectors-for-unconfigured-devices.patch

queue-3.7/drm-i915-fix-up-mismerge-of-3490ea5d-in-3.7.y.patch [new file with mode: 0644]
queue-3.7/series
queue-3.7/target-fix-divide-by-zero-bug-in-fabric_max_sectors-for-unconfigured-devices.patch [new file with mode: 0644]

diff --git a/queue-3.7/drm-i915-fix-up-mismerge-of-3490ea5d-in-3.7.y.patch b/queue-3.7/drm-i915-fix-up-mismerge-of-3490ea5d-in-3.7.y.patch
new file mode 100644 (file)
index 0000000..e62c9bf
--- /dev/null
@@ -0,0 +1,30 @@
+From ajax@redhat.com  Tue Feb 26 10:02:26 2013
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 20 Feb 2013 11:54:17 -0500
+Subject: drm/i915: Fix up mismerge of 3490ea5d in 3.7.y
+To: stable@vger.kernel.org
+Message-ID: <1361379257-14681-1-git-send-email-ajax@redhat.com>
+
+From: Adam Jackson <ajax@redhat.com>
+
+The 3.7.y version of this seems to have missed a hunk in i9xx_update_wm.
+
+Tested-by: Glen Gray <slaine@slaine.org>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_pm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/intel_pm.c
++++ b/drivers/gpu/drm/i915/intel_pm.c
+@@ -1474,7 +1474,7 @@ static void i9xx_update_wm(struct drm_de
+       fifo_size = dev_priv->display.get_fifo_size(dev, 0);
+       crtc = intel_get_crtc_for_plane(dev, 0);
+-      if (crtc->enabled && crtc->fb) {
++      if (intel_crtc_active(crtc)) {
+               planea_wm = intel_calculate_wm(crtc->mode.clock,
+                                              wm_info, fifo_size,
+                                              crtc->fb->bits_per_pixel / 8,
index 0ba28a45beb33a250757f699f0920acbf11d9ec7..fd5d15001590e2c56630d1377359b4b39b5292df 100644 (file)
@@ -56,3 +56,5 @@ sparc64-fix-gfp_flags-setting-in-tsb_grow.patch
 sparc64-handle-hugepage-tsb-being-null.patch
 sparc64-fix-tsb_grow-in-atomic-context.patch
 sparc64-fix-huge-pmd-to-pte-translation-for-sun4u-in-tlb-miss-handler.patch
+drm-i915-fix-up-mismerge-of-3490ea5d-in-3.7.y.patch
+target-fix-divide-by-zero-bug-in-fabric_max_sectors-for-unconfigured-devices.patch
diff --git a/queue-3.7/target-fix-divide-by-zero-bug-in-fabric_max_sectors-for-unconfigured-devices.patch b/queue-3.7/target-fix-divide-by-zero-bug-in-fabric_max_sectors-for-unconfigured-devices.patch
new file mode 100644 (file)
index 0000000..9f02890
--- /dev/null
@@ -0,0 +1,54 @@
+From nab@linux-iscsi.org  Tue Feb 26 10:03:15 2013
+From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
+Date: Tue, 19 Feb 2013 03:15:14 +0000
+Subject: target: Fix divide by zero bug in fabric_max_sectors for unconfigured devices
+To: target-devel <target-devel@vger.kernel.org>
+Cc: Nicholas Bellinger <nab@linux-iscsi.org>, Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Message-ID: <1361243714-4765-1-git-send-email-nab@linux-iscsi.org>
+
+
+From: Nicholas Bellinger <nab@linux-iscsi.org>
+
+commit 7a3cf6ca1ab2a2f7161c6dec5a787fc7a5de864e upstream
+
+This patch fixes a possible divide by zero bug when the fabric_max_sectors
+device attribute is written and backend se_device failed to be successfully
+configured -> enabled.
+
+Go ahead and use block_size=512 within se_dev_set_fabric_max_sectors()
+in the event of a target_configure_device() failure case, as no valid
+dev->dev_attrib.block_size value will have been setup yet.
+
+Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
+Cc: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/target/target_core_device.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/target/target_core_device.c
++++ b/drivers/target/target_core_device.c
+@@ -1195,6 +1195,8 @@ int se_dev_set_queue_depth(struct se_dev
+ int se_dev_set_fabric_max_sectors(struct se_device *dev, u32 fabric_max_sectors)
+ {
++      int block_size = dev->se_sub_dev->se_dev_attrib.block_size;
++
+       if (atomic_read(&dev->dev_export_obj.obj_access_count)) {
+               pr_err("dev[%p]: Unable to change SE Device"
+                       " fabric_max_sectors while dev_export_obj: %d count exists\n",
+@@ -1232,8 +1234,12 @@ int se_dev_set_fabric_max_sectors(struct
+       /*
+        * Align max_sectors down to PAGE_SIZE to follow transport_allocate_data_tasks()
+        */
++      if (!block_size) {
++              block_size = 512;
++              pr_warn("Defaulting to 512 for zero block_size\n");
++      }
+       fabric_max_sectors = se_dev_align_max_sectors(fabric_max_sectors,
+-                                                    dev->se_sub_dev->se_dev_attrib.block_size);
++                                                    block_size);
+       dev->se_sub_dev->se_dev_attrib.fabric_max_sectors = fabric_max_sectors;
+       pr_debug("dev[%p]: SE Device max_sectors changed to %u\n",