From: Pavel Emelyanov Date: Sun, 11 Nov 2007 06:08:30 +0000 (-0800) Subject: [UNIX]: The unix_nr_socks limit can be exceeded X-Git-Tag: v2.6.24-rc3~155^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=284b327be2f86cf751316ff344b6945e580e654f;p=pandora-kernel.git [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 Signed-off-by: David S. Miller --- Reading git-diff-tree failed