summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-11-10 22:08:30 -0800
committerDavid S. Miller <davem@davemloft.net>2007-11-10 22:08:30 -0800
commit284b327be2f86cf751316ff344b6945e580e654f (patch)
tree61a5e5b353be80e092795e357863509861a6a774 /net/ipv4
parent5c80f1ae9842a8b7985acd0f02efb9828effb05f (diff)
downloadop-kernel-dev-284b327be2f86cf751316ff344b6945e580e654f.zip
op-kernel-dev-284b327be2f86cf751316ff344b6945e580e654f.tar.gz
[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>
Diffstat (limited to 'net/ipv4')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud