summaryrefslogtreecommitdiffstats
path: root/net-netlink-workaround-silly-yield.patch
blob: 94eb1857a21408d8d7b4188ad7c9a6f69684ffa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 531cc1033a8373abdbf9c74c74d095d727168995 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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 net/netlink/af_netlink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7954243..9ecba5c 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1077,7 +1077,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.0.4