lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 17 Mar 2015 08:35:01 +0100 From: Peter Zijlstra <peterz@...radead.org> To: Eric Dumazet <eric.dumazet@...il.com> Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] inet: Clean up inet_csk_wait_for_connect() vs. might_sleep() On Mon, Mar 16, 2015 at 12:19:24PM -0700, Eric Dumazet wrote: > > In commit 26cabd31259ba43f68026ce3f62b78094124333f > Peter added a sched_annotate_sleep() in sk_wait_event() > > Is the following patch needed as well ? Yes this is fine. If we had indeed gone through the schedule and got woken we'd have had TASK_RUNNING here, also when we retry the loop the prepare_to_wait call will (re)set the TASK_INTERRUPTIBLE state. Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org> > Signed-off-by: Eric Dumazet <edumazet@...gle.com> > --- > net/ipv4/inet_connection_sock.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c > index 14d02ea905b6..3e44b9b0b78e 100644 > --- a/net/ipv4/inet_connection_sock.c > +++ b/net/ipv4/inet_connection_sock.c > @@ -268,6 +268,7 @@ static int inet_csk_wait_for_connect(struct sock *sk, long timeo) > release_sock(sk); > if (reqsk_queue_empty(&icsk->icsk_accept_queue)) > timeo = schedule_timeout(timeo); > + sched_annotate_sleep(); > lock_sock(sk); > err = 0; > if (!reqsk_queue_empty(&icsk->icsk_accept_queue)) > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists