[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 10 Nov 2007 22:08:43 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: xemul@...nvz.org
Cc: netdev@...r.kernel.org, devel@...nvz.org
Subject: Re: [PATCH 3/3][UNIX] The unix_nr_socks limit can be exceeded
From: Pavel Emelyanov <xemul@...nvz.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@...nvz.org>
Applied, good catch Pavel.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists