Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5991c844 authored by Akinobu Mita's avatar Akinobu Mita Committed by David S. Miller
Browse files

[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: default avatarAkinobu Mita <mita@miraclelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 99c7bc01
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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 */