From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC0523D1710 for ; Thu, 30 Apr 2026 23:38:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777592341; cv=none; b=kS4nyoavbt4a6iHQWgE5Y/FZydheRnAMkrc57LCkE2SZsDawV+h3fSq9jL/1tQGZdGLfxpuhwWOMoveFOZ4STLNhOye5WjDdOpysHp8bQSL6x0BhcsSCY6GPvqy16s4NcnTfd341ZwIkjG9dr87nGtqjZMY+lpvF/KuOHY313Vs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777592341; c=relaxed/simple; bh=ebHuBoW02qHmf08ncQRJXUoPQIQLHDcgiezetLfnhO4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pC+QIUxCguH3x5I7VCECEaHis0yqzw3KFXPwASQCx22gGEGdB5nlqfqCvvZkRbvXSDxTQHeyvTdGs8JHMWEZ8VCDTBvz54Ymk6Uuvf/ZO4Vi8sqdEsioJxvpP4Y0f//hJhYFmLQuryunJRnyT7FUdla7s1NVDvvQ+ouoIL/+9xk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.160.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f195.google.com with SMTP id d75a77b69052e-50d7c12e48eso12296321cf.1 for ; Thu, 30 Apr 2026 16:38:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777592338; x=1778197138; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XI5s/gjPC8JmnFz7SoHnBZF2JdcqfzQbMV/kK5cvcdo=; b=Hwz99e7xeAPt9CO7FMs05rnMGenSgNe5w+ao+vXFETeFsQvqdchrJEvXgXsbkmKfvG 1twu9rgdNHbpdoAfGFB6rzrfL12MGckNkYQryJNnJluCTzRmWDtqBCt38uw2mW/pV07i y1+gUPPsD7Ek03aP3gSulQ4cZLEL0xzweXJF6uszdOwtxB2gYVsjJjMaiMmwQqc54AcK 0Fz/eO/5ShlxrA4/2AKAkm6XHlAxmiinx8E0hOOEFXwCBNESusy0EQ/nBprNqu+X3JJe p5OBR8/nbqrO+dsIaReGYqG3ANkUWY4tWypYyx5uGWM3gS0LkIiQyG+JDyn/JlOK1QR1 /92w== X-Forwarded-Encrypted: i=1; AFNElJ9iqWX1HzKwv2K9uxMh+9w9SauirCYJGmnzYQbXx4lcCTvE5SpJdei+ksm8ICtWBnqhYcvv0E24brWUBfo=@vger.kernel.org X-Gm-Message-State: AOJu0YzCFqcR6BMELcCqvrViR0eZiXtTBWgUu1AzNQHhULU4Atv/fAgp gHdlBW8oJf6w+V+S/co5ZS0w0QAtmbQBd8fAedsUquAnOkA6m8ig1UKS X-Gm-Gg: AeBDievpQT1vPcOTA26khJ8NlS1x6Y1fG0uJsTgYIhLLNZSPWSz3cZAP7UcrxdNyceq 26bMUxyKitBeOxulCJOhleTCUwHYfmNrnGhQqNBCk8a0n6JljtRHmfLZ0AgFoAeGzML6FzLg9wC cwAzDK38GO5kvcuq6EuOCBulyeGWpj1aW3k5KoBfPqd2Ex952Yp1gTtAWA+apCVYduxL/baJ+ki ZJOVmQeMCPRAaurcA9hZyIBpT+q7WR9354bxVhAGPBAQj0kdM8xSQGC1I+klKYUVOkbbsTK1MEa NCNePEyRukOtwXxEyH3lq1IJD2IMJ7hjMMETTKWO1Q0eOLaKzDGSZWJs3advUNtRU4xRWgZffJR PjMjvK/4iTL2ILDHWlDeS3WqFs7IkgAG37COPJxeOUIJwmN3KpK3b8ugBO79x8xjRczDuXbAkMu /yLEuo2l7bbNBXPcWKaCCc48h9fzT4WIUKE20618KSICtxaLjTo6kvk4seBuE5STAfTzTEb7Gdh RsaqSbE X-Received: by 2002:a05:622a:248d:b0:50f:bd19:657b with SMTP id d75a77b69052e-5102d13e8ddmr62263561cf.10.1777592338555; Thu, 30 Apr 2026 16:38:58 -0700 (PDT) Received: from im-t490s.redhat.com (89-24-32-159.nat.epc.tmcz.cz. [89.24.32.159]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-51040934199sm221cf.13.2026.04.30.16.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 16:38:58 -0700 (PDT) From: Ilya Maximets To: netdev@vger.kernel.org Cc: Aaron Conole , Eelco Chaudron , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , Yuan Tan , Yang Yang , dev@openvswitch.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Ilya Maximets Subject: [PATCH net v2 0/2] openvswitch: fix self-deadlock on release of tunnel vports Date: Fri, 1 May 2026 01:38:36 +0200 Message-ID: <20260430233848.440994-1-i.maximets@ovn.org> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Two patches - the fix for the actual bug and the selftest that reproduces it. I missed the self-deadlock in the original patch that introduced the issue, because testing required code modification in the ovs-vswitchd to force it to use legacy tunnel ports. I thought I made the change correctly, but apparently something went wrong and the tests were run with the standard LWT infra instead. The selftest added in this patch set will at least prevent this kind of mistakes in the future. I mentioned, however, that these tunnel vports are legacy and not actually used by ovs-vswitchd. RTM_NEWLINK + COLLECT_METADATA is used in conjunction with the standard OVS_VPORT_TYPE_NETDEV instead since 2017. The code to use the legacy tunnels still exists in ovs-vswitchd however, but only as a fallback for older kernels and we're planning to remove it in the next release. I'll be sending an RFC to remove support for these legacy tunnel types from the kernel, as they serve no real purpose today and only increase the uAPI surface for CVEs, but we need to fix the known bugs for stable versions. Version 2: - Added Ack from Eelco to the first patch (not to the second as it changed a little). - Removed now unused import socket in the dpctl.py [pylint/ruff]. - Regarding comments from both Sashiko instances on the selftest patch: * The background process is not waited for / not killed. If it hangs it will not be killable anyway, so it's not a problem. * The 'gre' choice for dpctl.py --ptype is not fully handled for --lwt. While this is not needed for this patch, I agree that it's not fully consistent. Added the proper handling in the TUNNEL_DEFAULTS loop in this version. * Python version concern for argparse.BooleanOptionalAction. Python 3.9 is the oldest supported version and it has it, so it's not an issue. Creating extra detection will only complicate the script with no real benefits. Version 1: https://lore.kernel.org/netdev/20260429151756.4157670-1-i.maximets@ovn.org/ Ilya Maximets (2): openvswitch: vport: fix self-deadlock on release of tunnel ports selftests: openvswitch: add tests for tunnel vport refcounting net/openvswitch/vport-netdev.c | 6 ++- .../selftests/net/openvswitch/openvswitch.sh | 37 +++++++++++++++++++ .../selftests/net/openvswitch/ovs-dpctl.py | 19 +++++++--- 3 files changed, 55 insertions(+), 7 deletions(-) -- 2.53.0