lkml.org 
[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[Patch 4/6] per task delay accounting taskstats interface: fix drop listener only on socket close
From
Date
Remove listeners from per-cpu listener lists only if they've closed the
socket (resulting in an ECONNREFUSED failure of genetlink unicast).
For other errors returned by genlmsg_unicast like -EAGAIN which results
from the receiver's buffer having insufficient space, userspace gets an
ENOBUF warning and the kernel can continue.

Signed-Off-By: Shailabh Nagar <nagar@watson.ibm.com>
Signed-Off-By: Balbir Singh <balbir@in.ibm.com>
Signed-Off-By: Chandra Seetharaman <sekharan@us.ibm.com>

kernel/taskstats.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.18-rc1/kernel/taskstats.c
===================================================================
--- linux-2.6.18-rc1.orig/kernel/taskstats.c 2006-07-10 23:44:54.000000000 -0400
+++ linux-2.6.18-rc1/kernel/taskstats.c 2006-07-10 23:44:56.000000000 -0400
@@ -139,7 +139,7 @@ static int send_cpu_listeners(struct sk_
down_write(&listeners->sem);
list_for_each_entry_safe(s, tmp, &listeners->list, list) {
ret = genlmsg_unicast(skb, s->pid);
- if (ret) {
+ if (ret == -ECONNREFUSED) {
list_del(&s->list);
kfree(s);
rc = ret;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-11 06:35    [from the cache]
©2003-2011 Jasper Spaans