]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/tls: use the new scatterwalk functions
authorEric Biggers <ebiggers@google.com>
Wed, 19 Feb 2025 18:23:38 +0000 (10:23 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 2 Mar 2025 07:19:44 +0000 (15:19 +0800)
commit6be051ceaf7dc92002d03f6a1c8447518c574bf1
tree99d3fa616e372f995e834f418348e98557254ff9
parentfd7cbef67f975c22de471117b3f52ddcd2cf140c
net/tls: use the new scatterwalk functions

Replace calls to the deprecated function scatterwalk_copychunks() with
memcpy_from_scatterwalk(), memcpy_to_scatterwalk(), or
scatterwalk_skip() as appropriate.  The new functions generally behave
more as expected and eliminate the need to call scatterwalk_done() or
scatterwalk_pagedone().

However, the new functions intentionally do not advance to the next sg
entry right away, which would have broken chain_to_walk() which is
accessing the fields of struct scatter_walk directly.  To avoid this,
replace chain_to_walk() with scatterwalk_get_sglist() which supports the
needed functionality.

Cc: Boris Pismenny <borisp@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
net/tls/tls_device_fallback.c