netlink workaround silly yield()
PATCH 1/1 netlink workaround silly yield()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thomas,
Below is a patch we added to avoid deadlocks in certain RT JVM cases. The original was authored by rostedt and was modified further by acme. This version applies to 2.6.29.1-rt7.
Clark
Added test for rt_task(current) to avoid deadlock with RT task calling sched_yield()
Author: Steven Rostedt <[email protected]>
- ---
net/netlink/af_netlink.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/netlink/af_netlink.c +0 -0
- --- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1046,7 +1046,7 @@ int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid,
kfree_skb(info.skb2);
if (info.delivered) {
- - if (info.congested && (allocation & __GFP_WAIT))
+ if (info.congested && (allocation & __GFP_WAIT) && !rt_task(current))
yield();
return 0;
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
iEYEARECAAYFAknoyF4ACgkQHyuj/+TTEp2goQCg02BMYUrzs1R+P6WCrAQ32epX WFAAn2K5VXIQ9lwpcWFv8Ge6R0Lv2CC3
=bnHl
-----END PGP SIGNATURE-----