From: Julian Wiedmann Date: Thu, 20 Feb 2020 14:54:56 +0000 (+0100) Subject: s390/qeth: fix off-by-one in RX copybreak check X-Git-Tag: v5.6-rc3~23^2~6^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=54a61fbc020fd2e305680871c453abcf7fc0339b;p=users%2Fjedix%2Flinux-maple.git s390/qeth: fix off-by-one in RX copybreak check The RX copybreak is intended as the _max_ value where the frame's data should be copied. So for frame_len == copybreak, don't build an SG skb. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller --- diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 2264c6619def..5efcaa43615b 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -5344,7 +5344,7 @@ next_packet: } use_rx_sg = (card->options.cq == QETH_CQ_ENABLED) || - ((skb_len >= card->options.rx_sg_cb) && + (skb_len > card->options.rx_sg_cb && !atomic_read(&card->force_alloc_skb) && !IS_OSN(card));