]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.7-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Feb 2013 10:41:35 +0000 (11:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Feb 2013 10:41:35 +0000 (11:41 +0100)
added patches:
target-fix-regression-with-dev_link_magic-in-target_fabric_port_link.patch
xfs-fix-periodic-log-flushing.patch

queue-3.7/series
queue-3.7/target-fix-regression-with-dev_link_magic-in-target_fabric_port_link.patch [new file with mode: 0644]
queue-3.7/xfs-fix-periodic-log-flushing.patch [new file with mode: 0644]

index 2d9118a6847ed6603a05bf6c2d728e0c67461dd2..e6e21b35c867107abe46fb7f7448cbdc14149684 100644 (file)
@@ -72,3 +72,5 @@ kvm-fix-irqfd-resampler-list-walk.patch
 netfilter-ipt_reject-fix-wrong-transport-header-pointer-in-tcp-reset.patch
 netfilter-nf_ct_reasm-fix-conntrack-reassembly-expire-code.patch
 x86-sandy-bridge-sandy-bridge-workaround-depends-on-config_pci.patch
+xfs-fix-periodic-log-flushing.patch
+target-fix-regression-with-dev_link_magic-in-target_fabric_port_link.patch
diff --git a/queue-3.7/target-fix-regression-with-dev_link_magic-in-target_fabric_port_link.patch b/queue-3.7/target-fix-regression-with-dev_link_magic-in-target_fabric_port_link.patch
new file mode 100644 (file)
index 0000000..4560e28
--- /dev/null
@@ -0,0 +1,51 @@
+From caiqian@redhat.com  Fri Feb  1 11:39:40 2013
+From: Nicholas Bellinger <nab@linux-iscsi.org>
+Date: Thu, 24 Jan 2013 21:57:14 -0500 (EST)
+Subject: target: fix regression with dev_link_magic in target_fabric_port_link
+To: stable@vger.kernel.org
+Cc: Nicholas Bellinger <nab@linux-iscsi.org>, Chris Boot <bootc@bootc.net>
+Message-ID: <1667210120.9168305.1359082634537.JavaMail.root@redhat.com>
+
+From: Nicholas Bellinger <nab@linux-iscsi.org>
+
+This is to fix a regression that only affect the stable (not for the mainline)
+that the stable commit fdf9d86 was incorrectly placed dev->dev_link_magic check
+before the *dev assignment in target_fabric_port_link() due to fuzzy automatically
+context adjustment during the back-porting.
+
+Reported-by: Chris Boot <bootc@bootc.net>
+Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
+Signed-off-by: CAI Qian <caiqian@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/target/target_core_fabric_configfs.c |   11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+--- a/drivers/target/target_core_fabric_configfs.c
++++ b/drivers/target/target_core_fabric_configfs.c
+@@ -751,12 +751,6 @@ static int target_fabric_port_link(
+       struct target_fabric_configfs *tf;
+       int ret;
+-      if (dev->dev_link_magic != SE_DEV_LINK_MAGIC) {
+-              pr_err("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:"
+-                      " %p to struct se_device: %p\n", se_dev_ci, dev);
+-              return -EFAULT;
+-      }
+-
+       tpg_ci = &lun_ci->ci_parent->ci_group->cg_item;
+       se_tpg = container_of(to_config_group(tpg_ci),
+                               struct se_portal_group, tpg_group);
+@@ -774,6 +768,11 @@ static int target_fabric_port_link(
+               ret = -ENODEV;
+               goto out;
+       }
++      if (dev->dev_link_magic != SE_DEV_LINK_MAGIC) {
++              pr_err("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:"
++                      " %p to struct se_device: %p\n", se_dev_ci, dev);
++              return -EFAULT;
++      }
+       lun_p = core_dev_add_lun(se_tpg, dev, lun->unpacked_lun);
+       if (IS_ERR(lun_p)) {
diff --git a/queue-3.7/xfs-fix-periodic-log-flushing.patch b/queue-3.7/xfs-fix-periodic-log-flushing.patch
new file mode 100644 (file)
index 0000000..f745ea2
--- /dev/null
@@ -0,0 +1,46 @@
+From bpm@sgi.com  Fri Feb  1 11:36:39 2013
+From: Ben Myers <bpm@sgi.com>
+Date: Fri, 25 Jan 2013 12:45:07 -0600
+Subject: xfs: fix periodic log flushing
+To: stable@vger.kernel.org
+Cc: xfs@oss.sgi.com, dchinner@redhat.com
+Message-ID: <20130125184507.GU30652@sgi.com>
+
+From: Dave Chinner <dchinner@redhat.com>
+
+[Please take this patch for -stable in kernels 3.5-3.7.  It doesn't have an
+equivalent upstream commit because the code was removed before the bug was
+discovered.  See f661f1e0bf50 and 7e18530bef6a.]
+
+There is a logic inversion in xfssyncd_worker() which means that the
+log is not periodically forced or idled correctly. This means that
+metadata changes aggregated in memory do not get flushed in a timely
+manner, and hence if filesystem is not cleanly unmounted those
+changes can be lost. This loss can manifest itself even hours after
+the changes were made if the filesystem is left to idle without a
+sync() occurring between the last modification and the
+crash/shutdown occuring.
+
+Signed-off-by: Dave Chinner <dchinner@redhat.com>
+Reviewed-by: Ben Myers <bpm@sgi.com>
+Signed-off-by: Ben Myers <bpm@sgi.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/xfs/xfs_sync.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+If people agree the fix is correct, I'll post it to the -stable
+list for inclusion...
+
+--- a/fs/xfs/xfs_sync.c
++++ b/fs/xfs/xfs_sync.c
+@@ -400,7 +400,7 @@ xfs_sync_worker(
+        * cancel_delayed_work_sync on this work queue before tearing down
+        * the ail and the log in xfs_log_unmount.
+        */
+-      if (!(mp->m_super->s_flags & MS_ACTIVE) &&
++      if ((mp->m_super->s_flags & MS_ACTIVE) &&
+           !(mp->m_flags & XFS_MOUNT_RDONLY)) {
+               /* dgc: errors ignored here */
+               if (mp->m_super->s_writers.frozen == SB_UNFROZEN &&