提交 0ac1487c 编写于 作者: J Julian Wiedmann 提交者: David S. Miller

s390/qeth: don't dump past end of unknown HW header

For inbound data with an unsupported HW header format, only dump the
actual HW header. We have no idea how much payload follows it, and what
it contains. Worst case, we dump past the end of the Inbound Buffer and
access whatever is located next in memory.
Signed-off-by: NJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 aec45e85
...@@ -423,7 +423,7 @@ static int qeth_l2_process_inbound_buffer(struct qeth_card *card, ...@@ -423,7 +423,7 @@ static int qeth_l2_process_inbound_buffer(struct qeth_card *card,
default: default:
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
QETH_CARD_TEXT(card, 3, "inbunkno"); QETH_CARD_TEXT(card, 3, "inbunkno");
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN); QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
continue; continue;
} }
work_done++; work_done++;
......
...@@ -1390,7 +1390,7 @@ static int qeth_l3_process_inbound_buffer(struct qeth_card *card, ...@@ -1390,7 +1390,7 @@ static int qeth_l3_process_inbound_buffer(struct qeth_card *card,
default: default:
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
QETH_CARD_TEXT(card, 3, "inbunkno"); QETH_CARD_TEXT(card, 3, "inbunkno");
QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN); QETH_DBF_HEX(CTRL, 3, hdr, sizeof(*hdr));
continue; continue;
} }
work_done++; work_done++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册