Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3548807pxb; Mon, 9 Nov 2020 14:19:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqBCM/j5Lz94rTi0OoSM8cZIxNJTopNngKhkErSJ09jE70Cg93GkoCiTxgOGCajRCgQGqL X-Received: by 2002:a17:906:a43:: with SMTP id x3mr17430890ejf.197.1604960395049; Mon, 09 Nov 2020 14:19:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604960395; cv=none; d=google.com; s=arc-20160816; b=gdvPpAJv6uXAlzuUhJYvXZjaxGI9STfiMhOGZdFCuWMlWhmbPpzcHfH6xgIFMyfOqW kBCcf6naSe/8fWekoMStcA4xD2ESt3J4KgB7oooItXWcCjkusEpYEKsHK3vg5hMwe2n1 DlIWVRNTIDhp/2PFJzcSldvOI/JNNquUeHUiVThFKnpPoweRWWLAUTY2Yb+RUu2iS8ak vOHJSuwROn9TyJ8t8JY+is0oNTtr0i8m3tIqfPKeXleCRcXGXjGyA2BWmYgTNh81BzRn GTxHXGChCdvh8KiAq8VpKUr//jmvlduDpeVaNRErj7734b83XxDd5qiDwV+nQWHJdmtA WVag== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=uaxUGN/SS1UHVFF8/OEixWgsEtXzrexHwF+MkygMVXk=; b=np07MG2WS6pJa0oJFFIAkZa5jKfOW0kXGP69Q6FyiKifSaCzNWZT9NxvZEvFEN/Ors +ynZHyeT1+6+ZbWufixxHblRI7GoXBee/cKgJfPc3HRjQluU6JabLJF849IaAuLjsN4i V5zTwcfdFTfpJ+pZ/a0CW9C9llr9aHLMxswIQmyS06ZllvFZ+P2TW36VuwibLzT/cDI0 aX1LsnK8fY/uNIWrFeGuvPZhRF5gEdQ36DwS3fnyCYb4vA74xZQIbL63TkK9oaZ5DS19 nlhne5jHyA1fBJ1YMOk/a85bjlty9fY9zoB6Tp6Dk9D0EsNOV8c8hdZ6MSBUVGb7QDl9 OTqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Iy5GLdn8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si7427881ejj.688.2020.11.09.14.19.29; Mon, 09 Nov 2020 14:19:55 -0800 (PST) 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=Iy5GLdn8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729878AbgKIWQB (ORCPT + 99 others); Mon, 9 Nov 2020 17:16:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:53414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729247AbgKIWQB (ORCPT ); Mon, 9 Nov 2020 17:16:01 -0500 Received: from kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net (unknown [163.114.132.3]) (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 DF8A4206A4; Mon, 9 Nov 2020 22:15:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604960160; bh=wyEF/89LIqKHZv6IedNWIxEpT4kusLHJIDPUrtjUI4Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Iy5GLdn84ESku7OZsVMmbtFtesJ3+Ms0aJ7ps8s04K4vm4h5XbKGiAhUIAhDBtPLg g65WzW8xgHGi4rVWwOowGzTcY3GJbXTUOmEIg6zUCJtLJydC7lu/+72TnOVEwwD/+D XrPNIiNuV/x5F+Ef2POjN7OjZGsHrUsfbLOYP6Mc= Date: Mon, 9 Nov 2020 14:15:53 -0800 From: Jakub Kicinski To: Thadeu Lima de Souza Cascardo Cc: Kleber Sacilotto de Souza , Eric Dumazet , netdev@vger.kernel.org, Gerrit Renker , "David S. Miller" , "Gustavo A. R. Silva" , "Alexander A. Klimov" , Kees Cook , Alexey Kodanev , dccp@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] dccp: ccid: move timers to struct dccp_sock Message-ID: <20201109141553.30e9d502@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <20201109213134.GR595944@mussarela> References: <20201013171849.236025-1-kleber.souza@canonical.com> <20201013171849.236025-2-kleber.souza@canonical.com> <20201016153016.04bffc1e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201109114828.GP595944@mussarela> <20201109094938.45b230c9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201109210909.GQ595944@mussarela> <20201109131554.5f65b2fa@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> <20201109213134.GR595944@mussarela> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Nov 2020 18:31:34 -0300 Thadeu Lima de Souza Cascardo wrote: > > Which paths are those (my memory of this code is waning)? I thought > > disconnect is only called from the user space side (shutdown syscall). > > The only other way to terminate the connection is to close the socket, > > which Eric already fixed by postponing the destruction of ccid in that > > case. > > dccp_v4_do_rcv -> dccp_rcv_established -> dccp_parse_options -> > dccp_feat_parse_options -> dccp_feat_handle_nn_established -> > dccp_feat_activate -> __dccp_feat_activate -> dccp_hdlr_ccid -> > ccid_hc_tx_delete Well, that's not a disconnect path. There should be no CCID on a disconnected socket, tho, right? Otherwise if we can switch from one active CCID to another then reusing a single timer in struct dccp_sock for both is definitely not safe as I explained in my initial email.