android_kernel_xiaomi_sm8350/net/unix
Pavel Emelyanov 284b327be2 [UNIX]: The unix_nr_socks limit can be exceeded
The unix_nr_socks value is limited with the 2 * get_max_files() value,
as seen from the unix_create1(). However, the check and the actual
increment are separated with the GFP_KERNEL allocation, so this limit
can be exceeded under a memory pressure - task may go to sleep freeing
the pages and some other task will be allowed to allocate a new sock
and so on and so forth.

So make the increment before the check (similar thing is done in the
sock_kmalloc) and go to kmalloc after this.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-10 22:08:30 -08:00
..
af_unix.c [UNIX]: The unix_nr_socks limit can be exceeded 2007-11-10 22:08:30 -08:00
garbage.c [AF_UNIX]: Convert socks to unix_socks in scan_inflight, not in callbacks 2007-11-10 22:07:13 -08:00
Kconfig
Makefile
sysctl_net_unix.c [PATCH] sysctl: remove insert_at_head from register_sysctl 2007-02-14 08:09:59 -08:00