]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
s390/qeth: fix off-by-one in RX copybreak check
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 20 Feb 2020 14:54:56 +0000 (15:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Feb 2020 18:30:47 +0000 (10:30 -0800)
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 <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c

index 2264c6619def0a0815a3a9ebb632a3f1c29779fb..5efcaa43615bb235d87384e2a7f4688f276ae4d7 100644 (file)
@@ -5344,7 +5344,7 @@ static int qeth_extract_skb(struct qeth_card *card,
        }
 
        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));