From nobody Wed Feb 11 06:28:38 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6A3CB1487E9 for ; Sat, 15 Nov 2025 09:13:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763198007; cv=none; b=WKCyQYQwSIeVy0chLOM2DgReamvUn+J8wnio5MIxH6c8MkulLPOHB0riEaDltSOk5A3ALz+uXZewbFQ/KBc+Cb6+IrZEIBJqONW7hcOcHAzcRcMCDGt70pMEk8/IDO2nRNS1UHBMeEBgHF8r8gQ+2+lV9jT81/eA8YRheuvHuy8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763198007; c=relaxed/simple; bh=n+qCl3X6iNspo1iVve2Cx8v9QIClJx1mxGdONXGhcHw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=e3mWowibE67kuQoVBYdQBVxKF1DEGSC0vtCAosCQfI/R2FzWgs1EAxDUhhah22U9cSIGlaqhdJojElwp+fLTZvP1YPt6EsPbdL7GEWU2JDAAYr7S95kYilF+NDeD70+djCADx22mG7S2xp5CIPEJuBvekIaJVpxjvHKVwSNJZMY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sseVnwv5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sseVnwv5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4222C113D0; Sat, 15 Nov 2025 09:13:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763198006; bh=n+qCl3X6iNspo1iVve2Cx8v9QIClJx1mxGdONXGhcHw=; h=Date:From:To:Cc:Subject:From; b=sseVnwv5AyysWXDY3gnpmnH9uSuBRDjgEq6ZUm8VOcB87j/uMXi4Ha1qtEQEpr6UI JC+AZdVuwzyruaTk2nRcGY4ysfPRLEMUtsUeKF9I+F7zK8MgQv145RD9lkMYshxaV9 3+rvaVcqX/4xS0cOrBspeaTauqyiBJaaPOBidJ9DC5kidqmyZx8Yk6fQwMF4vboeIw YIaXMHRGIjlSx7nGG8w5LjeLN1Zox1X0hNh+bGvJpqY7ZvxBUmwe85H/H/HA1G3Px3 nsnEu7Qu+GcgBm7oeCZ7OVqvSg5vE0hz/1yCbC2CJwRUQNxkT0VRUuYfzMJAnGeV3B zizuGBVjXz6Rg== Date: Sat, 15 Nov 2025 10:13:22 +0100 From: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Peter Zijlstra , Andrew Morton , Daniel Lezcano , Anna-Maria Behnsen , Frederic Weisbecker Subject: [GIT PULL] timer subsystem fix Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Linus, Please pull the latest timers/urgent Git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-= 2025-11-15 # HEAD: e0fd4d42e27f761e9cc82801b3f183e658dc749d posix-timers: Plug pote= ntial memory leak in do_timer_create() Fix a memory leak in the posix timer creation logic. Thanks, Ingo ------------------> Eslam Khafagy (1): posix-timers: Plug potential memory leak in do_timer_create() kernel/time/posix-timers.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index aa3120104a51..56e17b625c72 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -475,12 +475,6 @@ static int do_timer_create(clockid_t which_clock, stru= ct sigevent *event, if (!kc->timer_create) return -EOPNOTSUPP; =20 - new_timer =3D alloc_posix_timer(); - if (unlikely(!new_timer)) - return -EAGAIN; - - spin_lock_init(&new_timer->it_lock); - /* Special case for CRIU to restore timers with a given timer ID. */ if (unlikely(current->signal->timer_create_restore_ids)) { if (copy_from_user(&req_id, created_timer_id, sizeof(req_id))) @@ -490,6 +484,12 @@ static int do_timer_create(clockid_t which_clock, stru= ct sigevent *event, return -EINVAL; } =20 + new_timer =3D alloc_posix_timer(); + if (unlikely(!new_timer)) + return -EAGAIN; + + spin_lock_init(&new_timer->it_lock); + /* * Add the timer to the hash table. The timer is not yet valid * after insertion, but has a unique ID allocated.