From patchwork Tue Nov 5 17:05:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 1189854 X-Patchwork-Delegate: matthieu.baerts@tessares.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=2001:19d0:306:5::1; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=strlen.de Received: from ml01.01.org (ml01.01.org [IPv6:2001:19d0:306:5::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 476wyg3LTHz9sP3 for ; Wed, 6 Nov 2019 04:05:15 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4C89C100DC429; Tue, 5 Nov 2019 09:07:55 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a0a:51c0:0:12e:520::1; helo=chamillionaire.breakpoint.cc; envelope-from=fw@breakpoint.cc; receiver= Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4640D100DC42C for ; Tue, 5 Nov 2019 09:07:53 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1iS2GU-0000R9-95; Tue, 05 Nov 2019 18:05:10 +0100 From: Florian Westphal To: Cc: Florian Westphal Date: Tue, 5 Nov 2019 18:05:31 +0100 Message-Id: <20191105170531.30407-5-fw@strlen.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191105170531.30407-1-fw@strlen.de> References: <20191105170531.30407-1-fw@strlen.de> MIME-Version: 1.0 Message-ID-Hash: 7VUQBN2E4IJRZKJG3BJ5ONF7VI4RKGCQ X-Message-ID-Hash: 7VUQBN2E4IJRZKJG3BJ5ONF7VI4RKGCQ X-MailFrom: fw@breakpoint.cc X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH mptcp 4/4] poll: release lock before waiting List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: else, this can block kworker thread forever -- it needs to lock the mptcp socket, so we should not hold this lock when waiting for events. squashto: mptcp: add mptcp_poll Signed-off-by: Florian Westphal --- net/mptcp/protocol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 8cc9cc5675c2..53b1b015d9d4 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1229,7 +1229,9 @@ static __poll_t mptcp_poll(struct file *file, struct socket *sock, return ret; } + release_sock(sk); sock_poll_wait(file, sock, wait); + lock_sock(sk); mptcp_for_each_subflow(msk, subflow) { struct socket *tcp_sock;