]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.arch/s390-02-08-qeth-panic.patch
Merge branch 'master' into next
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / s390-02-08-qeth-panic.patch
1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: qeth: avoid skb_under_panic for malformatted inbound data
3 References: bnc#434333
4
5 Symptom: kernel dump
6 Problem: malformatted inbound packets due to hardware problems
7 Solution: make the qeth driver more robust in case of malformatted inbound
8 packets due to hardware problems, an additional check for
9 OSN-card-type is added for OSN-type packets.
10
11 Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
12
13 Acked-by: John Jolly <jjolly@suse.de>
14 ---
15
16 drivers/s390/net/qeth_l2_main.c | 13 ++++++++-----
17 1 file changed, 8 insertions(+), 5 deletions(-)
18
19 Index: linux-sles11/drivers/s390/net/qeth_l2_main.c
20 ===================================================================
21 --- linux-sles11.orig/drivers/s390/net/qeth_l2_main.c
22 +++ linux-sles11/drivers/s390/net/qeth_l2_main.c
23 @@ -453,12 +453,15 @@ static void qeth_l2_process_inbound_buff
24 netif_rx(skb);
25 break;
26 case QETH_HEADER_TYPE_OSN:
27 - skb_push(skb, sizeof(struct qeth_hdr));
28 - skb_copy_to_linear_data(skb, hdr,
29 + if (card->info.type == QETH_CARD_TYPE_OSN) {
30 + skb_push(skb, sizeof(struct qeth_hdr));
31 + skb_copy_to_linear_data(skb, hdr,
32 sizeof(struct qeth_hdr));
33 - len = skb->len;
34 - card->osn_info.data_cb(skb);
35 - break;
36 + len = skb->len;
37 + card->osn_info.data_cb(skb);
38 + break;
39 + }
40 + /* else unknown */
41 default:
42 dev_kfree_skb_any(skb);
43 QETH_DBF_TEXT(TRACE, 3, "inbunkno");