kernel-fxtec-pro1x/net
Dmitry Yakunin d6d11db20e cgroup, netclassid: periodically release file_lock on classid updating
[ Upstream commit 018d26fcd12a75fb9b5fe233762aa3f2f0854b88 ]

In our production environment we have faced with problem that updating
classid in cgroup with heavy tasks cause long freeze of the file tables
in this tasks. By heavy tasks we understand tasks with many threads and
opened sockets (e.g. balancers). This freeze leads to an increase number
of client timeouts.

This patch implements following logic to fix this issue:
аfter iterating 1000 file descriptors file table lock will be released
thus providing a time gap for socket creation/deletion.

Now update is non atomic and socket may be skipped using calls:

dup2(oldfd, newfd);
close(oldfd);

But this case is not typical. Moreover before this patch skip is possible
too by hiding socket fd in unix socket buffer.

New sockets will be allocated with updated classid because cgroup state
is updated before start of the file descriptors iteration.

So in common cases this patch has no side effects.

Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru>
Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-18 07:14:10 +01:00
..
6lowpan 6lowpan: Off by one handling ->nexthdr 2020-01-27 14:50:41 +01:00
9p 9p: Transport error uninitialized 2019-10-11 18:21:12 +02:00
802
8021q vlan: vlan_changelink() should propagate errors 2020-01-12 12:17:28 +01:00
appletalk appletalk: Set error code if register_snap_client failed 2019-12-13 08:52:59 +01:00
atm net: use skb_queue_empty_lockless() in poll() handlers 2019-11-10 11:27:48 +01:00
ax25 ax25: enforce CAP_NET_RAW for raw sockets 2019-10-05 13:09:32 +02:00
batman-adv batman-adv: Fix DAT candidate selection on little endian systems 2020-01-23 08:21:34 +01:00
bluetooth Bluetooth: Fix race condition in hci_release_sock() 2020-02-05 14:43:39 +00:00
bpf
bpfilter signal/bpfilter: Fix bpfilter_kernl to use send_sig not force_sig 2020-01-27 14:50:51 +01:00
bridge netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule 2020-01-27 14:50:47 +01:00
caif net: use skb_queue_empty_lockless() in poll() handlers 2019-11-10 11:27:48 +01:00
can can: gw: Fix error path of cgw_module_init 2019-08-29 08:28:30 +02:00
ceph libceph: fix PG split vs OSD (re)connect race 2019-08-29 08:28:50 +02:00
core cgroup, netclassid: periodically release file_lock on classid updating 2020-03-18 07:14:10 +01:00
dcb
dccp dccp: Fix memleak in __feat_register_sp 2020-01-17 19:46:58 +01:00
decnet net: add bool confirm_neigh parameter for dst_ops.update_pmtu 2020-01-04 19:13:37 +01:00
dns_resolver
dsa net: dsa: tag_qca: Make sure there is headroom for tag 2020-02-24 08:34:34 +01:00
ethernet net: add annotations on hh->hh_len lockless accesses 2020-01-09 10:19:09 +01:00
hsr net: hsr: fix possible NULL deref in hsr_handle_frame() 2020-02-11 04:33:52 -08:00
ieee802154 inet: frags: call inet_frags_fini() after unregister_pernet_subsys() 2020-01-27 14:50:51 +01:00
ife
ipv4 tcp: clear tp->segs_{in|out} in tcp_disconnect() 2020-02-11 04:33:54 -08:00
ipv6 ipv6: Fix nlmsg_flags when splitting a multipath route 2020-03-05 16:42:17 +01:00
iucv net/af_iucv: always register net_device notifier 2020-01-27 14:50:56 +01:00
kcm
key
l2tp l2tp: Allow duplicate session creation with UDP 2020-02-11 04:33:52 -08:00
l3mdev
lapb
llc llc: fix sk_buff refcounting in llc_conn_state_process() 2020-01-27 14:51:17 +01:00
mac80211 mac80211: consider more elements in parsing CRC 2020-03-05 16:42:13 +01:00
mac802154
mpls mpls: fix warning with multi-label encap 2020-01-27 14:50:54 +01:00
ncsi
netfilter netfilter: nft_tunnel: no need to call htons() when dumping ports 2020-03-05 16:42:23 +01:00
netlabel
netlink net: netlink: cap max groups which will be considered in netlink_bind() 2020-03-05 16:42:20 +01:00
netrom netrom: hold sock when setting skb->destructor 2019-07-28 08:29:27 +02:00
nfc net: nfc: nci: fix a possible sleep-in-atomic-context bug in nci_uart_tty_receive() 2019-12-31 16:34:38 +01:00
nsh
openvswitch openvswitch: support asymmetric conntrack 2019-12-21 10:57:14 +01:00
packet packet: fix data-race in fanout_flow_is_huge() 2020-01-27 14:51:21 +01:00
phonet net: use skb_queue_empty_lockless() in poll() handlers 2019-11-10 11:27:48 +01:00
psample net: psample: fix skb_over_panic 2019-12-05 09:21:30 +01:00
qrtr net: qrtr: fix memort leak in qrtr_tun_write_iter 2019-12-13 08:52:58 +01:00
rds net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' 2020-01-27 14:51:13 +01:00
rfkill rfkill: Fix incorrect check to avoid NULL pointer dereference 2020-01-12 12:17:17 +01:00
rose
rxrpc rxrpc: Fix call RCU cleanup using non-bh-safe locks 2020-02-28 16:39:00 +01:00
sched net: sched: correct flower port blocking 2020-03-05 16:42:16 +01:00
sctp sctp: move the format error check out of __sctp_sf_do_9_1_abort 2020-03-05 16:42:16 +01:00
smc net/smc: no peer ID in CLC decline for SMCD 2020-03-05 16:42:20 +01:00
strparser
sunrpc sunrpc: expiry_time should be seconds not timeval 2020-02-11 04:34:07 -08:00
switchdev
tipc tipc: reduce risk of wakeup queue starvation 2020-01-27 14:51:02 +01:00
tls net/tls: Fix to avoid gettig invalid tls record 2020-03-05 16:42:17 +01:00
unix af_unix: add compat_ioctl support 2020-01-17 19:47:07 +01:00
vmw_vsock hv_sock: Remove the accept port restriction 2020-02-14 16:33:22 -05:00
wimax
wireless cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE 2020-03-05 16:42:15 +01:00
x25 net/x25: fix nonblocking connect 2020-01-29 16:43:24 +01:00
xdp xsk: Fix registration of Rx-only sockets 2020-01-27 14:51:19 +01:00
xfrm xfrm: interface: do not confirm neighbor when do pmtu update 2020-02-05 14:43:49 +00:00
compat.c
Kconfig
Makefile
socket.c compat_ioctl: handle SIOCOUTQNSD 2020-01-17 19:47:07 +01:00
sysctl_net.c