Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp254668pxx; Wed, 28 Oct 2020 04:12:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNQWhXfPY1tb3Zatbksgz1YK0kRnw6YSKjBWq7Fj8XGEHB+Bl6+6GQl+ySVtnFZeEH1fgW X-Received: by 2002:aa7:c0d2:: with SMTP id j18mr7441995edp.89.1603883552214; Wed, 28 Oct 2020 04:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603883552; cv=none; d=google.com; s=arc-20160816; b=qmmxvNqfpvuZHHQ2MIz0kdmrz1pGrK5173pZnJ0kAFCsgh+Zy4Yg/wjO5IaSqLq/T1 iAOTv0Ucj14Mu6kAzHR/oPNCUnwQCRftKGd94UGT5EPThYhOHuXm5rqLgQ2YRsjHvsr9 +FifprP0r/JVaIbvLkm3gYdPt4/OOT+7jJKUnsUqnRSwjmfOssJAKLTya53x6uszrDVS PBGlPFpM35Tw3JcYbSC3yIV70FebXDwBOi9NGsE42oxBA2aUWcroqXinVFE6UJ806a7r 7BQP8Y2kA08sYTcYqSczUZ/NLxXpF8LpIrx/dCtPFlorRWPvEUExIa2NxEWYEI0Bwuh8 3/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Mp0552yIeBjVgpaYIa0UovqGb3+8YWXebGmU/SDLyRw=; b=oKCre75241i7e7m9r0e9y/j3bkg0a+/kWsnWl6IIUwbddfufBpUmf6LYK+O8aX/ZxM HkHISdVTaPf+97q5itij/twkrsgMZTxhaX5lkdnVv3Qs8UvPoaXz7PR4E875b1/cXht8 tLxBBr3vxjIYOEXL74n73TvZMFsRwMA2i5C+p7GLlA6UZ3zFwh8s1gy4qxUA7dAk/JaU 7nOzKeV6Q19keBJx4zThFFyjpYzIvA0nqQZcnOpRldMjri2ycCOBXU0DBUG0sfOue0kH 4GQcwMbUf1jXq5v3o42ny2hh4Rlko3sk3kXEADBODTdDosAf4sVAMc6EaJs96oL6NBSy ngqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YT4gmkKX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gf17si2900638ejb.226.2020.10.28.04.12.10; Wed, 28 Oct 2020 04:12:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YT4gmkKX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1786806AbgJ0O75 (ORCPT + 99 others); Tue, 27 Oct 2020 10:59:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:49042 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1766459AbgJ0Osy (ORCPT ); Tue, 27 Oct 2020 10:48:54 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B0C83206E5; Tue, 27 Oct 2020 14:48:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810134; bh=xyi1kZoxi62/ou7uYIIQuK5NO3LHkBoAObP+ddndtds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YT4gmkKXhoIJ9J0i6mTLYKIGugLsqrc1KJfnJPB9iUHWhJqf4EGF29WRMjwzwfeOG 1qe5k2Qd4hqVYgQKHzjjIsNgo8Va+MaOdirtv3haQQnH+zUN2nrIYcT426zAoGvctb I7RYB9klBW3r7hlCJas1Et979xAZX5rTIJNQIhPI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vinay Kumar Yadav , Jakub Kicinski Subject: [PATCH 5.8 032/633] chelsio/chtls: fix socket lock Date: Tue, 27 Oct 2020 14:46:15 +0100 Message-Id: <20201027135524.210313512@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vinay Kumar Yadav [ Upstream commit 0fb5f0160a36d7acaa8e84ce873af99f94b60484 ] In chtls_sendpage() socket lock is released but not acquired, fix it by taking lock. Fixes: 36bedb3f2e5b ("crypto: chtls - Inline TLS record Tx") Signed-off-by: Vinay Kumar Yadav Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/chelsio/chtls/chtls_io.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/chelsio/chtls/chtls_io.c +++ b/drivers/crypto/chelsio/chtls/chtls_io.c @@ -1240,6 +1240,7 @@ int chtls_sendpage(struct sock *sk, stru copied = 0; csk = rcu_dereference_sk_user_data(sk); cdev = csk->cdev; + lock_sock(sk); timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); err = sk_stream_wait_connect(sk, &timeo);