rate limiting for socket allocation failure messages
Subsystems (3)
PATCH 1/1 rate limiting for socket allocation failure messages
(Resending due to local mail server trouble)
This patch limits the warning messages when socket allocation failures happen. It happens under memory pressure.
Cc David Miller <[email protected]>
Signed-off-by Akinobu Mita <[email protected]>
net/socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/socket.c +2 -1
@@ -1178,7 +1178,8 @@ static int __sock_create(int family, int*/ if (!(sock =sock_alloc ())) { -printk (KERN_WARNING "socket: no more sockets\n" ); +if (net_ratelimit ()) +printk (KERN_WARNING "socket: no more sockets\n" ); err = -ENFILE ;/* Not exactly a match, but its the closest posix thing */ goto out;
David Miller
maintainerFrom: Akinobu Mita <[email protected]>
Date: Thu, 31 Aug 2006 18:59:21 +0900
Quoted 7 lines
(Resending due to local mail server trouble)
This patch limits the warning messages when socket allocation failures happen. It happens under memory pressure.
Cc David Miller <[email protected]>Signed-off-by Akinobu Mita <[email protected]>
Patch applied, thanks a lot.