From 22f6d6f16cf2d7cdd6eb54b4eb05722ce2a66032 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 30 Sep 2009 15:50:21 -0700 Subject: [PATCH] start .30 queue --- ...acpi-pci_slot.ko-wants-a-64-bit-_sun.patch | 45 ++++++++++++++++ ...erly-seen-before-unlocking-new-inode.patch | 51 ++++++++++++++++++ ...segfault-in-prefix_underscores_count.patch | 52 +++++++++++++++++++ ...l-initialization-of-btree-node-cache.patch | 47 +++++++++++++++++ .../p54usb-add-zcomax-xg-705a-usbid.patch | 30 +++++++++++ queue-2.6.30/re-enable-lanman-security.patch | 36 +++++++++++++ queue-2.6.30/series | 6 +++ 7 files changed, 267 insertions(+) create mode 100644 queue-2.6.30/acpi-pci_slot.ko-wants-a-64-bit-_sun.patch create mode 100644 queue-2.6.30/fs-make-sure-data-stored-into-inode-is-properly-seen-before-unlocking-new-inode.patch create mode 100644 queue-2.6.30/kallsyms-fix-segfault-in-prefix_underscores_count.patch create mode 100644 queue-2.6.30/nilfs2-fix-missing-zero-fill-initialization-of-btree-node-cache.patch create mode 100644 queue-2.6.30/p54usb-add-zcomax-xg-705a-usbid.patch create mode 100644 queue-2.6.30/re-enable-lanman-security.patch create mode 100644 queue-2.6.30/series diff --git a/queue-2.6.30/acpi-pci_slot.ko-wants-a-64-bit-_sun.patch b/queue-2.6.30/acpi-pci_slot.ko-wants-a-64-bit-_sun.patch new file mode 100644 index 00000000000..19a3509efb6 --- /dev/null +++ b/queue-2.6.30/acpi-pci_slot.ko-wants-a-64-bit-_sun.patch @@ -0,0 +1,45 @@ +From 7e24bc1ce669b2876ffa475ea1147f2bb9ffdc52 Mon Sep 17 00:00:00 2001 +From: Alex Chiang +Date: Tue, 4 Aug 2009 14:44:17 -0600 +Subject: ACPI: pci_slot.ko wants a 64-bit _SUN + +From: Alex Chiang + +commit 7e24bc1ce669b2876ffa475ea1147f2bb9ffdc52 upstream. + +Similar to commit b6adc195 (PCI hotplug: acpiphp wants a 64-bit +_SUN), pci_slot.ko reads and creates sysfs directories based on +the _SUN method. + +Certain HP platforms return 64 bits in _SUN. This change to +pci_slot.ko allows us to see the correct sysfs directories. + +Reported-by: Chad Smith +Signed-off-by: Alex Chiang +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/pci_slot.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/acpi/pci_slot.c ++++ b/drivers/acpi/pci_slot.c +@@ -57,7 +57,7 @@ ACPI_MODULE_NAME("pci_slot"); + MY_NAME , ## arg); \ + } while (0) + +-#define SLOT_NAME_SIZE 20 /* Inspired by #define in acpiphp.h */ ++#define SLOT_NAME_SIZE 21 /* Inspired by #define in acpiphp.h */ + + struct acpi_pci_slot { + acpi_handle root_handle; /* handle of the root bridge */ +@@ -149,7 +149,7 @@ register_slot(acpi_handle handle, u32 lv + return AE_OK; + } + +- snprintf(name, sizeof(name), "%u", (u32)sun); ++ snprintf(name, sizeof(name), "%llu", sun); + pci_slot = pci_create_slot(pci_bus, device, name, NULL); + if (IS_ERR(pci_slot)) { + err("pci_create_slot returned %ld\n", PTR_ERR(pci_slot)); diff --git a/queue-2.6.30/fs-make-sure-data-stored-into-inode-is-properly-seen-before-unlocking-new-inode.patch b/queue-2.6.30/fs-make-sure-data-stored-into-inode-is-properly-seen-before-unlocking-new-inode.patch new file mode 100644 index 00000000000..6a5ce6e9e87 --- /dev/null +++ b/queue-2.6.30/fs-make-sure-data-stored-into-inode-is-properly-seen-before-unlocking-new-inode.patch @@ -0,0 +1,51 @@ +From 580be0837a7a59b207c3d5c661d044d8dd0a6a30 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Mon, 21 Sep 2009 17:01:06 -0700 +Subject: fs: make sure data stored into inode is properly seen before unlocking new inode + +From: Jan Kara + +commit 580be0837a7a59b207c3d5c661d044d8dd0a6a30 upstream. + +In theory it could happen that on one CPU we initialize a new inode but +clearing of I_NEW | I_LOCK gets reordered before some of the +initialization. Thus on another CPU we return not fully uptodate inode +from iget_locked(). + +This seems to fix a corruption issue on ext3 mounted over NFS. + +[akpm@linux-foundation.org: add some commentary] +Signed-off-by: Jan Kara +Cc: Christoph Hellwig +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/inode.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +--- a/fs/inode.c ++++ b/fs/inode.c +@@ -672,13 +672,15 @@ void unlock_new_inode(struct inode *inod + } + #endif + /* +- * This is special! We do not need the spinlock +- * when clearing I_LOCK, because we're guaranteed +- * that nobody else tries to do anything about the +- * state of the inode when it is locked, as we +- * just created it (so there can be no old holders +- * that haven't tested I_LOCK). ++ * This is special! We do not need the spinlock when clearing I_LOCK, ++ * because we're guaranteed that nobody else tries to do anything about ++ * the state of the inode when it is locked, as we just created it (so ++ * there can be no old holders that haven't tested I_LOCK). ++ * However we must emit the memory barrier so that other CPUs reliably ++ * see the clearing of I_LOCK after the other inode initialisation has ++ * completed. + */ ++ smp_mb(); + WARN_ON((inode->i_state & (I_LOCK|I_NEW)) != (I_LOCK|I_NEW)); + inode->i_state &= ~(I_LOCK|I_NEW); + wake_up_inode(inode); diff --git a/queue-2.6.30/kallsyms-fix-segfault-in-prefix_underscores_count.patch b/queue-2.6.30/kallsyms-fix-segfault-in-prefix_underscores_count.patch new file mode 100644 index 00000000000..ef7a703d07f --- /dev/null +++ b/queue-2.6.30/kallsyms-fix-segfault-in-prefix_underscores_count.patch @@ -0,0 +1,52 @@ +From a9ece53c4089ef23d4002d34c4c7148d94622a40 Mon Sep 17 00:00:00 2001 +From: Paul Mundt +Date: Tue, 22 Sep 2009 16:44:12 -0700 +Subject: kallsyms: fix segfault in prefix_underscores_count() + +From: Paul Mundt + +commit a9ece53c4089ef23d4002d34c4c7148d94622a40 upstream. + +Commit b478b782e110fdb4135caa3062b6d687e989d994 "kallsyms, tracing: output +more proper symbol name" introduces a "bugfix" that introduces a segfault +in kallsyms in my configurations. + +The cause is the introduction of prefix_underscores_count() which attempts +to count underscores, even in symbols that do not have them. As a result, +it just uselessly runs past the end of the buffer until it crashes: + + CC init/version.o + LD init/built-in.o + LD .tmp_vmlinux1 + KSYM .tmp_kallsyms1.S +/bin/sh: line 1: 16934 Done sh-linux-gnu-nm -n .tmp_vmlinux1 + 16935 Segmentation fault | scripts/kallsyms > .tmp_kallsyms1.S +make: *** [.tmp_kallsyms1.S] Error 139 + +This simplifies the logic and just does a straightforward count. + +Signed-off-by: Paul Mundt +Reviewed-by: Li Zefan +Cc: Lai Jiangshan +Cc: Sam Ravnborg +Cc: Paulo Marques +Cc: Ingo Molnar +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + scripts/kallsyms.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/kallsyms.c ++++ b/scripts/kallsyms.c +@@ -539,7 +539,7 @@ static int prefix_underscores_count(cons + { + const char *tail = str; + +- while (*tail != '_') ++ while (*tail == '_') + tail++; + + return tail - str; diff --git a/queue-2.6.30/nilfs2-fix-missing-zero-fill-initialization-of-btree-node-cache.patch b/queue-2.6.30/nilfs2-fix-missing-zero-fill-initialization-of-btree-node-cache.patch new file mode 100644 index 00000000000..3ce87d5fcfa --- /dev/null +++ b/queue-2.6.30/nilfs2-fix-missing-zero-fill-initialization-of-btree-node-cache.patch @@ -0,0 +1,47 @@ +From 1f28fcd925b2b3157411bbd08f0024b55b70d8dd Mon Sep 17 00:00:00 2001 +From: Ryusuke Konishi +Date: Mon, 28 Sep 2009 01:46:11 +0900 +Subject: nilfs2: fix missing zero-fill initialization of btree node cache + +From: Ryusuke Konishi + +commit 1f28fcd925b2b3157411bbd08f0024b55b70d8dd upstream. + +This will fix file system corruption which infrequently happens after +mount. The problem was reported from users with the title "[NILFS +users] Fail to mount NILFS." (Message-ID: +<200908211918.34720.yuri@itinteg.net>), and so forth. I've also +experienced the corruption multiple times on kernel 2.6.30 and 2.6.31. + +The problem turned out to be caused due to discordance between +mapping->nrpages of a btree node cache and the actual number of pages +hung on the cache; if the mapping->nrpages becomes zero even as it has +pages, truncate_inode_pages() returns without doing anything. Usually +this is harmless except it may cause page leak, but garbage collection +fairly infrequently sees a stale page remained in the btree node cache +of DAT (i.e. disk address translation file of nilfs), and induces the +corruption. + +I identified a missing initialization in btree node caches was the +root cause. This corrects the bug. + +I've tested this for kernel 2.6.30 and 2.6.31. + +Reported-by: Yuri Chislov +Signed-off-by: Ryusuke Konishi +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nilfs2/btnode.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/nilfs2/btnode.c ++++ b/fs/nilfs2/btnode.c +@@ -36,6 +36,7 @@ + + void nilfs_btnode_cache_init_once(struct address_space *btnc) + { ++ memset(btnc, 0, sizeof(*btnc)); + INIT_RADIX_TREE(&btnc->page_tree, GFP_ATOMIC); + spin_lock_init(&btnc->tree_lock); + INIT_LIST_HEAD(&btnc->private_list); diff --git a/queue-2.6.30/p54usb-add-zcomax-xg-705a-usbid.patch b/queue-2.6.30/p54usb-add-zcomax-xg-705a-usbid.patch new file mode 100644 index 00000000000..1884c1591e1 --- /dev/null +++ b/queue-2.6.30/p54usb-add-zcomax-xg-705a-usbid.patch @@ -0,0 +1,30 @@ +From f7f71173ea69d4dabf166533beffa9294090b7ef Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Mon, 14 Sep 2009 23:08:43 +0200 +Subject: p54usb: add Zcomax XG-705A usbid + +From: Christian Lamparter + +commit f7f71173ea69d4dabf166533beffa9294090b7ef upstream. + +This patch adds a new usbid for Zcomax XG-705A to the device table. + +Reported-by: Jari Jaakola +Signed-off-by: Christian Lamparter +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/p54/p54usb.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/p54/p54usb.c ++++ b/drivers/net/wireless/p54/p54usb.c +@@ -66,6 +66,7 @@ static struct usb_device_id p54u_table[] + {USB_DEVICE(0x0bf8, 0x1009)}, /* FUJITSU E-5400 USB D1700*/ + {USB_DEVICE(0x0cde, 0x0006)}, /* Medion MD40900 */ + {USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */ ++ {USB_DEVICE(0x0cde, 0x0015)}, /* Zcomax XG-705A */ + {USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */ + {USB_DEVICE(0x124a, 0x4025)}, /* IOGear GWU513 (GW3887IK chip) */ + {USB_DEVICE(0x1260, 0xee22)}, /* SMC 2862W-G version 2 */ diff --git a/queue-2.6.30/re-enable-lanman-security.patch b/queue-2.6.30/re-enable-lanman-security.patch new file mode 100644 index 00000000000..3b2441fe014 --- /dev/null +++ b/queue-2.6.30/re-enable-lanman-security.patch @@ -0,0 +1,36 @@ +From 20d1752f3d6bd32beb90949559e0d14a0b234445 Mon Sep 17 00:00:00 2001 +From: Chuck Ebbert +Date: Tue, 15 Sep 2009 01:53:21 -0400 +Subject: [CIFS] Re-enable Lanman security + +From: Chuck Ebbert + +commit 20d1752f3d6bd32beb90949559e0d14a0b234445 upstream. + +commit ac68392460ffefed13020967bae04edc4d3add06 ("[CIFS] Allow raw +ntlmssp code to be enabled with sec=ntlmssp") added a new bit to the +allowed security flags mask but seems to have inadvertently removed +Lanman security from the allowed flags. Add it back. + +Signed-off-by: Chuck Ebbert +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman + +--- + fs/cifs/cifsglob.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/fs/cifs/cifsglob.h ++++ b/fs/cifs/cifsglob.h +@@ -544,9 +544,9 @@ require use of the stronger protocol */ + #define CIFSSEC_MUST_LANMAN 0x10010 + #define CIFSSEC_MUST_PLNTXT 0x20020 + #ifdef CONFIG_CIFS_UPCALL +-#define CIFSSEC_MASK 0xAF0AF /* allows weak security but also krb5 */ ++#define CIFSSEC_MASK 0xBF0BF /* allows weak security but also krb5 */ + #else +-#define CIFSSEC_MASK 0xA70A7 /* current flags supported if weak */ ++#define CIFSSEC_MASK 0xB70B7 /* current flags supported if weak */ + #endif /* UPCALL */ + #else /* do not allow weak pw hash */ + #ifdef CONFIG_CIFS_UPCALL diff --git a/queue-2.6.30/series b/queue-2.6.30/series new file mode 100644 index 00000000000..6e69e3de086 --- /dev/null +++ b/queue-2.6.30/series @@ -0,0 +1,6 @@ +acpi-pci_slot.ko-wants-a-64-bit-_sun.patch +fs-make-sure-data-stored-into-inode-is-properly-seen-before-unlocking-new-inode.patch +kallsyms-fix-segfault-in-prefix_underscores_count.patch +nilfs2-fix-missing-zero-fill-initialization-of-btree-node-cache.patch +p54usb-add-zcomax-xg-705a-usbid.patch +re-enable-lanman-security.patch -- 2.47.3