[Patch 4/6] per task delay accounting taskstats interface: fixdrop listener only on socket close
From: Shailabh Nagar
Date: Tue Jul 11 2006 - 00:31:42 EST
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@xxxxxxxxxxxxxx>
Signed-Off-By: Balbir Singh <balbir@xxxxxxxxxx>
Signed-Off-By: Chandra Seetharaman <sekharan@xxxxxxxxxx>
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/