r3414 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches patches/series
Simon Horman
horms@costa.debian.org
Thu, 30 Jun 2005 10:20:55 +0000
Author: horms
Date: 2005-06-30 10:20:53 +0000 (Thu, 30 Jun 2005)
New Revision: 3414
Added:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/asm-i386-mem-clobber.dpatch
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-acpi-pci_irq-elcr.dpatch
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-netlink-autobind-return.dpatch
Modified:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-1.dpatch
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-17
Log:
* asm-i386-mem-clobber.dpatch:
Make sure gcc doesn't reorder memory accesses in strncmp and friends on
i386.
* drivers-acpi-pci_irq-elcr.dpatch:
Make sure we call acpi_register_gsi() even for default PCI interrupt
assignment. That's the part that keeps track of the ELCR register, and we
want to make sure that the PCI interrupts are properly marked level/low.
* asm-i386-mem-clobber.dpatch:
Make sure netlink_autobind() propagates the error return from
netlink_insert(). Otherwise, callers will not see the error as they
should and thus try to operate on a socket with a zero pid, which is very
bad.
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2005-06-30 07:39:16 UTC (rev 3413)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog 2005-06-30 10:20:53 UTC (rev 3414)
@@ -109,10 +109,30 @@
(Simon Horman)
* net-ipv4-ipvs-conn_tab-race.dpatch
- Fix race condition on p_vs_conn_tab list modification
+ Fix race condition on ip_vs_conn_tab list modification
+ (Simon Horman)
- -- Simon Horman <horms@debian.org> Thu, 30 Jun 2005 16:35:19 +0900
+ * asm-i386-mem-clobber.dpatch:
+ Make sure gcc doesn't reorder memory accesses in strncmp and friends on
+ i386.
+ (Simon Horman)
+ * drivers-acpi-pci_irq-elcr.dpatch:
+ Make sure we call acpi_register_gsi() even for default PCI interrupt
+ assignment. That's the part that keeps track of the ELCR register, and we
+ want to make sure that the PCI interrupts are properly marked level/low.
+ (Simon Horman)
+
+ * asm-i386-mem-clobber.dpatch:
+ Make sure netlink_autobind() propagates the error return from
+ netlink_insert(). Otherwise, callers will not see the error as they
+ should and thus try to operate on a socket with a zero pid, which is very
+ bad.
+ (Simon Horman)
+
+
+ -- Simon Horman <horms@debian.org> Thu, 30 Jun 2005 17:58:38 +0900
+
kernel-source-2.6.8 (2.6.8-16) unstable; urgency=low
* smbfs-overrun.dpatch:
Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/asm-i386-mem-clobber.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/asm-i386-mem-clobber.dpatch 2005-06-30 07:39:16 UTC (rev 3413)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/asm-i386-mem-clobber.dpatch 2005-06-30 10:20:53 UTC (rev 3414)
@@ -0,0 +1,126 @@
+commit 2e8e121926ee6d15151c8e57ddce97275213c5b2
+tree 7a89595c5fe151cf3b431028e044b847de7e9d3a
+parent 26b1062c23e46c111f5e86bc8ce4d5007805b51a
+author Linus Torvalds <torvalds@ppc970.osdl.org> 1119654084 -0700
+committer Chris Wright <chrisw@osdl.org> 1120086038 -0700
+
+[PATCH] Add "memory" clobbers to the x86 inline asm of strncmp and friends
+
+Add "memory" clobbers to the x86 inline asm of strncmp and friends
+
+They don't actually clobber memory, but gcc doesn't even know they
+_read_ memory, so can apparently re-order memory accesses around them.
+
+Which obviously does the wrong thing if the memory access happens to
+change the memory that the compare function is accessing..
+
+Verified to fix a strange boot problem by Jens Axboe.
+
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+
+I:100644 100644 6a78ac58c19463e6f0a30e52a97b2bed8bd2c4c2 02c8f5d22065df19ec9adab857aabcd8a5627364 M include/asm-i386/string.h
+
+Key:
+S: Skipped
+I: Included Included verbatim
+D: Deleted Manually deleted by subsequent user edit
+R: Revised Manually revised by subsequent user edit
+
+diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h
+--- a/include/asm-i386/string.h
++++ b/include/asm-i386/string.h
+@@ -116,7 +116,8 @@ __asm__ __volatile__(
+ "orb $1,%%al\n"
+ "3:"
+ :"=a" (__res), "=&S" (d0), "=&D" (d1)
+- :"1" (cs),"2" (ct));
++ :"1" (cs),"2" (ct)
++ :"memory");
+ return __res;
+ }
+
+@@ -138,8 +139,9 @@ __asm__ __volatile__(
+ "3:\tsbbl %%eax,%%eax\n\t"
+ "orb $1,%%al\n"
+ "4:"
+- :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
+- :"1" (cs),"2" (ct),"3" (count));
++ :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
++ :"1" (cs),"2" (ct),"3" (count)
++ :"memory");
+ return __res;
+ }
+
+@@ -158,7 +160,9 @@ __asm__ __volatile__(
+ "movl $1,%1\n"
+ "2:\tmovl %1,%0\n\t"
+ "decl %0"
+- :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c));
++ :"=a" (__res), "=&S" (d0)
++ :"1" (s),"0" (c)
++ :"memory");
+ return __res;
+ }
+
+@@ -175,7 +179,9 @@ __asm__ __volatile__(
+ "leal -1(%%esi),%0\n"
+ "2:\ttestb %%al,%%al\n\t"
+ "jne 1b"
+- :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c));
++ :"=g" (__res), "=&S" (d0), "=&a" (d1)
++ :"0" (0),"1" (s),"2" (c)
++ :"memory");
+ return __res;
+ }
+
+@@ -189,7 +195,9 @@ __asm__ __volatile__(
+ "scasb\n\t"
+ "notl %0\n\t"
+ "decl %0"
+- :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffffu));
++ :"=c" (__res), "=&D" (d0)
++ :"1" (s),"a" (0), "0" (0xffffffffu)
++ :"memory");
+ return __res;
+ }
+
+@@ -333,7 +341,9 @@ __asm__ __volatile__(
+ "je 1f\n\t"
+ "movl $1,%0\n"
+ "1:\tdecl %0"
+- :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count));
++ :"=D" (__res), "=&c" (d0)
++ :"a" (c),"0" (cs),"1" (count)
++ :"memory");
+ return __res;
+ }
+
+@@ -369,7 +379,7 @@ __asm__ __volatile__(
+ "je 2f\n\t"
+ "stosb\n"
+ "2:"
+- : "=&c" (d0), "=&D" (d1)
++ :"=&c" (d0), "=&D" (d1)
+ :"a" (c), "q" (count), "0" (count/4), "1" ((long) s)
+ :"memory");
+ return (s);
+@@ -392,7 +402,8 @@ __asm__ __volatile__(
+ "jne 1b\n"
+ "3:\tsubl %2,%0"
+ :"=a" (__res), "=&d" (d0)
+- :"c" (s),"1" (count));
++ :"c" (s),"1" (count)
++ :"memory");
+ return __res;
+ }
+ /* end of additional stuff */
+@@ -473,7 +484,8 @@ static inline void * memscan(void * addr
+ "dec %%edi\n"
+ "1:"
+ : "=D" (addr), "=c" (size)
+- : "0" (addr), "1" (size), "a" (c));
++ : "0" (addr), "1" (size), "a" (c)
++ : "memory");
+ return addr;
+ }
+
Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-acpi-pci_irq-elcr.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-acpi-pci_irq-elcr.dpatch 2005-06-30 07:39:16 UTC (rev 3413)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/drivers-acpi-pci_irq-elcr.dpatch 2005-06-30 10:20:53 UTC (rev 3414)
@@ -0,0 +1,35 @@
+commit 1ef0867a529b222b8ff659d68140df8d5d6a45f2
+tree 664b6ccbaf10d2ec391852a5bf152f441c33a88c
+parent 2e8e121926ee6d15151c8e57ddce97275213c5b2
+author Linus Torvalds <torvalds@ppc970.osdl.org> 1119723401 -0700
+committer Chris Wright <chrisw@osdl.org> 1120086039 -0700
+
+[PATCH] ACPI: Make sure we call acpi_register_gsi() even for default PCI interrupt assignment
+
+ACPI: Make sure we call acpi_register_gsi() even for default PCI interrupt assignment
+
+That's the part that keeps track of the ELCR register, and we want to
+make sure that the PCI interrupts are properly marked level/low.
+
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+
+R:100644 100644 8093f2e003215156d376c9a8c086e8d9dfaf9d30 8dbf802ee7f819d9c885247a35d0d736ca4a5979 M drivers/acpi/pci_irq.c
+
+Key:
+S: Skipped
+I: Included Included verbatim
+D: Deleted Manually deleted by subsequent user edit
+R: Revised Manually revised by subsequent user edit
+
+Manually applied and rediffed for 2.6.8 - Horms
+
+--- a/drivers/acpi/pci_irq.c 2005-06-30 17:34:27.000000000 +0900
++++ b/drivers/acpi/pci_irq.c 2005-06-30 17:34:37.000000000 +0900
+@@ -371,6 +371,7 @@
+ /* Interrupt Line values above 0xF are forbidden */
+ if (dev->irq && (dev->irq <= 0xF)) {
+ printk(" - using IRQ %d\n", dev->irq);
++ acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW);
+ return_VALUE(dev->irq);
+ }
+ else {
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-1.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-1.dpatch 2005-06-30 07:39:16 UTC (rev 3413)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-bridge-mangle-oops-1.dpatch 2005-06-30 10:20:53 UTC (rev 3414)
@@ -272,7 +272,7 @@
+ return 0;
+ if (*pt_prev) {
-+ *ret = deliver_skb(*pskb, *pt_prev);
++ *ret = deliver_skb(*pskb, *pt_prev, 0);
*pt_prev = NULL;
}
-#endif
Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-netlink-autobind-return.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-netlink-autobind-return.dpatch 2005-06-30 07:39:16 UTC (rev 3413)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/net-netlink-autobind-return.dpatch 2005-06-30 10:20:53 UTC (rev 3414)
@@ -0,0 +1,72 @@
+commit 1b1f8246322cf10429b1a06924e93423af2bb2ee
+tree 6a1ca06954e541e1e84fffabbf30556e44001c4b
+parent 1ef0867a529b222b8ff659d68140df8d5d6a45f2
+author David S. Miller <davem@davemloft.net> 1119825308 -0700
+committer Chris Wright <chrisw@osdl.org> 1120086039 -0700
+
+[PATCH] Fix two socket hashing bugs.
+
+1) netlink_release() should only decrement the hash entry
+ count if the socket was actually hashed.
+
+ This was causing hash->entries to underflow, which
+ resulting in all kinds of troubles.
+
+ On 64-bit systems, this would cause the following
+ conditional to erroneously trigger:
+
+ err = -ENOMEM;
+ if (BITS_PER_LONG > 32 && unlikely(hash->entries >= UINT_MAX))
+ goto err;
+
+2) netlink_autobind() needs to propagate the error return from
+ netlink_insert(). Otherwise, callers will not see the error
+ as they should and thus try to operate on a socket with a zero pid,
+ which is very bad.
+
+ However, it should not propagate -EBUSY. If two threads race
+ to autobind the socket, that is fine. This is consistent with the
+ autobind behavior in other protocols.
+
+ So bug #1 above, combined with this one, resulted in hangs
+ on netlink_sendmsg() calls to the rtnetlink socket. We'd try
+ to do the user sendmsg() with the socket's pid set to zero,
+ later we do a socket lookup using that pid (via the value we
+ stashed away in NETLINK_CB(skb).pid), but that won't give us the
+ user socket, it will give us the rtnetlink socket. So when we
+ try to wake up the receive queue, we dive back into rtnetlink_rcv()
+ which tries to recursively take the rtnetlink semaphore.
+
+Thanks to Jakub Jelink for providing backtraces. Also, thanks to
+Herbert Xu for supplying debugging patches to help track this down,
+and also finding a mistake in an earlier version of this fix.
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+
+R:100644 100644 e41ce458c2a99afd66c1f7255638c918b61c8fea d9b118c986e8700d7f33b597f55984eaf6388692 M net/netlink/af_netlink.c
+
+Key:
+S: Skipped
+I: Included Included verbatim
+D: Deleted Manually deleted by subsequent user edit
+R: Revised Manually revised by subsequent user edit
+
+Only the second part of this patch is relevant to 2.6.8,
+and it needed to be rediffed for 2.6.8 - Horms
+--- a/net/netlink/af_netlink.c 2005-06-30 17:51:37.000000000 +0900
++++ b/net/netlink/af_netlink.c 2005-06-30 17:52:40.000000000 +0900
+@@ -313,7 +313,12 @@
+ if (err == -EADDRINUSE)
+ goto retry;
+ nlk_sk(sk)->groups = 0;
+- return 0;
++
++ /* If 2 threads race to autobind, that is fine. */
++ if (err == -EBUSY)
++ err = 0;
++
++ return err;
+ }
+
+ static inline int netlink_capable(struct socket *sock, unsigned flag)
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-17
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-17 2005-06-30 07:39:16 UTC (rev 3413)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/series/2.6.8-17 2005-06-30 10:20:53 UTC (rev 3414)
@@ -23,3 +23,7 @@
+ net-rose-ndigis-verify.dpatch
+ sound-usb-usbaudio-unplug-oops.dpatch
+ net-ipv4-ipvs-conn_tab-race.dpatch
++ asm-i386-mem-clobber.dpatch
++ drivers-acpi-pci_irq-elcr.dpatch
++ net-netlink-autobind-return.dpatch
+