From nobody Mon Apr 6 12:00:31 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 6A59E39E185 for ; Mon, 30 Mar 2026 07:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774854558; cv=none; b=CXts3nhDWemtkZUT4T96vpxNIWD2F0gZrd21kNgGdy1b6VIzAV05Z31M29xOJjM28UvCE8PDJ3F3zA6yHNh15u/YZYe4cbaSeXIT3RE/sa2ZPUK/PtX1Oavg8khJ6Jm/lv2cV8SiwflODu791UyAa6sIMdsngO+TPK+J/X8LDkw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774854558; c=relaxed/simple; bh=szRAvN0/rc8UxKL6zx8cg9WFhjQWEPmkqVa0nN95DE4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DSBba/uThb4Nh/zRsLNj1S5Uldb3Qethfu6fgXy0yoQv6YJmqdZlJXHusngugQX0ZuymHa9I2H9RVMt0gdhWA8Lul7VCuXzY5XaqPOe6PjjUtbVVqrVLR0HBfsKZhjb2Gt0FbflrWwFSalWxOsgmnPtdWzOOMINb49swvpBw/w0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KSw3tzfO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=aVyU+o56; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KSw3tzfO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="aVyU+o56" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774854556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PeFWDRPH243pvH53i4qrJq4j0Y8a3TWu5xuYPQ+5Eb4=; b=KSw3tzfOGXbD/Ux74iKD9Lr0VcHYaAC64Qq/9TQ0esHi5gFo4IiGBMwRzqARjTmuhz1+SN 5crSzjRnt8WlFA7dqADMXcVsPTehJqL5p2yYWPx0AqWVvrWwFpsBYmRNqfK7ORj9W0E7C3 /iKko9p/xaSLND/m1f44j1fQbTV5J/MJTEFu/ekUBc/qVxIG0IvGrC7aQwa3ObqyBOyP65 mFz/UY3BOBcB3cCT/oLMc/LdLRUYZIZCjERYUylkRz9671+yy/ByNiefIW0ppbALuEtF2D ZxK94TPQATPXuzjKWHzJv1nhpT2QFgMeW4PHsKyJEhujeWjW+JsFMZ0AMTYRMQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774854556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PeFWDRPH243pvH53i4qrJq4j0Y8a3TWu5xuYPQ+5Eb4=; b=aVyU+o56pDivT7otTy+Jqgs6FpjudgK1wep4eGDUPTxR1g3fgk1ag1Cl6AqflkHmNPFXQ3 hg3PN6NBNtDiFIBA== Date: Mon, 30 Mar 2026 09:07:55 +0200 Subject: [PATCH 1/4] timens: Add a __free() wrapper for put_time_ns() 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260330-timens-cleanup-v1-1-936e91c9dd30@linutronix.de> References: <20260330-timens-cleanup-v1-0-936e91c9dd30@linutronix.de> In-Reply-To: <20260330-timens-cleanup-v1-0-936e91c9dd30@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1774854554; l=887; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=szRAvN0/rc8UxKL6zx8cg9WFhjQWEPmkqVa0nN95DE4=; b=9oYuB10tTnXf3UQJ1dxIoRoBHzPUMXOVtvD+L+CyYhZT0fGnU5y/eb5t8UciNUjbSUj3ZDa5x b7fxTNNn71YCvcGpc/q9wblnSWEHEH0gYZ2Xf07aY9PF0J58Wq8VuIc X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The wrapper will be used to simplify cleanups of 'struct time_namespace'. Signed-off-by: Thomas Wei=C3=9Fschuh --- include/linux/time_namespace.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/time_namespace.h b/include/linux/time_namespace.h index c1de21a27c34..58bd9728df58 100644 --- a/include/linux/time_namespace.h +++ b/include/linux/time_namespace.h @@ -8,6 +8,7 @@ #include #include #include +#include =20 struct user_namespace; extern struct user_namespace init_user_ns; @@ -171,4 +172,6 @@ static inline struct page *find_timens_vvar_page(struct= vm_area_struct *vma) } #endif /* CONFIG_TIME_NS_VDSO */ =20 +DEFINE_FREE(time_ns, struct time_namespace *, if (_T) put_time_ns(_T)) + #endif /* _LINUX_TIMENS_H */ --=20 2.53.0