qeth: avoid skb_under_panic for malformatted inbound data
To make the qeth driver more robust in case of malformatted inbound packets due to hardware problems, an additional check for OSN-card-type is added for OSN-type packets. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
cc181282fb
commit
2d488c2f51
1 changed files with 8 additions and 5 deletions
|
@ -449,12 +449,15 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card,
|
||||||
netif_rx(skb);
|
netif_rx(skb);
|
||||||
break;
|
break;
|
||||||
case QETH_HEADER_TYPE_OSN:
|
case QETH_HEADER_TYPE_OSN:
|
||||||
skb_push(skb, sizeof(struct qeth_hdr));
|
if (card->info.type == QETH_CARD_TYPE_OSN) {
|
||||||
skb_copy_to_linear_data(skb, hdr,
|
skb_push(skb, sizeof(struct qeth_hdr));
|
||||||
|
skb_copy_to_linear_data(skb, hdr,
|
||||||
sizeof(struct qeth_hdr));
|
sizeof(struct qeth_hdr));
|
||||||
len = skb->len;
|
len = skb->len;
|
||||||
card->osn_info.data_cb(skb);
|
card->osn_info.data_cb(skb);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
/* else unknown */
|
||||||
default:
|
default:
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
QETH_DBF_TEXT(TRACE, 3, "inbunkno");
|
QETH_DBF_TEXT(TRACE, 3, "inbunkno");
|
||||||
|
|
Loading…
Reference in a new issue