lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 27 Dec 2014 09:54:33 -0800
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: [PATCH net] netlink: call cond_resched after broadcasting updates

When a netlink event is posted to a socket, the receiving process maybe
waiting to wakeup. Reduce the latency by calling cond_resched() in this
loop. This reduces the problems with missed events during a netlink
storm such as when a routing daemon does mass update in response to
a link transition.

Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>


--- a/net/netlink/af_netlink.c	2014-12-27 09:43:06.705792634 -0800
+++ b/net/netlink/af_netlink.c	2014-12-27 09:43:06.705792634 -0800
@@ -1983,8 +1983,10 @@ int netlink_broadcast_filtered(struct so
 
 	netlink_lock_table();
 
-	sk_for_each_bound(sk, &nl_table[ssk->sk_protocol].mc_list)
+	sk_for_each_bound(sk, &nl_table[ssk->sk_protocol].mc_list) {
 		do_one_broadcast(sk, &info);
+		cond_resched();
+	}
 
 	consume_skb(skb);
 
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ