]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.32 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 5 Aug 2010 23:02:36 +0000 (16:02 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 5 Aug 2010 23:02:36 +0000 (16:02 -0700)
queue-2.6.32/cifs-fix-compile-error-with-__init-in-cifs_init_dns_resolver-definition.patch [new file with mode: 0644]
queue-2.6.32/cifs-remove-__exit-mark-from-cifs_exit_dns_resolver.patch [new file with mode: 0644]
queue-2.6.32/gfs2-rename-causes-kernel-oops.patch [new file with mode: 0644]
queue-2.6.32/scsi-enclosure-fix-error-path-actually-return-err_ptr-on-error.patch [new file with mode: 0644]
queue-2.6.32/series
queue-2.6.32/slow-work-use-get_ref-wrapper-instead-of-directly-calling-get_ref.patch [new file with mode: 0644]
queue-2.6.32/xen-drop-xen_sched_clock-in-favour-of-using-plain-wallclock-time.patch [new file with mode: 0644]

diff --git a/queue-2.6.32/cifs-fix-compile-error-with-__init-in-cifs_init_dns_resolver-definition.patch b/queue-2.6.32/cifs-fix-compile-error-with-__init-in-cifs_init_dns_resolver-definition.patch
new file mode 100644 (file)
index 0000000..697761d
--- /dev/null
@@ -0,0 +1,36 @@
+From mikey@neuling.org  Thu Aug  5 15:51:58 2010
+From: Michael Neuling <mikey@neuling.org>
+Date: Wed, 04 Aug 2010 08:32:13 +1000
+Subject: CIFS: Fix compile error with __init in cifs_init_dns_resolver() definition
+Subject: [stable] [PATCH 2.6.32/stable] CIFS: Fix compile error with __init in cifs_init_dns_resolver() definition
+To: David Howells <dhowells@redhat.com>
+Cc: linux-cifs@vger.kernel.org, stable@kernel.org, Jeff Layton <jlayton@redhat.com>, linux-kernel@vger.kernel.org
+Message-ID: <20749.1280874733@neuling.org>
+
+From: Michael Neuling <mikey@neuling.org>
+
+An allmodconfig compile on ppc64 with 2.6.32.17 currently gives this error
+
+fs/cifs/dns_resolve.h:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cifs_init_dns_resolver'
+
+This adds the correct header file to fix this.
+
+Signed-off-by: Michael Neuling <mikey@neuling.org>
+Cc: David Howells <dhowells@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/cifs/dns_resolve.h |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/fs/cifs/dns_resolve.h
++++ b/fs/cifs/dns_resolve.h
+@@ -24,6 +24,8 @@
+ #define _DNS_RESOLVE_H
+ #ifdef __KERNEL__
++#include <linux/module.h>
++
+ extern int __init cifs_init_dns_resolver(void);
+ extern void cifs_exit_dns_resolver(void);
+ extern int dns_resolve_server_name_to_ip(const char *unc, char **ip_addr);
diff --git a/queue-2.6.32/cifs-remove-__exit-mark-from-cifs_exit_dns_resolver.patch b/queue-2.6.32/cifs-remove-__exit-mark-from-cifs_exit_dns_resolver.patch
new file mode 100644 (file)
index 0000000..16dae59
--- /dev/null
@@ -0,0 +1,46 @@
+From 51c20fcced5badee0e2021c6c89f44aa3cbd72aa Mon Sep 17 00:00:00 2001
+From: David Howells <dhowells@redhat.com>
+Date: Fri, 30 Jul 2010 15:25:19 +0100
+Subject: CIFS: Remove __exit mark from cifs_exit_dns_resolver()
+
+From: David Howells <dhowells@redhat.com>
+
+commit 51c20fcced5badee0e2021c6c89f44aa3cbd72aa upstream.
+
+Remove the __exit mark from cifs_exit_dns_resolver() as it's called by the
+module init routine in case of error, and so may have been discarded during
+linkage.
+
+Signed-off-by: David Howells <dhowells@redhat.com>
+Acked-by: Jeff Layton <jlayton@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Michael Neuling <mikey@neuling.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/cifs/dns_resolve.c |    2 +-
+ fs/cifs/dns_resolve.h |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/cifs/dns_resolve.c
++++ b/fs/cifs/dns_resolve.c
+@@ -226,7 +226,7 @@ failed_put_cred:
+       return ret;
+ }
+-void __exit cifs_exit_dns_resolver(void)
++void cifs_exit_dns_resolver(void)
+ {
+       key_revoke(dns_resolver_cache->thread_keyring);
+       unregister_key_type(&key_type_dns_resolver);
+--- a/fs/cifs/dns_resolve.h
++++ b/fs/cifs/dns_resolve.h
+@@ -25,7 +25,7 @@
+ #ifdef __KERNEL__
+ extern int __init cifs_init_dns_resolver(void);
+-extern void __exit cifs_exit_dns_resolver(void);
++extern void cifs_exit_dns_resolver(void);
+ extern int dns_resolve_server_name_to_ip(const char *unc, char **ip_addr);
+ #endif /* KERNEL */
diff --git a/queue-2.6.32/gfs2-rename-causes-kernel-oops.patch b/queue-2.6.32/gfs2-rename-causes-kernel-oops.patch
new file mode 100644 (file)
index 0000000..7e6f419
--- /dev/null
@@ -0,0 +1,67 @@
+From 728a756b8fcd22d80e2dbba8117a8a3aafd3f203 Mon Sep 17 00:00:00 2001
+From: Bob Peterson <rpeterso@redhat.com>
+Date: Wed, 14 Jul 2010 18:12:26 -0400
+Subject: GFS2: rename causes kernel Oops
+
+From: Bob Peterson <rpeterso@redhat.com>
+
+commit 728a756b8fcd22d80e2dbba8117a8a3aafd3f203 upstream.
+
+This patch fixes a kernel Oops in the GFS2 rename code.
+
+The problem was in the way the gfs2 directory code was trying
+to re-use sentinel directory entries.
+
+In the failing case, gfs2's rename function was renaming a
+file to another name that had the same non-trivial length.
+The file being renamed happened to be the first directory
+entry on the leaf block.
+
+First, the rename code (gfs2_rename in ops_inode.c) found the
+original directory entry and decided it could do its job by
+simply replacing the directory entry with another.  Therefore
+it determined correctly that no block allocations were needed.
+
+Next, the rename code deleted the old directory entry prior to
+replacing it with the new name.  Therefore, the soon-to-be
+replaced directory entry was temporarily made into a directory
+entry "sentinel" or a place holder at the start of a leaf block.
+
+Lastly, it went to re-add the replacement directory entry in
+that leaf block.  However, when gfs2_dirent_find_space was
+looking for space in the leaf block, it used the wrong value
+for the sentinel.  That threw off its calculations so later
+it decides it can't really re-use the sentinel and therefore
+must allocate a new leaf block.  But because it previously decided
+to re-use the directory entry, it didn't waste the time to
+grab a new block allocation for the inode.  Therefore, the
+inode's i_alloc pointer was still NULL and it crashes trying to
+reference it.
+
+In the case of sentinel directory entries, the entire dirent is
+reused, not just the "free space" portion of it, and therefore
+the function gfs2_dirent_find_space should use the value 0
+rather than GFS2_DIRENT_SIZE(0) for the actual dirent size.
+
+Fixing this calculation enables the reproducer programs to work
+properly.
+
+Signed-off-by: Bob Peterson <rpeterso@redhat.com>
+Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/gfs2/dir.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/gfs2/dir.c
++++ b/fs/gfs2/dir.c
+@@ -392,7 +392,7 @@ static int gfs2_dirent_find_space(const
+       unsigned totlen = be16_to_cpu(dent->de_rec_len);
+       if (gfs2_dirent_sentinel(dent))
+-              actual = GFS2_DIRENT_SIZE(0);
++              actual = 0;
+       if (totlen - actual >= required)
+               return 1;
+       return 0;
diff --git a/queue-2.6.32/scsi-enclosure-fix-error-path-actually-return-err_ptr-on-error.patch b/queue-2.6.32/scsi-enclosure-fix-error-path-actually-return-err_ptr-on-error.patch
new file mode 100644 (file)
index 0000000..cf68028
--- /dev/null
@@ -0,0 +1,35 @@
+From a91c1be21704113b023919826c6d531da46656ef Mon Sep 17 00:00:00 2001
+From: James Bottomley <James.Bottomley@suse.de>
+Date: Fri, 12 Mar 2010 16:14:42 -0600
+Subject: SCSI: enclosure: fix error path - actually return ERR_PTR() on error
+
+From: James Bottomley <James.Bottomley@suse.de>
+
+commit a91c1be21704113b023919826c6d531da46656ef upstream.
+
+we also need to clean up and free the cdev.
+
+Reported-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
+Signed-off-by: James Bottomley <James.Bottomley@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/misc/enclosure.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/misc/enclosure.c
++++ b/drivers/misc/enclosure.c
+@@ -284,8 +284,11 @@ enclosure_component_register(struct encl
+       cdev->groups = enclosure_groups;
+       err = device_register(cdev);
+-      if (err)
+-              ERR_PTR(err);
++      if (err) {
++              ecomp->number = -1;
++              put_device(cdev);
++              return ERR_PTR(err);
++      }
+       return ecomp;
+ }
index e6304d1656e1bff78bc3a3bc93e9cb26af99edbf..03f3ecfbf5b43b6c452653c101d3443a9fb1774a 100644 (file)
@@ -19,3 +19,9 @@ iwlwifi-fix-scan-abort.patch
 cfg80211-ignore-spurious-deauth.patch
 cfg80211-don-t-get-expired-bsses.patch
 xfs-prevent-swapext-from-operating-on-write-only-files.patch
+scsi-enclosure-fix-error-path-actually-return-err_ptr-on-error.patch
+gfs2-rename-causes-kernel-oops.patch
+slow-work-use-get_ref-wrapper-instead-of-directly-calling-get_ref.patch
+cifs-remove-__exit-mark-from-cifs_exit_dns_resolver.patch
+cifs-fix-compile-error-with-__init-in-cifs_init_dns_resolver-definition.patch
+xen-drop-xen_sched_clock-in-favour-of-using-plain-wallclock-time.patch
diff --git a/queue-2.6.32/slow-work-use-get_ref-wrapper-instead-of-directly-calling-get_ref.patch b/queue-2.6.32/slow-work-use-get_ref-wrapper-instead-of-directly-calling-get_ref.patch
new file mode 100644 (file)
index 0000000..9194685
--- /dev/null
@@ -0,0 +1,33 @@
+From 88be12c440cfa2fa3f5be83507360aac9ea1c54e Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 29 Mar 2010 12:01:50 +0100
+Subject: slow-work: use get_ref wrapper instead of directly calling get_ref
+
+From: Dave Airlie <airlied@redhat.com>
+
+commit 88be12c440cfa2fa3f5be83507360aac9ea1c54e upstream.
+
+Otherwise we can get an oops if the user has no get_ref/put_ref
+requirement.
+
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: David Howells <dhowells@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Kurt Garloff <garloff@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/slow-work.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/slow-work.c
++++ b/kernel/slow-work.c
+@@ -640,7 +640,7 @@ int delayed_slow_work_enqueue(struct del
+                       goto cancelled;
+               /* the timer holds a reference whilst it is pending */
+-              ret = work->ops->get_ref(work);
++              ret = slow_work_get_ref(work);
+               if (ret < 0)
+                       goto cant_get_ref;
diff --git a/queue-2.6.32/xen-drop-xen_sched_clock-in-favour-of-using-plain-wallclock-time.patch b/queue-2.6.32/xen-drop-xen_sched_clock-in-favour-of-using-plain-wallclock-time.patch
new file mode 100644 (file)
index 0000000..969db33
--- /dev/null
@@ -0,0 +1,86 @@
+From 8a22b9996b001c88f2bfb54c6de6a05fc39e177a Mon Sep 17 00:00:00 2001
+From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
+Date: Mon, 12 Jul 2010 11:49:59 -0700
+Subject: xen: drop xen_sched_clock in favour of using plain wallclock time
+
+From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
+
+commit 8a22b9996b001c88f2bfb54c6de6a05fc39e177a upstream.
+
+xen_sched_clock only counts unstolen time.  In principle this should
+be useful to the Linux scheduler so that it knows how much time a process
+actually consumed.  But in practice this doesn't work very well as the
+scheduler expects the sched_clock time to be synchronized between
+cpus.  It also uses sched_clock to measure the time a task spends
+sleeping, in which case "unstolen time" isn't meaningful.
+
+So just use plain xen_clocksource_read to return wallclock nanoseconds
+for sched_clock.
+
+Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/xen/enlighten.c |    2 +-
+ arch/x86/xen/time.c      |   39 ---------------------------------------
+ 2 files changed, 1 insertion(+), 40 deletions(-)
+
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
+@@ -924,7 +924,7 @@ static const struct pv_init_ops xen_init
+ };
+ static const struct pv_time_ops xen_time_ops __initdata = {
+-      .sched_clock = xen_sched_clock,
++      .sched_clock = xen_clocksource_read,
+ };
+ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
+--- a/arch/x86/xen/time.c
++++ b/arch/x86/xen/time.c
+@@ -154,45 +154,6 @@ static void do_stolen_accounting(void)
+       account_idle_ticks(ticks);
+ }
+-/*
+- * Xen sched_clock implementation.  Returns the number of unstolen
+- * nanoseconds, which is nanoseconds the VCPU spent in RUNNING+BLOCKED
+- * states.
+- */
+-unsigned long long xen_sched_clock(void)
+-{
+-      struct vcpu_runstate_info state;
+-      cycle_t now;
+-      u64 ret;
+-      s64 offset;
+-
+-      /*
+-       * Ideally sched_clock should be called on a per-cpu basis
+-       * anyway, so preempt should already be disabled, but that's
+-       * not current practice at the moment.
+-       */
+-      preempt_disable();
+-
+-      now = xen_clocksource_read();
+-
+-      get_runstate_snapshot(&state);
+-
+-      WARN_ON(state.state != RUNSTATE_running);
+-
+-      offset = now - state.state_entry_time;
+-      if (offset < 0)
+-              offset = 0;
+-
+-      ret = state.time[RUNSTATE_blocked] +
+-              state.time[RUNSTATE_running] +
+-              offset;
+-
+-      preempt_enable();
+-
+-      return ret;
+-}
+-
+-
+ /* Get the TSC speed from Xen */
+ unsigned long xen_tsc_khz(void)
+ {