Message ID | 20210215152717.106683626@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6F20C433E6 for <stable@archiver.kernel.org>; Mon, 15 Feb 2021 15:35:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F5E964E68 for <stable@archiver.kernel.org>; Mon, 15 Feb 2021 15:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231266AbhBOPfk (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 15 Feb 2021 10:35:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:45562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231370AbhBOPdE (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 15 Feb 2021 10:33:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 825DC64E40; Mon, 15 Feb 2021 15:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403036; bh=NOyyeL77NUTv98Y848xGO+3HSM9x62gtqcGywx7QLbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NhVZdQBXd2toEh0MHjFa/LAw3Gbm887K5uuN+46SWn3YHzJAfjfi0ZB7aK2hHTXhV rnAPQmsO2bzjJlrlLHcHgxbpZk5l4dTK1BqC0ZV6Try2bScNaMia6s5y2zODKYeCDE /cnLNpoj8Aj9j7h+IyTH/ENQNLCq0YjaSER3Btfk= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Eric Dumazet <eric.dumazet@gmail.com>, Norbert Slusarek <nslusarek@gmx.net>, Stefano Garzarella <sgarzare@redhat.com>, Jakub Kicinski <kuba@kernel.org> Subject: [PATCH 5.4 54/60] net/vmw_vsock: improve locking in vsock_connect_timeout() Date: Mon, 15 Feb 2021 16:27:42 +0100 Message-Id: <20210215152717.106683626@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152715.401453874@linuxfoundation.org> References: <20210215152715.401453874@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: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1099,7 +1099,6 @@ static void vsock_connect_timeout(struct { struct sock *sk; struct vsock_sock *vsk; - int cancel = 0; vsk = container_of(work, struct vsock_sock, connect_work.work); sk = sk_vsock(vsk); @@ -1110,11 +1109,9 @@ static void vsock_connect_timeout(struct sk->sk_state = TCP_CLOSE; sk->sk_err = ETIMEDOUT; sk->sk_error_report(sk); - cancel = 1; + vsock_transport_cancel_pkt(vsk); } release_sock(sk); - if (cancel) - vsock_transport_cancel_pkt(vsk); sock_put(sk); }