linux/net/rxrpc
Miaoqian Lin 4245a79003 rxrpc, afs: Fix missing error pointer check after rxrpc_kernel_lookup_peer()
rxrpc_kernel_lookup_peer() can also return error pointers in addition to
NULL, so just checking for NULL is not sufficient.

Fix this by:

 (1) Changing rxrpc_kernel_lookup_peer() to return -ENOMEM rather than NULL
     on allocation failure.

 (2) Making the callers in afs use IS_ERR() and PTR_ERR() to pass on the
     error code returned.

Fixes: 72904d7b9b ("rxrpc, afs: Allow afs to pin rxrpc_peer objects")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Co-developed-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/368272.1772713861@warthog.procyon.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-06 17:49:52 -08:00
..
Kconfig
Makefile
af_rxrpc.c rxrpc, afs: Fix missing error pointer check after rxrpc_kernel_lookup_peer() 2026-03-06 17:49:52 -08:00
ar-internal.h rxrpc: Fix data-race warning and potential load/store tearing 2026-01-21 19:59:29 -08:00
call_accept.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
call_event.c
call_object.c rxrpc: Fix notification vs call-release vs recvmsg 2025-07-17 07:50:48 -07:00
call_state.c
conn_client.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
conn_event.c rxrpc: Fix data-race warning and potential load/store tearing 2026-01-21 19:59:29 -08:00
conn_object.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
conn_service.c
input.c
input_rack.c
insecure.c
io_thread.c rxrpc: Fix to use conn aborts for conn-wide failures 2025-07-17 07:50:48 -07:00
key.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
local_event.c
local_object.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
misc.c
net_ns.c
oob.c
output.c rxrpc: Fix data-race warning and potential load/store tearing 2026-01-21 19:59:29 -08:00
peer_event.c rxrpc: Fix data-race warning and potential load/store tearing 2026-01-21 19:59:29 -08:00
peer_object.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
proc.c rxrpc: Fix data-race warning and potential load/store tearing 2026-01-21 19:59:29 -08:00
protocol.h
recvmsg.c rxrpc: Fix recvmsg() unconditional requeue 2026-01-19 10:07:06 -08:00
rtt.c
rxgk.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rxgk_app.c rxrpc: Fix untrusted unsigned subtract 2025-09-14 13:05:22 -07:00
rxgk_common.h rxrpc: Fix unhandled errors in rxgk_verify_packet_integrity() 2025-09-14 13:05:22 -07:00
rxgk_kdf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rxkad.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rxperf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
security.c rxrpc: Fix to use conn aborts for conn-wide failures 2025-07-17 07:50:48 -07:00
sendmsg.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
server_key.c
skbuff.c
sysctl.c
txbuf.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
utils.c