提交 5991c844 编写于 作者: A Akinobu Mita 提交者: David S. Miller

[NET]: Rate limiting for socket allocation failure messages.

This patch limits the warning messages when socket allocation failures
happen. It happens under memory pressure.
Signed-off-by: NAkinobu Mita <mita@miraclelinux.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 99c7bc01
......@@ -1178,6 +1178,7 @@ static int __sock_create(int family, int type, int protocol, struct socket **res
*/
if (!(sock = sock_alloc())) {
if (net_ratelimit())
printk(KERN_WARNING "socket: no more sockets\n");
err = -ENFILE; /* Not exactly a match, but its the
closest posix thing */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册