lkml.org 
[lkml]   [2020]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.5 54/66] s390/qeth: fix off-by-one in RX copybreak check
    Date
    From: Julian Wiedmann <jwi@linux.ibm.com>

    [ Upstream commit 54a61fbc020fd2e305680871c453abcf7fc0339b ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/s390/net/qeth_core_main.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
    index 623475717183e..4fd7b0ceb4ffd 100644
    --- a/drivers/s390/net/qeth_core_main.c
    +++ b/drivers/s390/net/qeth_core_main.c
    @@ -5141,7 +5141,7 @@ struct sk_buff *qeth_core_get_next_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));

    --
    2.20.1
    \
     
     \ /
      Last update: 2020-03-03 04:01    [W:5.021 / U:0.380 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site