OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 3/3][UNIX] The unix_nr_socks limit can be exceeded
Re: [PATCH 3/3][UNIX] The unix_nr_socks limit can be exceeded [message #23056 is a reply to message #22917] Sun, 11 November 2007 06:08 Go to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Pavel Emelyanov <xemul@openvz.org>
Date: Wed, 07 Nov 2007 17:01:17 +0300

> 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>

Applied, good catch Pavel.
 
Read Message
Read Message
Previous Topic: [PATCH 2/3][UNIX] Convert socks to unix_socks in scan_inflight, not in callbacks
Next Topic: [PATCH] netns: init dev_base_lock only once
Goto Forum:
  


Current Time: Fri Sep 05 22:18:47 GMT 2025

Total time taken to generate the page: 0.08424 seconds