summaryrefslogtreecommitdiffstats
path: root/crypto/lrw.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2021-02-03 14:29:52 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-17 11:02:28 +0100
commit46a831d1cc25f559a5ef46aff35e39795b61a94c (patch)
treee4429e1654d953c2ed4cd9080c08565938311c0d /crypto/lrw.c
parent24f5544f76d38cf55903a62cc9b1dbf264eb5807 (diff)
downloadlinux-stable-46a831d1cc25f559a5ef46aff35e39795b61a94c.tar.gz
linux-stable-46a831d1cc25f559a5ef46aff35e39795b61a94c.tar.bz2
linux-stable-46a831d1cc25f559a5ef46aff35e39795b61a94c.zip
udp: fix skb_copy_and_csum_datagram with odd segment sizes
commit 52cbd23a119c6ebf40a527e53f3402d2ea38eccb upstream. When iteratively computing a checksum with csum_block_add, track the offset "pos" to correctly rotate in csum_block_add when offset is odd. The open coded implementation of skb_copy_and_csum_datagram did this. With the switch to __skb_datagram_iter calling csum_and_copy_to_iter, pos was reinitialized to 0 on each call. Bring back the pos by passing it along with the csum to the callback. Changes v1->v2 - pass csum value, instead of csump pointer (Alexander Duyck) Link: https://lore.kernel.org/netdev/20210128152353.GB27281@optiplex/ Fixes: 950fcaecd5cc ("datagram: consolidate datagram copy to iter helpers") Reported-by: Oliver Graute <oliver.graute@gmail.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20210203192952.1849843-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/lrw.c')
0 files changed, 0 insertions, 0 deletions