aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l2_main.c
diff options
context:
space:
mode:
authorFrank Blaschka <frank.blaschka@de.ibm.com>2010-06-21 22:57:10 +0000
committerDavid S. Miller <davem@davemloft.net>2010-06-23 13:16:36 -0700
commit51aa165c9f27bbfff498e4d56f3eadf17d74c476 (patch)
treec2af4e7f534c697f1fc8c14e053f679596a507bf /drivers/s390/net/qeth_l2_main.c
parentqeth: fix use after free for qeths debug area (diff)
downloadlinux-dev-51aa165c9f27bbfff498e4d56f3eadf17d74c476.tar.xz
linux-dev-51aa165c9f27bbfff498e4d56f3eadf17d74c476.zip
qeth: fix page breaks in hw headers
Turning on memory debugging showed there could be page breaks in hardware headers. OSA does not allow this so we had to add code to bounce the header in case there is a page break. This patch also fixes a problem in case the skb->data part of a fragmented skb spreads multiple pages. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r--drivers/s390/net/qeth_l2_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index e7942ccab987..32d07c2dcc67 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -712,10 +712,13 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
goto tx_drop;
}
- if (card->info.type != QETH_CARD_TYPE_IQD)
+ if (card->info.type != QETH_CARD_TYPE_IQD) {
+ if (qeth_hdr_chk_and_bounce(new_skb,
+ sizeof(struct qeth_hdr_layer2)))
+ goto tx_drop;
rc = qeth_do_send_packet(card, queue, new_skb, hdr,
elements);
- else
+ } else
rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr,
elements, data_offset, hd_len);
if (!rc) {