From 1f2a073c94f4f01302ceafa229bc9a3db79f9daa Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 17 Jul 2009 12:46:02 -0700 Subject: [PATCH] more .30 patches --- .../alpha-fix-percpu-build-breakage.patch | 92 +++++++++++++++++++ ...d-and-probably-other-virtual-devices.patch | 55 +++++++++++ ...off-by-one-error-in-overlap-function.patch | 32 +++++++ .../fix-iommu-address-space-allocation.patch | 70 ++++++++++++++ .../fix-pci_unmap_addr-et-al-on-i386.patch | 37 ++++++++ queue-2.6.30/floppy-fix-lock-imbalance.patch | 37 ++++++++ ...x-bad-return-value-in-fuse_file_poll.patch | 30 ++++++ ...e-fix-return-value-of-fuse_dev_write.patch | 35 +++++++ ...-fix-sign-extension-in-reserve_setup.patch | 40 ++++++++ ...-accessing-suspend_-sysfs-attributes.patch | 43 +++++++++ ...-name-is-found-on-md-device-creation.patch | 34 +++++++ ...spend-shouldn-t-affect-read-requests.patch | 29 ++++++ ...and-windows-ip-conflict-verification.patch | 47 ++++++++++ queue-2.6.30/series | 13 +++ 14 files changed, 594 insertions(+) create mode 100644 queue-2.6.30/alpha-fix-percpu-build-breakage.patch create mode 100644 queue-2.6.30/block-restore-barrier-support-for-md-and-probably-other-virtual-devices.patch create mode 100644 queue-2.6.30/dma-debug-fix-off-by-one-error-in-overlap-function.patch create mode 100644 queue-2.6.30/fix-iommu-address-space-allocation.patch create mode 100644 queue-2.6.30/fix-pci_unmap_addr-et-al-on-i386.patch create mode 100644 queue-2.6.30/floppy-fix-lock-imbalance.patch create mode 100644 queue-2.6.30/fuse-fix-bad-return-value-in-fuse_file_poll.patch create mode 100644 queue-2.6.30/fuse-fix-return-value-of-fuse_dev_write.patch create mode 100644 queue-2.6.30/kernel-resource.c-fix-sign-extension-in-reserve_setup.patch create mode 100644 queue-2.6.30/md-avoid-dereferencing-null-pointer-when-accessing-suspend_-sysfs-attributes.patch create mode 100644 queue-2.6.30/md-fix-error-path-when-duplicate-name-is-found-on-md-device-creation.patch create mode 100644 queue-2.6.30/md-raid5-suspend-shouldn-t-affect-read-requests.patch create mode 100644 queue-2.6.30/revert-ipv4-arp-announce-arp_proxy-and-windows-ip-conflict-verification.patch 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 index 00000000000..debb375d1c4 --- /dev/null +++ b/queue-2.6.30/alpha-fix-percpu-build-breakage.patch @@ -0,0 +1,92 @@ +From b01e8dc34379f4ba2f454390e340a025edbaaa7e Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Tue, 30 Jun 2009 11:41:18 -0700 +Subject: alpha: fix percpu build breakage + +From: Tejun Heo + +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 +Tested-by: maximilian attems +Acked-by: Ivan Kokshaysky +Cc: Richard Henderson +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..4cd4d314d8c --- /dev/null +++ b/queue-2.6.30/block-restore-barrier-support-for-md-and-probably-other-virtual-devices.patch @@ -0,0 +1,55 @@ +From db64f680ba4b5c56c4be59f0698000df89ff0281 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Tue, 30 Jun 2009 09:35:44 +0200 +Subject: blocK: Restore barrier support for md and probably other virtual devices. + +From: NeilBrown + +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 +Signed-off-by: NeilBrown +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..765efcc169a --- /dev/null +++ b/queue-2.6.30/dma-debug-fix-off-by-one-error-in-overlap-function.patch @@ -0,0 +1,32 @@ +From c79ee4e466dd12347f112e2af306dca35198458f Mon Sep 17 00:00:00 2001 +From: Joerg Roedel +Date: Tue, 16 Jun 2009 12:23:58 +0200 +Subject: dma-debug: fix off-by-one error in overlap function + +From: Joerg Roedel + +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 +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..5510202806c --- /dev/null +++ b/queue-2.6.30/fix-iommu-address-space-allocation.patch @@ -0,0 +1,70 @@ +From a15a519ed6e5e644f5a33c213c00b0c1d3cfe683 Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Wed, 1 Jul 2009 18:49:06 +0100 +Subject: Fix iommu address space allocation + +From: David Woodhouse + +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 +Cc: mark gross +Cc: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + 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 + */ + +@@ -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 index 00000000000..e9fba98df64 --- /dev/null +++ b/queue-2.6.30/fix-pci_unmap_addr-et-al-on-i386.patch @@ -0,0 +1,37 @@ +From 788d84bba47ea3eb377f7a3ae4fd1ee84b84877b Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Wed, 1 Jul 2009 18:34:52 +0100 +Subject: Fix pci_unmap_addr() et al on i386. + +From: David Woodhouse + +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 +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..4170040c66c --- /dev/null +++ b/queue-2.6.30/floppy-fix-lock-imbalance.patch @@ -0,0 +1,37 @@ +From 8516a500029890a72622d245f8ed32c4e30969b7 Mon Sep 17 00:00:00 2001 +From: Jiri Slaby +Date: Tue, 30 Jun 2009 11:41:44 -0700 +Subject: floppy: fix lock imbalance + +From: Jiri Slaby + +commit 8516a500029890a72622d245f8ed32c4e30969b7 upstream. + +A crappy macro prevents us unlocking on a fail path. + +Expand the macro and unlock appropriatelly. + +Signed-off-by: Jiri Slaby +Cc: Jens Axboe +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..35438838693 --- /dev/null +++ b/queue-2.6.30/fuse-fix-bad-return-value-in-fuse_file_poll.patch @@ -0,0 +1,30 @@ +From 201fa69a2849536ef2912e8e971ec0b01c04eff4 Mon Sep 17 00:00:00 2001 +From: Miklos Szeredi +Date: Tue, 30 Jun 2009 20:06:24 +0200 +Subject: fuse: fix bad return value in fuse_file_poll() + +From: Miklos Szeredi + +commit 201fa69a2849536ef2912e8e971ec0b01c04eff4 upstream. + +Fix fuse_file_poll() which returned a -errno value instead of a poll +mask. + +Signed-off-by: Miklos Szeredi +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..a8259b35cf8 --- /dev/null +++ b/queue-2.6.30/fuse-fix-return-value-of-fuse_dev_write.patch @@ -0,0 +1,35 @@ +From b4c458b3a23d76936e76678f2074b1528f129f7a Mon Sep 17 00:00:00 2001 +From: Csaba Henk +Date: Mon, 29 Jun 2009 03:26:53 +0200 +Subject: fuse: fix return value of fuse_dev_write() + +From: Csaba Henk + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..1a6d0936867 --- /dev/null +++ b/queue-2.6.30/kernel-resource.c-fix-sign-extension-in-reserve_setup.patch @@ -0,0 +1,40 @@ +From 8bc1ad7dd301b7ca7454013519fa92e8c53655ff Mon Sep 17 00:00:00 2001 +From: Zhang Rui +Date: Tue, 30 Jun 2009 11:41:31 -0700 +Subject: kernel/resource.c: fix sign extension in reserve_setup() + +From: Zhang Rui + +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 +Reported-by: Leann Ogasawara +Cc: Pierre Ossman +Reported-by: +Tested-by: +Cc: Jesse Barnes +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..3911434dbe7 --- /dev/null +++ b/queue-2.6.30/md-avoid-dereferencing-null-pointer-when-accessing-suspend_-sysfs-attributes.patch @@ -0,0 +1,43 @@ +From b8d966efd9a46a9a35beac50cbff6e30565125ef Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Wed, 1 Jul 2009 11:14:04 +1000 +Subject: md: avoid dereferencing NULL pointer when accessing suspend_* sysfs attributes. + +From: NeilBrown + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..8c1ba63a795 --- /dev/null +++ b/queue-2.6.30/md-fix-error-path-when-duplicate-name-is-found-on-md-device-creation.patch @@ -0,0 +1,34 @@ +From 1ec22eb2b4a2e1a763106bce36b11c02eaa84e61 Mon Sep 17 00:00:00 2001 +From: NeilBrown +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 + +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 +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..0520661b3f6 --- /dev/null +++ b/queue-2.6.30/md-raid5-suspend-shouldn-t-affect-read-requests.patch @@ -0,0 +1,29 @@ +From a5c308d4d1659b1f4833b863394e3e24cdbdfc6e Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Wed, 1 Jul 2009 13:15:35 +1000 +Subject: md/raid5: suspend shouldn't affect read requests. + +From: NeilBrown + +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 +Signed-off-by: Greg Kroah-Hartman + +--- 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 index 00000000000..83327b17fb9 --- /dev/null +++ b/queue-2.6.30/revert-ipv4-arp-announce-arp_proxy-and-windows-ip-conflict-verification.patch @@ -0,0 +1,47 @@ +From f8a68e752bc4e39644843403168137663c984524 Mon Sep 17 00:00:00 2001 +From: Eric W. Biederman +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 + +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 +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + 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)) diff --git a/queue-2.6.30/series b/queue-2.6.30/series index c4691432df7..68c8669900d 100644 --- a/queue-2.6.30/series +++ b/queue-2.6.30/series @@ -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 -- 2.47.2