blob: b4f3e472370362b53f4dbd6b3ab4a50afb3f0981 [file] [log] [blame]
From 322d2f049391405403eaf5ecc93717120b9b3825 Mon Sep 17 00:00:00 2001
From: Steven Rostedt <srostedt@redhat.com>
Date: Fri, 3 Jul 2009 13:16:27 -0500
Subject: [PATCH] net: netlink workaround silly yield()
commit bf794775e976c2a059d8d88ef12715c91985a6c4 in tip.
Added test for rt_task(current) to avoid deadlock with RT task calling
sched_yield()
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <20090417132010.0191c749@torg>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
- ---
net/netlink/af_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 4c5972b..95826e0 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1074,7 +1074,7 @@ int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid,
return -ENOBUFS;
if (info.delivered) {
- if (info.congested && (allocation & __GFP_WAIT))
+ if (info.congested && (allocation & __GFP_WAIT) && !rt_task(current))
yield();
return 0;
}
--
1.7.1.1