linux/net
Sowmini Varadhan ea8994cb01 rds: hold a sock ref from rds_message to the rds_sock
The existing model holds a reference from the rds_sock to the
rds_message, but the rds_message does not itself hold a sock_put()
on the rds_sock. Instead the m_rs field in the rds_message is
assigned when the message is queued on the sock, and nulled when
the message is dequeued from the sock.

We want to be able to notify userspace when the rds_message
is actually freed (from rds_message_purge(), after the refcounts
to the rds_message go to 0). At the time that rds_message_purge()
is called, the message is no longer on the rds_sock retransmit
queue. Thus the explicit reference for the m_rs is needed to
send a notification that will signal to userspace that
it is now safe to free/reuse any pages that may have
been pinned down for zerocopy.

This patch manages the m_rs assignment in the rds_message with
the necessary refcount book-keeping.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-16 16:04:16 -05:00
..
6lowpan
9p vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
802
8021q net: delete /proc THIS_MODULE references 2018-01-16 15:01:33 -05:00
appletalk net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
atm net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
ax25 net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
batman-adv vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2018-02-15 15:43:49 -05:00
bpf bpf: fix null pointer deref in bpf_prog_test_run_xdp 2018-02-01 07:43:56 -08:00
bridge net: bridge: Fix uninitialized error in br_fdb_sync_static() 2018-02-01 09:47:37 -05:00
caif vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
can net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
ceph libceph: check kstrndup() return value 2018-01-29 18:36:12 +01:00
core skbuff: export mm_[un]account_pinned_pages for other modules 2018-02-16 16:04:16 -05:00
dcb
dccp vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
decnet net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
dns_resolver afs: Support the AFS dynamic root 2018-02-06 14:43:37 +00:00
dsa net: dsa: forward timestamping callbacks to switch drivers 2018-02-14 14:33:37 -05:00
ethernet
hsr
ieee802154
ife
ipv4 net/ipv4: Remove fib table id from rtable 2018-02-15 15:41:42 -05:00
ipv6 net: Move ipv4 set_lwt_redirect helper to lwtunnel 2018-02-14 14:43:32 -05:00
iucv net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
kcm kcm: Call strp_stop before strp_done in kcm_attach 2018-02-14 15:38:39 -05:00
key af_key: Fix memory leak in key_notify_policy. 2018-01-10 09:45:11 +01:00
l2tp net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
l3mdev
lapb
llc net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
mac80211 debugfs_sta: Remove unneeded semicolons 2018-01-22 14:03:28 +01:00
mac802154
mpls mpls, nospec: Sanitize array index in mpls_label_ok() 2018-02-08 15:24:12 -05:00
ncsi net/ncsi: Don't take any action on HNCDSC AEN 2017-12-18 14:50:11 -05:00
netfilter net: Convert nf_log_net_ops 2018-02-13 10:36:06 -05:00
netlabel
netlink net: Convert netlink_tap_net_ops 2018-02-13 10:36:09 -05:00
netrom net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
nfc net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
nsh
openvswitch openvswitch: Remove padding from packet before L3+ conntrack processing 2018-02-01 09:46:22 -05:00
packet net: Convert packet_net_ops 2018-02-13 10:36:08 -05:00
phonet net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
psample
qrtr net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
rds rds: hold a sock ref from rds_message to the rds_sock 2018-02-16 16:04:16 -05:00
rfkill vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
rose net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
rxrpc vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
sched net: Revert sched action extack support series. 2018-02-16 16:03:39 -05:00
sctp sctp: add file comments in diag.c 2018-02-13 13:56:31 -05:00
smc net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
strparser strparser: Call sock_owned_by_user_nocheck 2017-12-28 14:28:22 -05:00
sunrpc net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
switchdev
tipc tipc: rename tipc_server to tipc_topsrv 2018-02-16 15:26:34 -05:00
tls net: add a UID to use for ULP socket assignment 2018-02-06 11:39:31 +01:00
unix net: Convert unix_net_ops 2018-02-13 10:36:08 -05:00
vmw_vsock net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
wimax
wireless net: Convert wext_pernet_ops 2018-02-13 10:36:08 -05:00
x25 net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
xfrm net: Convert pernet_subsys, registered from inet_init() 2018-02-13 10:36:08 -05:00
Kconfig Staging/IIO patches for 4.16-rc1 2018-02-01 09:51:57 -08:00
Makefile ipx: move Novell IPX protocol support into staging 2017-11-28 13:55:00 +01:00
compat.c
socket.c net: Make extern and export get_net_ns() 2018-02-15 15:34:42 -05:00
sysctl_net.c net: Convert sysctl_pernet_ops 2018-02-13 10:36:05 -05:00