]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rxrpc: Separate the packet length from the data length in rxrpc_txbuf
authorDavid Howells <dhowells@redhat.com>
Wed, 4 Dec 2024 07:46:38 +0000 (07:46 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 9 Dec 2024 21:48:25 +0000 (13:48 -0800)
commit3d2bdf73cea57d7f6bf314aa1c948af11af94980
tree2925a30f2e367137e5d3325380777607217063f1
parenteeaedc5449d9fccf2b56e844a018df9d3720d59e
rxrpc: Separate the packet length from the data length in rxrpc_txbuf

Separate the packet length from the data length (txb->len) stored in the
rxrpc_txbuf to make security calculations easier.  Also store the
allocation size as that's an upper bound on the size of the security
wrapper and change a number of fields to unsigned short as the amount of
data can't exceed the capacity of a UDP packet.

Also, whilst we're at it, use kzalloc() for txbufs.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/20241204074710.990092-11-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/rxrpc/ar-internal.h
net/rxrpc/insecure.c
net/rxrpc/output.c
net/rxrpc/rxkad.c
net/rxrpc/sendmsg.c
net/rxrpc/txbuf.c