mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
[NETLINK]: Fix unicast timeouts
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>
This commit is contained in:
parent
230140cffa
commit
c3d8d1e30c
3 changed files with 10 additions and 8 deletions
|
@ -1010,6 +1010,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;
|
||||
|
@ -1038,8 +1040,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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue