aboutsummaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-11-13 12:23:22 +0100
committerAdrian Bunk <bunk@kernel.org>2007-11-13 12:23:22 +0100
commit47d5d333edbb27fe52da914c606dbc894826bcf3 (patch)
tree8a6dd2033b2310984554baa26c726f8bd46e2f68 /ipc
parent624e4ff675005168e71d297185f4b75dbdf650af (diff)
[NETLINK]: Fix unicast timeouts
[ Upstream commit: c3d8d1e30cace31fed6186a4b8c6b1401836d89c ] Commit ed6dcf4a in the history.git tree broke netlink_unicast timeouts by moving the schedule_timeout() call to a new function that doesn't propagate the remaining timeout back to the caller. This means on each retry we start with the full timeout again. ipc/mqueue.c seems to actually want to wait indefinitely so this behaviour is retained. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mqueue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index fd2e26b6f96..5959d591ff7 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -990,6 +990,8 @@ asmlinkage long sys_mq_notify(mqd_t mqdes,
return -EINVAL;
}
if (notification.sigev_notify == SIGEV_THREAD) {
+ long timeo;
+
/* create the notify skb */
nc = alloc_skb(NOTIFY_COOKIE_LEN, GFP_KERNEL);
ret = -ENOMEM;
@@ -1018,8 +1020,8 @@ retry:
goto out;
}
- ret = netlink_attachskb(sock, nc, 0,
- MAX_SCHEDULE_TIMEOUT, NULL);
+ timeo = MAX_SCHEDULE_TIMEOUT;
+ ret = netlink_attachskb(sock, nc, 0, &timeo, NULL);
if (ret == 1)
goto retry;
if (ret) {