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

Ben Hutchings benh at alioth.debian.org
Tue Mar 20 03:19:11 UTC 2012


Author: benh
Date: Tue Mar 20 03:18:49 2012
New Revision: 18860

Log:
block: fix __blkdev_get and add_disk race condition

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/all/CIFS-Fix-a-spurious-error-in-cifs_push_posix_locks.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/base

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Tue Mar 20 03:14:58 2012	(r18859)
+++ dists/sid/linux-2.6/debian/changelog	Tue Mar 20 03:18:49 2012	(r18860)
@@ -21,6 +21,7 @@
     needed by modules (fixes FTBFS)
   * [x86] Disable POHMELFS; this version is obsolete
   * epoll: Don't limit non-nested epoll paths
+  * CIFS: Fix a spurious error in cifs_push_posix_locks
 
   [ Jonathan Nieder ]
   * [x86] Enable RTS5139 as module (Closes: #663912)

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/CIFS-Fix-a-spurious-error-in-cifs_push_posix_locks.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/CIFS-Fix-a-spurious-error-in-cifs_push_posix_locks.patch	Tue Mar 20 03:18:49 2012	(r18860)
@@ -0,0 +1,67 @@
+From ce85852b90a214cf577fc1b4f49d99fd7e98784a Mon Sep 17 00:00:00 2001
+From: Pavel Shilovsky <piastry at etersoft.ru>
+Date: Sat, 17 Mar 2012 09:46:55 +0300
+Subject: [PATCH] CIFS: Fix a spurious error in cifs_push_posix_locks
+
+Signed-off-by: Pavel Shilovsky <piastry at etersoft.ru>
+Reviewed-by: Jeff Layton <jlayton at redhat.com>
+Reported-by: Ben Hutchings <ben at decadent.org.uk>
+Signed-off-by: Steve French <stevef at smf-gateway.(none)>
+---
+ fs/cifs/file.c |   19 ++++++++++---------
+ 1 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/fs/cifs/file.c b/fs/cifs/file.c
+index 5e64748..8e02dbd 100644
+--- a/fs/cifs/file.c
++++ b/fs/cifs/file.c
+@@ -960,9 +960,9 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
+ 	INIT_LIST_HEAD(&locks_to_send);
+ 
+ 	/*
+-	 * Allocating count locks is enough because no locks can be added to
+-	 * the list while we are holding cinode->lock_mutex that protects
+-	 * locking operations of this inode.
++	 * Allocating count locks is enough because no FL_POSIX locks can be
++	 * added to the list while we are holding cinode->lock_mutex that
++	 * protects locking operations of this inode.
+ 	 */
+ 	for (; i < count; i++) {
+ 		lck = kmalloc(sizeof(struct lock_to_push), GFP_KERNEL);
+@@ -973,18 +973,20 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
+ 		list_add_tail(&lck->llist, &locks_to_send);
+ 	}
+ 
+-	i = 0;
+ 	el = locks_to_send.next;
+ 	lock_flocks();
+ 	cifs_for_each_lock(cfile->dentry->d_inode, before) {
++		flock = *before;
++		if ((flock->fl_flags & FL_POSIX) == 0)
++			continue;
+ 		if (el == &locks_to_send) {
+-			/* something is really wrong */
++			/*
++			 * The list ended. We don't have enough allocated
++			 * structures - something is really wrong.
++			 */
+ 			cERROR(1, "Can't push all brlocks!");
+ 			break;
+ 		}
+-		flock = *before;
+-		if ((flock->fl_flags & FL_POSIX) == 0)
+-			continue;
+ 		length = 1 + flock->fl_end - flock->fl_start;
+ 		if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK)
+ 			type = CIFS_RDLCK;
+@@ -996,7 +998,6 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
+ 		lck->length = length;
+ 		lck->type = type;
+ 		lck->offset = flock->fl_start;
+-		i++;
+ 		el = el->next;
+ 	}
+ 	unlock_flocks();
+-- 
+1.7.0.4
+

Modified: dists/sid/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/base	Tue Mar 20 03:14:58 2012	(r18859)
+++ dists/sid/linux-2.6/debian/patches/series/base	Tue Mar 20 03:18:49 2012	(r18860)
@@ -82,3 +82,4 @@
 + features/all/fs-hardlink-creation-restrictions-fix.patch
 + features/all/fs-hardlink-creation-restriction-cleanup.patch
 + bugfix/all/Don-t-limit-non-nested-epoll-paths.patch
++ bugfix/all/CIFS-Fix-a-spurious-error-in-cifs_push_posix_locks.patch



More information about the Kernel-svn-changes mailing list