From: Greg Kroah-Hartman Date: Mon, 26 Nov 2007 22:24:02 +0000 (-0800) Subject: more .23 patches added to queue X-Git-Tag: v2.6.23.10~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39d3b856561eac0ce5ce3dfa72e6a14d3678810b;p=thirdparty%2Fkernel%2Fstable-queue.git more .23 patches added to queue --- diff --git a/queue-2.6.23/fix-synchronize_irq-races-with-irq-handler.patch b/queue-2.6.23/fix-synchronize_irq-races-with-irq-handler.patch new file mode 100644 index 00000000000..b328f50adb1 --- /dev/null +++ b/queue-2.6.23/fix-synchronize_irq-races-with-irq-handler.patch @@ -0,0 +1,83 @@ +From stable-bounces@linux.kernel.org Wed Nov 21 14:10:14 2007 +From: Herbert Xu +From: Chuck Ebbert +Date: Wed, 21 Nov 2007 17:09:39 -0500 +Subject: Fix synchronize_irq races with IRQ handler +To: linux-stable +Cc: Thomas Gleixner +Message-ID: <4744ACA3.8090408@redhat.com> + +From: Herbert Xu + +patch a98ce5c6feead6bfedefabd46cb3d7f5be148d9a in mainline. + +Fix synchronize_irq races with IRQ handler + +As it is some callers of synchronize_irq rely on memory barriers +to provide synchronisation against the IRQ handlers. For example, +the tg3 driver does + +tp->irq_sync = 1; +smp_mb(); +synchronize_irq(); + +and then in the IRQ handler: + +if (!tp->irq_sync) + netif_rx_schedule(dev, &tp->napi); + +Unfortunately memory barriers only work well when they come in +pairs. Because we don't actually have memory barriers on the +IRQ path, the memory barrier before the synchronize_irq() doesn't +actually protect us. + +In particular, synchronize_irq() may return followed by the +result of netif_rx_schedule being made visible. + +This patch (mostly written by Linus) fixes this by using spin +locks instead of memory barries on the synchronize_irq() path. + +Signed-off-by: Herbert Xu +Acked-by: Benjamin Herrenschmidt +Signed-off-by: Linus Torvalds +Cc: Chuck Ebbert +Cc: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/irq/manage.c | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +--- a/kernel/irq/manage.c ++++ b/kernel/irq/manage.c +@@ -29,12 +29,28 @@ + void synchronize_irq(unsigned int irq) + { + struct irq_desc *desc = irq_desc + irq; ++ unsigned int status; + + if (irq >= NR_IRQS) + return; + +- while (desc->status & IRQ_INPROGRESS) +- cpu_relax(); ++ do { ++ unsigned long flags; ++ ++ /* ++ * Wait until we're out of the critical section. This might ++ * give the wrong answer due to the lack of memory barriers. ++ */ ++ while (desc->status & IRQ_INPROGRESS) ++ cpu_relax(); ++ ++ /* Ok, that indicated we're done: double-check carefully. */ ++ spin_lock_irqsave(&desc->lock, flags); ++ status = desc->status; ++ spin_unlock_irqrestore(&desc->lock, flags); ++ ++ /* Oops, that failed? */ ++ } while (status & IRQ_INPROGRESS); + } + EXPORT_SYMBOL(synchronize_irq); + diff --git a/queue-2.6.23/input-alps-add-signature-for-thinkpad-r61.patch b/queue-2.6.23/input-alps-add-signature-for-thinkpad-r61.patch new file mode 100644 index 00000000000..d60ab1f83f0 --- /dev/null +++ b/queue-2.6.23/input-alps-add-signature-for-thinkpad-r61.patch @@ -0,0 +1,32 @@ +From stable-bounces@linux.kernel.org Wed Nov 21 14:12:51 2007 +From: Dmitry Torokhov +Date: Wed, 21 Nov 2007 17:12:26 -0500 +Subject: Input: ALPS - add signature for ThinkPad R61 +To: linux-stable +Cc: Dmitry Torokhov +Message-ID: <4744AD4A.7000307@redhat.com> + +From: Dmitry Torokhov + +changeset f493018ebc3f94d64e12bc848db0906700bf73a2 in mainline. + +Input: ALPS - add signature for ThinkPad R61 + +Signed-off-by: Dmitry Torokhov +Cc: Chuck Ebbert +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/mouse/alps.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/input/mouse/alps.c ++++ b/drivers/input/mouse/alps.c +@@ -48,6 +48,7 @@ static const struct alps_model_info alps + { { 0x63, 0x02, 0x50 }, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */ + { { 0x63, 0x02, 0x64 }, 0xf8, 0xf8, 0 }, + { { 0x63, 0x03, 0xc8 }, 0xf8, 0xf8, ALPS_PASS }, /* Dell Latitude D800 */ ++ { { 0x73, 0x00, 0x0a }, 0xf8, 0xf8, ALPS_DUALPOINT }, /* ThinkPad R61 8918-5QG */ + { { 0x73, 0x02, 0x0a }, 0xf8, 0xf8, 0 }, + { { 0x73, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */ + { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */ diff --git a/queue-2.6.23/input-alps-add-support-for-model-found-in-dell-vostro-1400.patch b/queue-2.6.23/input-alps-add-support-for-model-found-in-dell-vostro-1400.patch new file mode 100644 index 00000000000..04badd8ee07 --- /dev/null +++ b/queue-2.6.23/input-alps-add-support-for-model-found-in-dell-vostro-1400.patch @@ -0,0 +1,33 @@ +From stable-bounces@linux.kernel.org Wed Nov 21 14:11:29 2007 +From: William Pettersson +Date: Wed, 21 Nov 2007 17:11:07 -0500 +Subject: Input: ALPS - add support for model found in Dell Vostro 1400 +To: linux-stable +Cc: Dmitry Torokhov +Message-ID: <4744ACFB.1020109@redhat.com> + +From: William Pettersson + +changeset dac4ae0daa1be36ab015973ed9e9dc04a2684395 in mainline. + +Input: ALPS - add support for model found in Dell Vostro 1400 + +Signed-off-by: William Pettersson +Signed-off-by: Dmitry Torokhov +Cc: Chuck Ebbert +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/mouse/alps.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/input/mouse/alps.c ++++ b/drivers/input/mouse/alps.c +@@ -53,6 +53,7 @@ static const struct alps_model_info alps + { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */ + { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, + { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */ ++ { { 0x73, 0x02, 0x50 }, 0xcf, 0xff, ALPS_FW_BK_1 } /* Dell Vostro 1400 */ + }; + + /* diff --git a/queue-2.6.23/pkt_sched-check-subqueue-status-before-calling-hard_start_xmit.patch b/queue-2.6.23/pkt_sched-check-subqueue-status-before-calling-hard_start_xmit.patch new file mode 100644 index 00000000000..835593f2624 --- /dev/null +++ b/queue-2.6.23/pkt_sched-check-subqueue-status-before-calling-hard_start_xmit.patch @@ -0,0 +1,55 @@ +From stable-bounces@linux.kernel.org Wed Nov 21 04:33:42 2007 +From: Peter P Waskiewicz Jr +Date: Wed, 21 Nov 2007 20:32:57 +0800 +Subject: PKT_SCHED: Check subqueue status before calling hard_start_xmit +To: stable@kernel.org, davem@davemloft.net +Message-ID: + +From: Peter P Waskiewicz Jr + +[PKT_SCHED]: Check subqueue status before calling hard_start_xmit + +[ Upstream commit: 5f1a485d5905aa641f33009019b3699076666a4c ] + +The only qdiscs that check subqueue state before dequeue'ing are PRIO +and RR. The other qdiscs, including the default pfifo_fast qdisc, +will allow traffic bound for subqueue 0 through to hard_start_xmit. +The check for netif_queue_stopped() is done above in pkt_sched.h, so +it is unnecessary for qdisc_restart(). However, if the underlying +driver is multiqueue capable, and only sets queue states on subqueues, +this will allow packets to enter the driver when it's currently unable +to process packets, resulting in expensive requeues and driver +entries. This patch re-adds the check for the subqueue status before +calling hard_start_xmit, so we can try and avoid the driver entry when +the queues are stopped. + +Signed-off-by: Peter P Waskiewicz Jr +Signed-off-by: David S. Miller +Cc: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + net/sched/sch_generic.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/net/sched/sch_generic.c ++++ b/net/sched/sch_generic.c +@@ -135,7 +135,7 @@ static inline int qdisc_restart(struct n + struct Qdisc *q = dev->qdisc; + struct sk_buff *skb; + unsigned lockless; +- int ret; ++ int ret = NETDEV_TX_BUSY; + + /* Dequeue packet */ + if (unlikely((skb = dev_dequeue_skb(dev, q)) == NULL)) +@@ -158,7 +158,8 @@ static inline int qdisc_restart(struct n + /* And release queue */ + spin_unlock(&dev->queue_lock); + +- ret = dev_hard_start_xmit(skb, dev); ++ if (!netif_subqueue_stopped(dev, skb->queue_mapping)) ++ ret = dev_hard_start_xmit(skb, dev); + + if (!lockless) + netif_tx_unlock(dev); diff --git a/queue-2.6.23/series b/queue-2.6.23/series index 9d135f9c3e3..741d93fbcad 100644 --- a/queue-2.6.23/series +++ b/queue-2.6.23/series @@ -3,3 +3,7 @@ net-random-secure_tcp_sequence_number-should-not-assume-config_ktime_scalar.patc netfilter-fix-null-pointer-dereference-in-nf_nat_move_storage.patch rd-fix-data-corruption-on-memory-pressure.patch sched-some-proc-entries-are-missed-in-sched_domain-sys_ctl-debug-code.patch +pkt_sched-check-subqueue-status-before-calling-hard_start_xmit.patch +fix-synchronize_irq-races-with-irq-handler.patch +input-alps-add-support-for-model-found-in-dell-vostro-1400.patch +input-alps-add-signature-for-thinkpad-r61.patch