linux/net
Ao Zhou 8141a2dc70 net: rds: fix MR cleanup on copy error
__rds_rdma_map() hands sg/pages ownership to the transport after
get_mr() succeeds. If copying the generated cookie back to user space
fails after that point, the error path must not free those resources
again before dropping the MR reference.

Remove the duplicate unpin/free from the put_user() failure branch so
that MR teardown is handled only through the existing final cleanup
path.

Fixes: 0d4597c8c5 ("net/rds: Track user mapped pages through special API")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Ao Zhou <draw51280@163.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Reviewed-by: Allison Henderson <achender@kernel.org>
Link: https://patch.msgid.link/79c8ef73ec8e5844d71038983940cc2943099baf.1776764247.git.draw51280@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-23 12:18:08 -07:00
..
6lowpan
9p
802
8021q 8021q: delete cleared egress QoS mappings 2026-04-23 12:13:57 +02:00
appletalk
atm
ax25
batman-adv
bluetooth Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
bpf
bridge net: bridge: use a stable FDB dst snapshot in RCU readers 2026-04-16 12:47:41 +02:00
caif net: caif: clear client service pointer on teardown 2026-04-14 13:21:54 +02:00
can Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
ceph
core net: warn ops-locked drivers still using ndo_set_rx_mode 2026-04-21 12:50:25 +02:00
dcb
devlink
dns_resolver
dsa net: dsa: remove redundant netdev_lock_ops() from conduit ethtool ops 2026-04-16 19:10:48 -07:00
ethernet
ethtool
handshake
hsr
ieee802154
ife
ipv4 tcp: call sk_data_ready() after listener migration 2026-04-23 11:54:43 -07:00
ipv6 ipv6: Cap TLV scan in ip6_tnl_parse_tlv_enc_lim 2026-04-23 11:52:07 -07:00
iucv
kcm
key
l2tp
l3mdev
lapb
llc llc: Return -EINPROGRESS from llc_ui_connect() 2026-04-23 11:40:39 -07:00
mac80211 Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
mac802154
mctp net: mctp: fix don't require received header reserved bits to be zero 2026-04-20 11:46:57 -07:00
mpls
mptcp mptcp: sync the msk->sndbuf at accept() time 2026-04-23 13:20:17 +02:00
ncsi
netfilter netfilter: nfnetlink_osf: fix potential NULL dereference in ttl check 2026-04-20 23:45:44 +02:00
netlabel
netlink Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
netrom
nfc
nsh
openvswitch openvswitch: cap upcall PID array size and pre-size vport replies 2026-04-20 11:43:04 -07:00
packet net/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd() 2026-04-22 20:16:34 -07:00
phonet Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
psample
psp
qrtr Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-04-14 12:04:00 -07:00
rds net: rds: fix MR cleanup on copy error 2026-04-23 12:18:08 -07:00
rfkill
rose Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
rxrpc
sched net/sched: sch_sfb: annotate data-races in sfb_dump_stats() 2026-04-22 21:12:59 -07:00
sctp sctp: fix sockets_allocated imbalance after sk_clone() 2026-04-22 20:31:24 -07:00
shaper
smc net/smc: avoid early lgr access in smc_clc_wait_msg 2026-04-23 11:00:57 -07:00
strparser net: strparser: fix skb_head leak in strp_abort_strp() 2026-04-14 12:37:00 +02:00
sunrpc
switchdev
tipc tipc: fix double-free in tipc_buf_append() 2026-04-23 11:45:01 -07:00
tls
unix af_unix: Drop all SCM attributes for SOCKMAP. 2026-04-18 12:12:28 -07:00
vmw_vsock hv_sock: Return -EIO for malformed/short packets 2026-04-23 10:53:16 -07:00
wireless Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
x25
xdp Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
xfrm
Kconfig
Kconfig.debug
Makefile
compat.c
devres.c
socket.c Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
sysctl_net.c