]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.2-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Apr 2012 00:57:48 +0000 (17:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Apr 2012 00:57:48 +0000 (17:57 -0700)
added patches:
arm-tegra-remove-tegra30-errata-from-mach_tegra_dt.patch
cifs-fix-vfs-lock-usage-for-oplocked-files.patch

queue-3.2/arm-tegra-remove-tegra30-errata-from-mach_tegra_dt.patch [new file with mode: 0644]
queue-3.2/cifs-fix-vfs-lock-usage-for-oplocked-files.patch [new file with mode: 0644]
queue-3.2/series

diff --git a/queue-3.2/arm-tegra-remove-tegra30-errata-from-mach_tegra_dt.patch b/queue-3.2/arm-tegra-remove-tegra30-errata-from-mach_tegra_dt.patch
new file mode 100644 (file)
index 0000000..54fcbfa
--- /dev/null
@@ -0,0 +1,40 @@
+From swarren@wwwdotorg.org  Thu Apr  5 17:44:42 2012
+From: Stephen Warren <swarren@wwwdotorg.org>
+Date: Thu,  5 Apr 2012 16:50:05 -0600
+Subject: [PATCH] ARM: tegra: remove Tegra30 errata from MACH_TEGRA_DT
+To: stable@vger.kernel.org
+Cc: olof@lixom.net, Stephen Warren <swarren@nvidia.com>
+Message-ID: <1333666205-23101-1-git-send-email-swarren@wwwdotorg.org>
+
+From: Stephen Warren <swarren@nvidia.com>
+
+[no upstream commit match, as this is a fix for a mis-applied patch in the
+previous 3.2-stable release. - gregkh]
+
+Commit 83e4194 "ARM: tegra: select required CPU and L2 errata options"
+contained two chunks; one was errata for Tegra20 (correctly applied)
+and the second errata for Tegra30. The latter was accidentally applied
+to the wrong config option; Tegra30 support wasn't added until v3.3,
+and so the second chunk should have just been dropped. This patch does
+so.
+
+Signed-off-by: Stephen Warren <swarren@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm/mach-tegra/Kconfig |    5 -----
+ 1 file changed, 5 deletions(-)
+
+--- a/arch/arm/mach-tegra/Kconfig
++++ b/arch/arm/mach-tegra/Kconfig
+@@ -61,11 +61,6 @@ config MACH_SEABOARD
+ config MACH_TEGRA_DT
+       bool "Generic Tegra board (FDT support)"
+       select USE_OF
+-      select ARM_ERRATA_743622
+-      select ARM_ERRATA_751472
+-      select ARM_ERRATA_754322
+-      select ARM_ERRATA_764369
+-      select PL310_ERRATA_769419 if CACHE_L2X0
+       help
+         Support for generic nVidia Tegra boards using Flattened Device Tree
diff --git a/queue-3.2/cifs-fix-vfs-lock-usage-for-oplocked-files.patch b/queue-3.2/cifs-fix-vfs-lock-usage-for-oplocked-files.patch
new file mode 100644 (file)
index 0000000..578de79
--- /dev/null
@@ -0,0 +1,93 @@
+From 66189be74ff5f9f3fd6444315b85be210d07cef2 Mon Sep 17 00:00:00 2001
+From: Pavel Shilovsky <piastry@etersoft.ru>
+Date: Wed, 28 Mar 2012 21:56:19 +0400
+Subject: CIFS: Fix VFS lock usage for oplocked files
+
+From: Pavel Shilovsky <piastry@etersoft.ru>
+
+commit 66189be74ff5f9f3fd6444315b85be210d07cef2 upstream.
+
+We can deadlock if we have a write oplock and two processes
+use the same file handle. In this case the first process can't
+unlock its lock if the second process blocked on the lock in the
+same time.
+
+Fix it by using posix_lock_file rather than posix_lock_file_wait
+under cinode->lock_mutex. If we request a blocking lock and
+posix_lock_file indicates that there is another lock that prevents
+us, wait untill that lock is released and restart our call.
+
+Acked-by: Jeff Layton <jlayton@redhat.com>
+Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
+Signed-off-by: Steve French <sfrench@us.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/file.c     |   10 +++++++++-
+ fs/locks.c         |    3 ++-
+ include/linux/fs.h |    5 +++++
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+--- a/fs/cifs/file.c
++++ b/fs/cifs/file.c
+@@ -835,13 +835,21 @@ cifs_posix_lock_set(struct file *file, s
+       if ((flock->fl_flags & FL_POSIX) == 0)
+               return rc;
++try_again:
+       mutex_lock(&cinode->lock_mutex);
+       if (!cinode->can_cache_brlcks) {
+               mutex_unlock(&cinode->lock_mutex);
+               return rc;
+       }
+-      rc = posix_lock_file_wait(file, flock);
++
++      rc = posix_lock_file(file, flock, NULL);
+       mutex_unlock(&cinode->lock_mutex);
++      if (rc == FILE_LOCK_DEFERRED) {
++              rc = wait_event_interruptible(flock->fl_wait, !flock->fl_next);
++              if (!rc)
++                      goto try_again;
++              locks_delete_block(flock);
++      }
+       return rc;
+ }
+--- a/fs/locks.c
++++ b/fs/locks.c
+@@ -510,12 +510,13 @@ static void __locks_delete_block(struct
+ /*
+  */
+-static void locks_delete_block(struct file_lock *waiter)
++void locks_delete_block(struct file_lock *waiter)
+ {
+       lock_flocks();
+       __locks_delete_block(waiter);
+       unlock_flocks();
+ }
++EXPORT_SYMBOL(locks_delete_block);
+ /* Insert waiter into blocker's block list.
+  * We use a circular list so that processes can be easily woken up in
+--- a/include/linux/fs.h
++++ b/include/linux/fs.h
+@@ -1203,6 +1203,7 @@ extern int vfs_setlease(struct file *, l
+ extern int lease_modify(struct file_lock **, int);
+ extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
+ extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
++extern void locks_delete_block(struct file_lock *waiter);
+ extern void lock_flocks(void);
+ extern void unlock_flocks(void);
+ #else /* !CONFIG_FILE_LOCKING */
+@@ -1347,6 +1348,10 @@ static inline int lock_may_write(struct
+       return 1;
+ }
++static inline void locks_delete_block(struct file_lock *waiter)
++{
++}
++
+ static inline void lock_flocks(void)
+ {
+ }
index 9bda00001f6422d0e1b7afaa69c5ec46fe311c4e..8c88027c4dd4f705d25093b1fc262a07c94b2435 100644 (file)
@@ -35,3 +35,5 @@ kgdbts-fix-kernel-oops-with-config_debug_rodata.patch
 kgdbts-1-of-2-fix-single-step-awareness-to-work-correctly-with-smp.patch
 kgdbts-2-of-2-fix-single-step-awareness-to-work-correctly-with-smp.patch
 x86-kgdb-fix-debug_rodata-limitation-using-text_poke.patch
+cifs-fix-vfs-lock-usage-for-oplocked-files.patch
+arm-tegra-remove-tegra30-errata-from-mach_tegra_dt.patch