]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .30 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Jul 2009 19:46:02 +0000 (12:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Jul 2009 19:46:02 +0000 (12:46 -0700)
14 files changed:
queue-2.6.30/alpha-fix-percpu-build-breakage.patch [new file with mode: 0644]
queue-2.6.30/block-restore-barrier-support-for-md-and-probably-other-virtual-devices.patch [new file with mode: 0644]
queue-2.6.30/dma-debug-fix-off-by-one-error-in-overlap-function.patch [new file with mode: 0644]
queue-2.6.30/fix-iommu-address-space-allocation.patch [new file with mode: 0644]
queue-2.6.30/fix-pci_unmap_addr-et-al-on-i386.patch [new file with mode: 0644]
queue-2.6.30/floppy-fix-lock-imbalance.patch [new file with mode: 0644]
queue-2.6.30/fuse-fix-bad-return-value-in-fuse_file_poll.patch [new file with mode: 0644]
queue-2.6.30/fuse-fix-return-value-of-fuse_dev_write.patch [new file with mode: 0644]
queue-2.6.30/kernel-resource.c-fix-sign-extension-in-reserve_setup.patch [new file with mode: 0644]
queue-2.6.30/md-avoid-dereferencing-null-pointer-when-accessing-suspend_-sysfs-attributes.patch [new file with mode: 0644]
queue-2.6.30/md-fix-error-path-when-duplicate-name-is-found-on-md-device-creation.patch [new file with mode: 0644]
queue-2.6.30/md-raid5-suspend-shouldn-t-affect-read-requests.patch [new file with mode: 0644]
queue-2.6.30/revert-ipv4-arp-announce-arp_proxy-and-windows-ip-conflict-verification.patch [new file with mode: 0644]
queue-2.6.30/series

diff --git a/queue-2.6.30/alpha-fix-percpu-build-breakage.patch b/queue-2.6.30/alpha-fix-percpu-build-breakage.patch
new file mode 100644 (file)
index 0000000..debb375
--- /dev/null
@@ -0,0 +1,92 @@
+From b01e8dc34379f4ba2f454390e340a025edbaaa7e Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Tue, 30 Jun 2009 11:41:18 -0700
+Subject: alpha: fix percpu build breakage
+
+From: Tejun Heo <tj@kernel.org>
+
+commit b01e8dc34379f4ba2f454390e340a025edbaaa7e upstream.
+
+alpha percpu access requires custom SHIFT_PERCPU_PTR() definition for
+modules to work around addressing range limitation.  This is done via
+generating inline assembly using C preprocessing which forces the
+assembler to generate external reference.  This happens behind the
+compiler's back and makes the compiler think that static percpu variables
+in modules are unused.
+
+This used to be worked around by using __unused attribute for percpu
+variables which prevent the compiler from omitting the variable; however,
+recent declare/definition attribute unification change broke this as
+__used can't be used for declaration.  Also, in the process,
+PER_CPU_ATTRIBUTES definition in alpha percpu.h got broken.
+
+This patch adds PER_CPU_DEF_ATTRIBUTES which is only used for definitions
+and make alpha use it to add __used for percpu variables in modules.  This
+also fixes the PER_CPU_ATTRIBUTES double definition bug.
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Tested-by: maximilian attems <max@stro.at>
+Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
+Cc: Richard Henderson <rth@twiddle.net>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/alpha/include/asm/percpu.h |    6 +++---
+ include/asm-generic/percpu.h    |    4 ++++
+ include/linux/percpu-defs.h     |    3 ++-
+ 3 files changed, 9 insertions(+), 4 deletions(-)
+
+--- a/arch/alpha/include/asm/percpu.h
++++ b/arch/alpha/include/asm/percpu.h
+@@ -30,7 +30,7 @@ extern unsigned long __per_cpu_offset[NR
+ #ifndef MODULE
+ #define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset))
+-#define PER_CPU_ATTRIBUTES
++#define PER_CPU_DEF_ATTRIBUTES
+ #else
+ /*
+  * To calculate addresses of locally defined variables, GCC uses 32-bit
+@@ -49,7 +49,7 @@ extern unsigned long __per_cpu_offset[NR
+               : "=&r"(__ptr), "=&r"(tmp_gp));         \
+       (typeof(&per_cpu_var(var)))(__ptr + (offset)); })
+-#define PER_CPU_ATTRIBUTES    __used
++#define PER_CPU_DEF_ATTRIBUTES        __used
+ #endif /* MODULE */
+@@ -71,7 +71,7 @@ extern unsigned long __per_cpu_offset[NR
+ #define __get_cpu_var(var)            per_cpu_var(var)
+ #define __raw_get_cpu_var(var)                per_cpu_var(var)
+-#define PER_CPU_ATTRIBUTES
++#define PER_CPU_DEF_ATTRIBUTES
+ #endif /* SMP */
+--- a/include/asm-generic/percpu.h
++++ b/include/asm-generic/percpu.h
+@@ -97,4 +97,8 @@ extern void setup_per_cpu_areas(void);
+ #define PER_CPU_ATTRIBUTES
+ #endif
++#ifndef PER_CPU_DEF_ATTRIBUTES
++#define PER_CPU_DEF_ATTRIBUTES
++#endif
++
+ #endif /* _ASM_GENERIC_PERCPU_H_ */
+--- a/include/linux/percpu-defs.h
++++ b/include/linux/percpu-defs.h
+@@ -24,7 +24,8 @@
+ #define DEFINE_PER_CPU_SECTION(type, name, section)                   \
+       __attribute__((__section__(PER_CPU_BASE_SECTION section)))      \
+-      PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
++      PER_CPU_ATTRIBUTES PER_CPU_DEF_ATTRIBUTES                       \
++      __typeof__(type) per_cpu__##name
+ /*
+  * Variant on the per-CPU variable declaration/definition theme used for
diff --git a/queue-2.6.30/block-restore-barrier-support-for-md-and-probably-other-virtual-devices.patch b/queue-2.6.30/block-restore-barrier-support-for-md-and-probably-other-virtual-devices.patch
new file mode 100644 (file)
index 0000000..4cd4d31
--- /dev/null
@@ -0,0 +1,55 @@
+From db64f680ba4b5c56c4be59f0698000df89ff0281 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Tue, 30 Jun 2009 09:35:44 +0200
+Subject: blocK: Restore barrier support for md and probably other virtual devices.
+
+From: NeilBrown <neilb@suse.de>
+
+commit db64f680ba4b5c56c4be59f0698000df89ff0281 upstream.
+
+The next_ordered flag is only meaningful for devices that use __make_request.
+So move the test against next_ordered out of generic code and in to
+__make_request
+
+Since this test was added, barriers have not worked on md or any
+devices that don't use __make_request and so don't bother to set
+next_ordered.  (dm explicitly sets something other than
+QUEUE_ORDERED_NONE since
+  commit 99360b4c18f7675b50d283301d46d755affe75fd
+but notes in the comments that it is otherwise meaningless).
+
+Cc: Ken Milmore <ken.milmore@googlemail.com>
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ block/blk-core.c |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/block/blk-core.c
++++ b/block/blk-core.c
+@@ -1158,6 +1158,11 @@ static int __make_request(struct request
+       nr_sectors = bio_sectors(bio);
++      if (bio_barrier(bio) && bio_has_data(bio) &&
++          (q->next_ordered == QUEUE_ORDERED_NONE)) {
++              bio_endio(bio, -EOPNOTSUPP);
++              return 0;
++      }
+       /*
+        * low level driver can indicate that it wants pages above a
+        * certain limit bounced to low memory (ie for highmem, or even
+@@ -1461,11 +1466,6 @@ static inline void __generic_make_reques
+                       err = -EOPNOTSUPP;
+                       goto end_io;
+               }
+-              if (bio_barrier(bio) && bio_has_data(bio) &&
+-                  (q->next_ordered == QUEUE_ORDERED_NONE)) {
+-                      err = -EOPNOTSUPP;
+-                      goto end_io;
+-              }
+               ret = q->make_request_fn(q, bio);
+       } while (ret);
diff --git a/queue-2.6.30/dma-debug-fix-off-by-one-error-in-overlap-function.patch b/queue-2.6.30/dma-debug-fix-off-by-one-error-in-overlap-function.patch
new file mode 100644 (file)
index 0000000..765efcc
--- /dev/null
@@ -0,0 +1,32 @@
+From c79ee4e466dd12347f112e2af306dca35198458f Mon Sep 17 00:00:00 2001
+From: Joerg Roedel <joerg.roedel@amd.com>
+Date: Tue, 16 Jun 2009 12:23:58 +0200
+Subject: dma-debug: fix off-by-one error in overlap function
+
+From: Joerg Roedel <joerg.roedel@amd.com>
+
+commit c79ee4e466dd12347f112e2af306dca35198458f upstream.
+
+This patch fixes a bug in the overlap function which returned true if
+one region ends exactly before the second region begins. This is no
+overlap but the function returned true in that case.
+
+Reported-by: Andrew Randrianasulu <randrik@mail.ru>
+Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ lib/dma-debug.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/dma-debug.c
++++ b/lib/dma-debug.c
+@@ -599,7 +599,7 @@ static inline bool overlap(void *addr, u
+       return ((addr >= start && addr < end) ||
+               (addr2 >= start && addr2 < end) ||
+-              ((addr < start) && (addr2 >= end)));
++              ((addr < start) && (addr2 > end)));
+ }
+ static void check_for_illegal_area(struct device *dev, void *addr, u64 size)
diff --git a/queue-2.6.30/fix-iommu-address-space-allocation.patch b/queue-2.6.30/fix-iommu-address-space-allocation.patch
new file mode 100644 (file)
index 0000000..5510202
--- /dev/null
@@ -0,0 +1,70 @@
+From a15a519ed6e5e644f5a33c213c00b0c1d3cfe683 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <dwmw2@infradead.org>
+Date: Wed, 1 Jul 2009 18:49:06 +0100
+Subject: Fix iommu address space allocation
+
+From: David Woodhouse <dwmw2@infradead.org>
+
+commit a15a519ed6e5e644f5a33c213c00b0c1d3cfe683 upstream.
+
+This fixes kernel.org bug #13584. The IOVA code attempted to optimise
+the insertion of new ranges into the rbtree, with the unfortunate result
+that some ranges just didn't get inserted into the tree at all. Then
+those ranges would be handed out more than once, and things kind of go
+downhill from there.
+
+Introduced after 2.6.25 by ddf02886cbe665d67ca750750196ea5bf524b10b
+("PCI: iova RB tree setup tweak").
+
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+Cc: mark gross <mgross@linux.intel.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/iova.c |   26 ++++++++++++++++++++++----
+ 1 file changed, 22 insertions(+), 4 deletions(-)
+
+--- a/drivers/pci/iova.c
++++ b/drivers/pci/iova.c
+@@ -1,9 +1,19 @@
+ /*
+- * Copyright (c) 2006, Intel Corporation.
++ * Copyright © 2006-2009, Intel Corporation.
+  *
+- * This file is released under the GPLv2.
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms and conditions of the GNU General Public License,
++ * version 2, as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
++ * more details.
++ *
++ * You should have received a copy of the GNU General Public License along with
++ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
++ * Place - Suite 330, Boston, MA 02111-1307 USA.
+  *
+- * Copyright (C) 2006-2008 Intel Corporation
+  * Author: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
+  */
+@@ -123,7 +133,15 @@ move_left:
+       /* Insert the new_iova into domain rbtree by holding writer lock */
+       /* Add new node and rebalance tree. */
+       {
+-              struct rb_node **entry = &((prev)), *parent = NULL;
++              struct rb_node **entry, *parent = NULL;
++
++              /* If we have 'prev', it's a valid place to start the
++                 insertion. Otherwise, start from the root. */
++              if (prev)
++                      entry = &prev;
++              else
++                      entry = &iovad->rbroot.rb_node;
++
+               /* Figure out where to put new node */
+               while (*entry) {
+                       struct iova *this = container_of(*entry,
diff --git a/queue-2.6.30/fix-pci_unmap_addr-et-al-on-i386.patch b/queue-2.6.30/fix-pci_unmap_addr-et-al-on-i386.patch
new file mode 100644 (file)
index 0000000..e9fba98
--- /dev/null
@@ -0,0 +1,37 @@
+From 788d84bba47ea3eb377f7a3ae4fd1ee84b84877b Mon Sep 17 00:00:00 2001
+From: David Woodhouse <dwmw2@infradead.org>
+Date: Wed, 1 Jul 2009 18:34:52 +0100
+Subject: Fix pci_unmap_addr() et al on i386.
+
+From: David Woodhouse <dwmw2@infradead.org>
+
+commit 788d84bba47ea3eb377f7a3ae4fd1ee84b84877b upstream.
+
+We can run a 32-bit kernel on boxes with an IOMMU, so we need
+pci_unmap_addr() etc. to work -- without it, drivers will leak mappings.
+
+To be honest, this whole thing looks like it's more pain than it's
+worth; I'm half inclined to remove the no-op #else case altogether.
+
+But this is the minimal fix, which just does the right thing if
+CONFIG_DMAR is set.
+
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/include/asm/pci.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/include/asm/pci.h
++++ b/arch/x86/include/asm/pci.h
+@@ -91,7 +91,7 @@ extern void pci_iommu_alloc(void);
+ #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
+-#if defined(CONFIG_X86_64) || defined(CONFIG_DMA_API_DEBUG)
++#if defined(CONFIG_X86_64) || defined(CONFIG_DMAR) || defined(CONFIG_DMA_API_DEBUG)
+ #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)       \
+               dma_addr_t ADDR_NAME;
diff --git a/queue-2.6.30/floppy-fix-lock-imbalance.patch b/queue-2.6.30/floppy-fix-lock-imbalance.patch
new file mode 100644 (file)
index 0000000..4170040
--- /dev/null
@@ -0,0 +1,37 @@
+From 8516a500029890a72622d245f8ed32c4e30969b7 Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jirislaby@gmail.com>
+Date: Tue, 30 Jun 2009 11:41:44 -0700
+Subject: floppy: fix lock imbalance
+
+From: Jiri Slaby <jirislaby@gmail.com>
+
+commit 8516a500029890a72622d245f8ed32c4e30969b7 upstream.
+
+A crappy macro prevents us unlocking on a fail path.
+
+Expand the macro and unlock appropriatelly.
+
+Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
+Cc: Jens Axboe <jens.axboe@oracle.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/block/floppy.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/block/floppy.c
++++ b/drivers/block/floppy.c
+@@ -3327,7 +3327,10 @@ static inline int set_geometry(unsigned 
+               if (!capable(CAP_SYS_ADMIN))
+                       return -EPERM;
+               mutex_lock(&open_lock);
+-              LOCK_FDC(drive, 1);
++              if (lock_fdc(drive, 1)) {
++                      mutex_unlock(&open_lock);
++                      return -EINTR;
++              }
+               floppy_type[type] = *g;
+               floppy_type[type].name = "user format";
+               for (cnt = type << 2; cnt < (type << 2) + 4; cnt++)
diff --git a/queue-2.6.30/fuse-fix-bad-return-value-in-fuse_file_poll.patch b/queue-2.6.30/fuse-fix-bad-return-value-in-fuse_file_poll.patch
new file mode 100644 (file)
index 0000000..3543883
--- /dev/null
@@ -0,0 +1,30 @@
+From 201fa69a2849536ef2912e8e971ec0b01c04eff4 Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <mszeredi@suse.cz>
+Date: Tue, 30 Jun 2009 20:06:24 +0200
+Subject: fuse: fix bad return value in fuse_file_poll()
+
+From: Miklos Szeredi <mszeredi@suse.cz>
+
+commit 201fa69a2849536ef2912e8e971ec0b01c04eff4 upstream.
+
+Fix fuse_file_poll() which returned a -errno value instead of a poll
+mask.
+
+Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/fuse/file.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/fuse/file.c
++++ b/fs/fuse/file.c
+@@ -1867,7 +1867,7 @@ static unsigned fuse_file_poll(struct fi
+       req = fuse_get_req(fc);
+       if (IS_ERR(req))
+-              return PTR_ERR(req);
++              return POLLERR;
+       req->in.h.opcode = FUSE_POLL;
+       req->in.h.nodeid = get_node_id(inode);
diff --git a/queue-2.6.30/fuse-fix-return-value-of-fuse_dev_write.patch b/queue-2.6.30/fuse-fix-return-value-of-fuse_dev_write.patch
new file mode 100644 (file)
index 0000000..a8259b3
--- /dev/null
@@ -0,0 +1,35 @@
+From b4c458b3a23d76936e76678f2074b1528f129f7a Mon Sep 17 00:00:00 2001
+From: Csaba Henk <csaba@gluster.com>
+Date: Mon, 29 Jun 2009 03:26:53 +0200
+Subject: fuse: fix return value of fuse_dev_write()
+
+From: Csaba Henk <csaba@gluster.com>
+
+commit b4c458b3a23d76936e76678f2074b1528f129f7a upstream.
+
+On 64 bit systems -- where sizeof(ssize_t) > sizeof(int) -- the following test
+exposes a bug due to a non-careful return of an int or unsigned value:
+
+implement a FUSE filesystem which sends an unsolicited notification to
+the kernel with invalid opcode. The respective write to /dev/fuse
+will return (1 << 32) - EINVAL with errno == 0 instead of -1 with
+errno == EINVAL.
+
+Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/fuse/dev.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/fuse/dev.c
++++ b/fs/fuse/dev.c
+@@ -904,7 +904,7 @@ static ssize_t fuse_dev_write(struct kio
+                              unsigned long nr_segs, loff_t pos)
+ {
+       int err;
+-      unsigned nbytes = iov_length(iov, nr_segs);
++      size_t nbytes = iov_length(iov, nr_segs);
+       struct fuse_req *req;
+       struct fuse_out_header oh;
+       struct fuse_copy_state cs;
diff --git a/queue-2.6.30/kernel-resource.c-fix-sign-extension-in-reserve_setup.patch b/queue-2.6.30/kernel-resource.c-fix-sign-extension-in-reserve_setup.patch
new file mode 100644 (file)
index 0000000..1a6d093
--- /dev/null
@@ -0,0 +1,40 @@
+From 8bc1ad7dd301b7ca7454013519fa92e8c53655ff Mon Sep 17 00:00:00 2001
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Tue, 30 Jun 2009 11:41:31 -0700
+Subject: kernel/resource.c: fix sign extension in reserve_setup()
+
+From: Zhang Rui <rui.zhang@intel.com>
+
+commit 8bc1ad7dd301b7ca7454013519fa92e8c53655ff upstream.
+
+When the 32-bit signed quantities get assigned to the u64 resource_size_t,
+they are incorrectly sign-extended.
+
+Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13253
+Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9905
+
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Reported-by: Leann Ogasawara <leann@ubuntu.com>
+Cc: Pierre Ossman <drzeus@drzeus.cx>
+Reported-by: <pablomme@googlemail.com>
+Tested-by: <pablomme@googlemail.com>
+Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/resource.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/resource.c
++++ b/kernel/resource.c
+@@ -787,7 +787,7 @@ static int __init reserve_setup(char *st
+       static struct resource reserve[MAXRESERVE];
+       for (;;) {
+-              int io_start, io_num;
++              unsigned int io_start, io_num;
+               int x = reserved;
+               if (get_option (&str, &io_start) != 2)
diff --git a/queue-2.6.30/md-avoid-dereferencing-null-pointer-when-accessing-suspend_-sysfs-attributes.patch b/queue-2.6.30/md-avoid-dereferencing-null-pointer-when-accessing-suspend_-sysfs-attributes.patch
new file mode 100644 (file)
index 0000000..3911434
--- /dev/null
@@ -0,0 +1,43 @@
+From b8d966efd9a46a9a35beac50cbff6e30565125ef Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Wed, 1 Jul 2009 11:14:04 +1000
+Subject: md: avoid dereferencing NULL pointer when accessing suspend_* sysfs attributes.
+
+From: NeilBrown <neilb@suse.de>
+
+commit b8d966efd9a46a9a35beac50cbff6e30565125ef upstream.
+
+If we try to modify one of the md/ sysfs files
+  suspend_lo or suspend_hi
+when the array is not active, we dereference a NULL.
+Protect against that.
+
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/md/md.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -3589,7 +3589,8 @@ suspend_lo_store(mddev_t *mddev, const c
+       char *e;
+       unsigned long long new = simple_strtoull(buf, &e, 10);
+-      if (mddev->pers->quiesce == NULL)
++      if (mddev->pers == NULL ||
++          mddev->pers->quiesce == NULL)
+               return -EINVAL;
+       if (buf == e || (*e && *e != '\n'))
+               return -EINVAL;
+@@ -3617,7 +3618,8 @@ suspend_hi_store(mddev_t *mddev, const c
+       char *e;
+       unsigned long long new = simple_strtoull(buf, &e, 10);
+-      if (mddev->pers->quiesce == NULL)
++      if (mddev->pers == NULL ||
++          mddev->pers->quiesce == NULL)
+               return -EINVAL;
+       if (buf == e || (*e && *e != '\n'))
+               return -EINVAL;
diff --git a/queue-2.6.30/md-fix-error-path-when-duplicate-name-is-found-on-md-device-creation.patch b/queue-2.6.30/md-fix-error-path-when-duplicate-name-is-found-on-md-device-creation.patch
new file mode 100644 (file)
index 0000000..8c1ba63
--- /dev/null
@@ -0,0 +1,34 @@
+From 1ec22eb2b4a2e1a763106bce36b11c02eaa84e61 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Wed, 1 Jul 2009 12:27:21 +1000
+Subject: md: fix error path when duplicate name is found on md device creation.
+
+From: NeilBrown <neilb@suse.de>
+
+commit 1ec22eb2b4a2e1a763106bce36b11c02eaa84e61 upstream.
+
+When an md device is created by name (rather than number) we need to
+check that the name is not already in use.  If this check finds a
+duplicate, we return an error without dropping the lock or freeing
+the newly create mddev.
+This patch fixes that.
+
+Found-by: Jiri Slaby <jirislaby@gmail.com>
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/md/md.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -3876,6 +3876,8 @@ static int md_alloc(dev_t dev, char *nam
+                       if (mddev2->gendisk &&
+                           strcmp(mddev2->gendisk->disk_name, name) == 0) {
+                               spin_unlock(&all_mddevs_lock);
++                              mutex_unlock(&disks_mutex);
++                              mddev_put(mddev);
+                               return -EEXIST;
+                       }
+               spin_unlock(&all_mddevs_lock);
diff --git a/queue-2.6.30/md-raid5-suspend-shouldn-t-affect-read-requests.patch b/queue-2.6.30/md-raid5-suspend-shouldn-t-affect-read-requests.patch
new file mode 100644 (file)
index 0000000..0520661
--- /dev/null
@@ -0,0 +1,29 @@
+From a5c308d4d1659b1f4833b863394e3e24cdbdfc6e Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Wed, 1 Jul 2009 13:15:35 +1000
+Subject: md/raid5: suspend shouldn't affect read requests.
+
+From: NeilBrown <neilb@suse.de>
+
+commit a5c308d4d1659b1f4833b863394e3e24cdbdfc6e upstream.
+
+md allows write to regions on an array to be suspended temporarily.
+This allows user-space to participate is aspects of reshape.
+In particular, data can be copied with not risk of a race.
+We should not be blocking read requests though, so don't.
+
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+--- a/drivers/md/raid5.c
++++ b/drivers/md/raid5.c
+@@ -3702,7 +3702,8 @@ static int make_request(struct request_queue *q, struct bio * bi)
+                       /* FIXME what if we get a false positive because these
+                        * are being updated.
+                        */
+-                      if (logical_sector >= mddev->suspend_lo &&
++                      if (bio_data_dir(bi) == WRITE &&
++                          logical_sector >= mddev->suspend_lo &&
+                           logical_sector < mddev->suspend_hi) {
+                               release_stripe(sh);
+                               schedule();
diff --git a/queue-2.6.30/revert-ipv4-arp-announce-arp_proxy-and-windows-ip-conflict-verification.patch b/queue-2.6.30/revert-ipv4-arp-announce-arp_proxy-and-windows-ip-conflict-verification.patch
new file mode 100644 (file)
index 0000000..83327b1
--- /dev/null
@@ -0,0 +1,47 @@
+From f8a68e752bc4e39644843403168137663c984524 Mon Sep 17 00:00:00 2001
+From: Eric W. Biederman <ebiederm@xmission.com>
+Date: Tue, 30 Jun 2009 16:27:17 +0000
+Subject: Revert "ipv4: arp announce, arp_proxy and windows ip conflict verification"
+
+From: Eric W. Biederman <ebiederm@xmission.com>
+
+commit f8a68e752bc4e39644843403168137663c984524 upstream.
+
+This reverts commit 73ce7b01b4496a5fbf9caf63033c874be692333f.
+
+After discovering that we don't listen to gratuitious arps in 2.6.30
+I tracked the failure down to this commit.
+
+The patch makes absolutely no sense.  RFC2131 RFC3927 and RFC5227.
+are all in agreement that an arp request with sip == 0 should be used
+for the probe (to prevent learning) and an arp request with sip == tip
+should be used for the gratitous announcement that people can learn
+from.
+
+It appears the author of the broken patch got those two cases confused
+and modified the code to drop all gratuitous arp traffic.  Ouch!
+
+Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv4/arp.c |    7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/net/ipv4/arp.c
++++ b/net/ipv4/arp.c
+@@ -801,11 +801,8 @@ static int arp_process(struct sk_buff *s
+  *  cache.
+  */
+-      /*
+-       *  Special case: IPv4 duplicate address detection packet (RFC2131)
+-       *  and Gratuitous ARP/ARP Announce. (RFC3927, Section 2.4)
+-       */
+-      if (sip == 0 || tip == sip) {
++      /* Special case: IPv4 duplicate address detection packet (RFC2131) */
++      if (sip == 0) {
+               if (arp->ar_op == htons(ARPOP_REQUEST) &&
+                   inet_addr_type(net, tip) == RTN_LOCAL &&
+                   !arp_ignore(in_dev, sip, tip))
index c4691432df746e5357e0ab9060abb076e860d0f4..68c8669900d7eaf6382b5a9f89542a6b36d9f130 100644 (file)
@@ -8,3 +8,16 @@ blackfin-fix-deadlock-in-smp-ipi-handler.patch
 blackfin-fix-command-line-corruption-with-debug_doublefault.patch
 futex-fix-the-write-access-fault-problem-for-real.patch
 futexes-fix-infinite-loop-in-get_futex_key-on-huge-page.patch
+kernel-resource.c-fix-sign-extension-in-reserve_setup.patch
+alpha-fix-percpu-build-breakage.patch
+dma-debug-fix-off-by-one-error-in-overlap-function.patch
+block-restore-barrier-support-for-md-and-probably-other-virtual-devices.patch
+md-raid5-suspend-shouldn-t-affect-read-requests.patch
+md-fix-error-path-when-duplicate-name-is-found-on-md-device-creation.patch
+md-avoid-dereferencing-null-pointer-when-accessing-suspend_-sysfs-attributes.patch
+revert-ipv4-arp-announce-arp_proxy-and-windows-ip-conflict-verification.patch
+floppy-fix-lock-imbalance.patch
+fix-pci_unmap_addr-et-al-on-i386.patch
+fix-iommu-address-space-allocation.patch
+fuse-fix-bad-return-value-in-fuse_file_poll.patch
+fuse-fix-return-value-of-fuse_dev_write.patch