From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 9A882429817 for ; Thu, 9 Jul 2026 15:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783612095; cv=none; b=ZXPxuF645KbgkFBiyH+KoAJfv9AP+pvzuF6pCVMSVBhuyhW9GG7mmqFdZ0uuWCdJ6r9NVrYRzQlTAGcE0+wVBi/MCw6tpdt4PnEFzTSjOIOH/8qcR5Ug2uaS5/4TaFDuA6ojbHC+1+bylJxQjMeg3O32tlXuBQlTXizYdJF3Pp0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783612095; c=relaxed/simple; bh=1MkQe1sQSCJFr++J1/4jB+AJVcNDiQ/KelgtPEM6mkE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SmBnfVxUXvibsb8bcL6oPge1kuxERflgOQolvqdYwY7YRQkvAPeZOrUmUp+shqjzKfsQFrr4Wxycr+Tkx7EqMbCZwfPQMOF8sXIJzzsfWqVQ3gmsKhlXN9tsIa9o8+bRXnbYlSQBwT/LYfz0+3xhEIEnyc2CGKQDwXVXWsnqJpI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=Yjl0q1+X; arc=none smtp.client-ip=209.85.219.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="Yjl0q1+X" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-8f23e851626so312696d6.3 for ; Thu, 09 Jul 2026 08:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1783612092; x=1784216892; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=1MkQe1sQSCJFr++J1/4jB+AJVcNDiQ/KelgtPEM6mkE=; b=Yjl0q1+Xpik6cUYeFMgWv2Nizx2mTPWP89+r2kpZ9wemygWACy3McJeoAyVB7G31uA VZsiuelysCy2aNJ/OtqPuTsfVFJ4gwx2eS1mg+aq+cj/CgxOTsbm34wQsqNW4p01RRsy jgh2I+OWNKaya29Sk+3FN98NrzdSodfxUboDfnbmJDI/mWfYG43unftqRqKK6R9izyG/ gHnXtowClp+6TsODZ3n6g0vTGOV7NBCm6XLIHLKf5NPIAlSUUOZ23A2An9wWUpTJ2rCe rMh4s2XfBzEks0nKmJEktde2YhMsf7wJZHMK414JunYtIcxewrjn4LG/EtipkgzxHSdL xtEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783612092; x=1784216892; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=1MkQe1sQSCJFr++J1/4jB+AJVcNDiQ/KelgtPEM6mkE=; b=GaDpasF1wMXRBxBK6N6BNzXwZ+8wI0Obbaire1iulHHjIxwgENVrh3gvYpWdut3FiN QnskNSSGLCoOiMhTsyBfMR4WmsRTkw3j8uA7fvI6C1okSjr9dd82px/mfJHTZZ5a3Oxp NOnbvRDWnQWUH4Zcjo+d+aGuWVRFl0MjsBBwEzfPIXZWg8C2cGrjUo5ObXoHcCnf5udI UlmJJmJJbJIpQtMJiTXkjRPD/eXcRSn9l5/h5ZqR1FHcfK249nZQkZXtc09k+ZclYJ9R 6NzIwWjQKyxq+FB/KJ1QsKVCo2uR1UZviPlZZzgfKnkvleKu0ycIE0g4wsd30lQO9V9x zq8g== X-Forwarded-Encrypted: i=1; AHgh+Rr947KmEJSklB9u+DXE0XPzYo3BapoAfeUwbeXEn0abNYtYeDtZIuHX5NSYxoU9Sv8Z/mz927xEAgRSutA=@vger.kernel.org X-Gm-Message-State: AOJu0Yy19nz6bqkYt/QPHuhiI5MYnY+L54uV4WDvhs2BvLqEecFuBo4M CgqJrUqsLCt6pXEbf4nd/uxZDUiIm2mefRDQQ4BYEXEnoYWGVFUwhaoOCZq/WxP4ELo= X-Gm-Gg: AfdE7cnqPyikBggopumqxiPgV7pugI4e+tXxRA/2Y/19Hf0z/bSD3VXy74YSHRddzxq WNXrvG0b79vyLjwYYynjp5IPW6ydzqieBjTJmURb8cYm2zSU52y/2FHHbRvgR7fa9ixT2YIFcLo nRHd1uKgk+pFzA8DOiZpJ0cyWSxZ59N1mXzRNAEiOmGJ1nvkAmTpKBRzHMF714+83JAUJ5WzRYk KuuPBxedCz1/5qsNRg/JNMEC/EIxtNyjRnjaSV9L8LhnMz6EQsSvAXTEe/izIBpMfc1hhsB+fwu 7qHBJ9fFJ+QnIFQ619NyyvQHdAchA1SJGRKbrNydj9SsmbO6wNnHcr6PrzCsHjGHWI4MpcmMo+t twp8dFb71jsFLjM+x2otSWmjAoTXL5UQPJPmdZtxLcqcoGY9WjU7IkWG4PPkmAa6U3MFlCME= X-Received: by 2002:a05:6214:2583:b0:8fd:6e12:9711 with SMTP id 6a1803df08f44-8fec49c8c2cmr84469526d6.63.1783612092026; Thu, 09 Jul 2026 08:48:12 -0700 (PDT) Received: from ziepe.ca ([159.2.72.92]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ffd50e0347sm20381976d6.2.2026.07.09.08.48.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 08:48:11 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1whqyw-000000057JY-2UoE; Thu, 09 Jul 2026 12:48:10 -0300 Date: Thu, 9 Jul 2026 12:48:10 -0300 From: Jason Gunthorpe To: Serhat Kumral Cc: yanjun.zhu@linux.dev, dsahern@kernel.org, leon@kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, syzbot+8c9eede336e3a843750e@syzkaller.appspotmail.com, zyjzyj2000@gmail.com Subject: Re: [PATCH] RDMA/rxe: rework per-net tunnel socket lifetime to fix refcount underflow Message-ID: <20260709154810.GK118978@ziepe.ca> References: <1a4f521b-796e-46a4-8992-dc5955e463b4@linux.dev> <20260706181404.6687-1-serhatkumral1@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260706181404.6687-1-serhatkumral1@gmail.com> On Mon, Jul 06, 2026 at 09:14:04PM +0300, Serhat Kumral wrote: > For that remaining window, instead of rtnl_lock() or a global mutex, > v2 makes rxe_net_del() idempotent per device with a test_and_set_bit() > in struct rxe_dev, so only the first invocation drops the pernet > socket references. This keeps the serialization at device granularity > without adding any global locking. If you would rather serialize > dellink itself, I am happy to respin that way. I'm not taking any bodges for this namespace stuff until it is rewritten not to use net ns notifiers. sockets need to be linked to GID entries and take their namespaces and addressing from the gid entries. This will fix all the lifetime issues. Jason