From: chrisw@osdl.org Date: Fri, 11 Mar 2005 21:33:22 +0000 (-0800) Subject: [PATCH] add wan-hd6457x-panic-fix.patch and NetROM-deadlock-fix.patch X-Git-Tag: v2.6.11.9~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f6030feff33029800b78eb1e2a04a0e711335f8;p=thirdparty%2Fkernel%2Fstable-queue.git [PATCH] add wan-hd6457x-panic-fix.patch and NetROM-deadlock-fix.patch --- diff --git a/2.6.11.4/NetROM-deadlock-fix.patch b/2.6.11.4/NetROM-deadlock-fix.patch new file mode 100644 index 00000000000..afe48ddd904 --- /dev/null +++ b/2.6.11.4/NetROM-deadlock-fix.patch @@ -0,0 +1,78 @@ +Date: Fri, 11 Mar 2005 21:10:05 +0000 +From: Ralf Baechle +To: stable@kernel.org +Subject: [PATCH] NetROM locking + +Fix deadlock in NetROM due to double locking. I was sent the patch by +Alan and have doublechecked it. This bug hits Net/ROM users really hard. +It's accepted by DaveM - but just too late to make it into 2.6.11. + +Signed-off-by: Ralf Baechle +Signed-off-by: Chris Wright + +Index: bk-afu/net/netrom/nr_in.c +=================================================================== +--- bk-afu.orig/net/netrom/nr_in.c 2005-02-05 22:16:25.553987776 +0000 ++++ bk-afu/net/netrom/nr_in.c 2005-02-05 22:16:25.555987472 +0000 +@@ -74,7 +74,6 @@ + static int nr_state1_machine(struct sock *sk, struct sk_buff *skb, + int frametype) + { +- bh_lock_sock(sk); + switch (frametype) { + case NR_CONNACK: { + nr_cb *nr = nr_sk(sk); +@@ -103,8 +102,6 @@ + default: + break; + } +- bh_unlock_sock(sk); +- + return 0; + } + +@@ -116,7 +113,6 @@ + static int nr_state2_machine(struct sock *sk, struct sk_buff *skb, + int frametype) + { +- bh_lock_sock(sk); + switch (frametype) { + case NR_CONNACK | NR_CHOKE_FLAG: + nr_disconnect(sk, ECONNRESET); +@@ -132,8 +128,6 @@ + default: + break; + } +- bh_unlock_sock(sk); +- + return 0; + } + +@@ -154,7 +148,6 @@ + nr = skb->data[18]; + ns = skb->data[17]; + +- bh_lock_sock(sk); + switch (frametype) { + case NR_CONNREQ: + nr_write_internal(sk, NR_CONNACK); +@@ -265,12 +258,10 @@ + default: + break; + } +- bh_unlock_sock(sk); +- + return queued; + } + +-/* Higher level upcall for a LAPB frame */ ++/* Higher level upcall for a LAPB frame - called with sk locked */ + int nr_process_rx_frame(struct sock *sk, struct sk_buff *skb) + { + nr_cb *nr = nr_sk(sk); + +_______________________________________________ +stable mailing list +stable@linux.kernel.org +http://linux.kernel.org/mailman/listinfo/stable + diff --git a/2.6.11.4/wan-hd6457x-panic-fix.patch b/2.6.11.4/wan-hd6457x-panic-fix.patch new file mode 100644 index 00000000000..10e8a17ba29 --- /dev/null +++ b/2.6.11.4/wan-hd6457x-panic-fix.patch @@ -0,0 +1,25 @@ +From: Krzysztof Halasa +To: Chris Wright +Cc: Greg KH , linux-kernel@vger.kernel.org, stable@kernel.org +Subject: [PATCH] Fix kernel panic on receive with WAN Hitachi SCA HD6457x + +Another patch for 2.6.11.x: already in main tree, fixes kernel panic on +receive with WAN cards based on Hitachi SCA/SCA-II: N2, C101, PCI200SYN. +The attached patch fixes NULL pointer dereference on RX. + +Signed-off-by: Krzysztof Halasa +Signed-off-by: Chris Wright + +--- linux/drivers/net/wan/hd6457x.c 28 Oct 2004 06:16:08 -0000 1.15 ++++ linux/drivers/net/wan/hd6457x.c 1 Mar 2005 00:58:08 -0000 +@@ -315,7 +315,7 @@ + #endif + stats->rx_packets++; + stats->rx_bytes += skb->len; +- skb->dev->last_rx = jiffies; ++ dev->last_rx = jiffies; + skb->protocol = hdlc_type_trans(skb, dev); + netif_rx(skb); + } + +