Commit 2d488c2f authored by Ursula Braun's avatar Ursula Braun Committed by Jeff Garzik

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: default avatarUrsula Braun <ursula.braun@de.ibm.com>
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent cc181282
......@@ -449,12 +449,15 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card,
netif_rx(skb);
break;
case QETH_HEADER_TYPE_OSN:
if (card->info.type == QETH_CARD_TYPE_OSN) {
skb_push(skb, sizeof(struct qeth_hdr));
skb_copy_to_linear_data(skb, hdr,
sizeof(struct qeth_hdr));
len = skb->len;
card->osn_info.data_cb(skb);
break;
}
/* else unknown */
default:
dev_kfree_skb_any(skb);
QETH_DBF_TEXT(TRACE, 3, "inbunkno");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment