From nobody Sun Feb 8 18:43:59 2026 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:cbb9:0:0:0:0:0 with SMTP id v25csp221870jap; Wed, 10 Nov 2021 04:32:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJws5JLiMS+7giOsnRrmJm5D1AD695/+XjpCFj9ZpqyCQoBm1TBeAQsOihQmnT/3poSISY9g X-Received: by 2002:aca:1a05:: with SMTP id a5mr140498oia.146.1636547556246; Wed, 10 Nov 2021 04:32:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636547556; cv=none; d=google.com; s=arc-20160816; b=QUVoitTVjo49mZ0Qyr83mCcNAKhIclQ1dFfh2OO2kEcbY8crBpkHJrPPhuLF3Sdhyk HwnIvN3fT2wJQ7y+qZ7pPRmOetILsQ5oQYk7TIDS9Out24AuvYahMReUSrvHT6rQ4mZU uBaLXcUmcj9q7nXv3f0+kiTc/gM7/HPv1dY7UPHON2QTlX+5kk4XjNJfYqCyr98dXJsB imkbFla9bMy7/ck4aUSvHWXTMxD8dVrCjqcSZJKqYcuQKFViHjE76jaW8Ac5pck4B5z6 JwoDHCM4TwRIsKdvETIHFToHWeeE6YVytBwscQmCwcIlGD8W4neKbtCRN0DzgoT6nV08 uvbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=I4a/qbwOJYGo2JNdZdSHQulKDUGsFZfQ8BnGelwBCrE=; b=JIdKfiW4IQvm+JijihnGJ6b8/TjsQKmZLJfmRN/xIYZD+Pzmk/3RvU+tCXXlRCmAAW Bn1tbDHBYE7t2aClGpP+l0Z10Z0uvJzBQ8hrC0SrFdeCrb8RTmNtEFdgZVGKiubSZIP0 dFwuUgdpYs8/mLV1aNMiWZud6Ep6vkAiMb1yRqmv+meFlCAq75I6wpr5NOGnQgJpXxUS J5n67sr8g4wXtAFqO1OZbCbV+KFm7Ch4kl6NBTOQpzQmyor0nnOSOq9Eu8CLng4w5QDr J22Uh0Pn3DOsofODIRHh/+KxgMpbvGmoFaOzgyDtqUZbggk8lQowzGbQjjs7Hio+CBVi fPLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AcOdUPbv; spf=pass (google.com: domain of mptcp+bounces-2401-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1:3600::1 as permitted sender) smtp.mailfrom="mptcp+bounces-2401-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ewr.edge.kernel.org (ewr.edge.kernel.org. [2604:1380:1:3600::1]) by mx.google.com with ESMTPS id 2si32455874otg.134.2021.11.10.04.32.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Nov 2021 04:32:36 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-2401-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1:3600::1 as permitted sender) client-ip=2604:1380:1:3600::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AcOdUPbv; spf=pass (google.com: domain of mptcp+bounces-2401-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1:3600::1 as permitted sender) smtp.mailfrom="mptcp+bounces-2401-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ewr.edge.kernel.org (Postfix) with ESMTPS id AD8841C0F3D for ; Wed, 10 Nov 2021 12:32:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6A272C87; Wed, 10 Nov 2021 12:32:33 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 697C529CA for ; Wed, 10 Nov 2021 12:32:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636547550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I4a/qbwOJYGo2JNdZdSHQulKDUGsFZfQ8BnGelwBCrE=; b=AcOdUPbvXcU49LZ/1yKwT7Y4tP20RN7xvvaV88QpSrUgbo8AD3b1Qx4zdc0qQSF1rycdH0 8h3fLMArGhIxbP4PXOIJw2xIf9aldYxp93dkZpNmmjIpMqxqp86q5eByVl9LwIBDgxnU2l X3eh6cdkS15SICmahIQ0oNXamWmqCqY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-415-yCxyzpEGNi2dg2V2HazmSA-1; Wed, 10 Nov 2021 07:32:29 -0500 X-MC-Unique: yCxyzpEGNi2dg2V2HazmSA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6ACC21006AA3 for ; Wed, 10 Nov 2021 12:32:28 +0000 (UTC) Received: from gerbillo.fritz.box (unknown [10.39.194.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id CBD8560843 for ; Wed, 10 Nov 2021 12:32:27 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Subject: [PATCH net-next 1/7] mptcp: keep snd_una updated for fallback socket Date: Wed, 10 Nov 2021 13:31:34 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pabeni@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" After shutdown, for fallback MPTCP sockets, we always have write_seq =3D=3D snd_una+1 The above will foul OUTQ ioctl(). Keep snd_una in sync with write_seq even after shutdown. Signed-off-by: Paolo Abeni --- net/mptcp/protocol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 29b6f57b917e..3fef1b4e7780 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2690,6 +2690,7 @@ static void __mptcp_check_send_data_fin(struct sock *= sk) * state now */ if (__mptcp_check_fallback(msk)) { + WRITE_ONCE(msk->snd_una, msk->write_seq); if ((1 << sk->sk_state) & (TCPF_CLOSING | TCPF_LAST_ACK)) { inet_sk_state_store(sk, TCP_CLOSE); mptcp_close_wake_up(sk); --=20 2.33.1