<feed xmlns='http://www.w3.org/2005/Atom'>
<title>g/linux.git/kernel/time/timer.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://bastion.nosebs.vip/g/linux.git/atom/kernel/time/timer.c?h=master</id>
<link rel='self' href='https://bastion.nosebs.vip/g/linux.git/atom/kernel/time/timer.c?h=master'/>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/'/>
<updated>2026-10-26T03:54:02Z</updated>
<entry>
<title>Merge tag 'timers-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2026-10-26T03:54:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-26T03:54:02Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=ed2bc044a7c8c9759bbe1165b8e487d07dd53b73'/>
<id>urn:sha1:ed2bc044a7c8c9759bbe1165b8e487d07dd53b73</id>
<content type='text'>
Pull timer fixes from Ingo Molnar:

 - Clear timer_base::pending_map on CPU hot-unplug, that can
   cause temporal timeout processing anomalous on the next
   hot-replug (Liang Hao)

 - Fix PID refcount leak in the posix-cpu-timers do_cpu_nanosleep()
   signal path (Cen Zhang)

 - Require (CAP_SYS_TIME) permission to set auxiliary clocks
   via aux_clock_set() (Daehyeon Ko)

 - Update offsets on sequence counter retry in
   ktime_get_update_offsets_now() (Thomas Weißschuh)

* tag 'timers-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Update offsets on sequence counter retry in ktime_get_update_offsets_now()
  timekeeping: Require permission to set auxiliary clocks
  posix-cpu-timers: Fix pid refcount leak in do_cpu_nanosleep() signal path
  timers: Clear pending_map on CPU hotplug
</content>
</entry>
<entry>
<title>timers: Clear pending_map on CPU hotplug</title>
<updated>2026-10-20T13:28:14Z</updated>
<author>
<name>Liang Hao</name>
<email>haohlliang@gmail.com</email>
</author>
<published>2026-09-30T06:36:21Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=e7cad586d73276cbd4466de81b2092287d7475c0'/>
<id>urn:sha1:e7cad586d73276cbd4466de81b2092287d7475c0</id>
<content type='text'>
CPU hotplug migration leaves pending_map bits set on the outgoing CPU
while its wheel vectors are empty. After re-online, a later next_expiry
recalc can treat those empty buckets as pending and temporarily pull
next_expiry forward until collect drains the bits.

Clear pending_map under the base lock after migration in timers_dead_cpu().

Fixes: 500462a9de65 ("timers: Switch to a non-cascading wheel")
Signed-off-by: Liang Hao &lt;haohlliang@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260930063621.37740-1-haohlliang@gmail.com
</content>
</entry>
<entry>
<title>timers: Mark racy updates to hlist_node::pprev field</title>
<updated>2026-09-29T19:07:15Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2026-09-19T00:25:22Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=1159ad0a6aaa414dc726a33ccdcb702752d1b8eb'/>
<id>urn:sha1:1159ad0a6aaa414dc726a33ccdcb702752d1b8eb</id>
<content type='text'>
hlist_unhashed_lockless() locklessly samples the hlist_node structure's
pprev field, but detach_timer(), hlist_move_list(), and hlist_splice_init()
all use plain C-language stores to update this field, despite the "The
READ_ONCE() is paired with the various WRITE_ONCE() in hlist helpers that
are defined below" in the hlist_unhashed_lockless() header comment.

Therefore use WRITE_ONCE() for these hlist_node::pprev updates.

KCSAN located this issue.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260919002523.3133928-1-paulmck@kernel.org
</content>
</entry>
<entry>
<title>timer: Keep debugobjects state consistent in migrate_timer_list()</title>
<updated>2026-08-18T08:51:43Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@kernel.org</email>
</author>
<published>2026-08-17T22:14:57Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=c793bbfc4a0a9f5a66978fc91559e9681748dbeb'/>
<id>urn:sha1:c793bbfc4a0a9f5a66978fc91559e9681748dbeb</id>
<content type='text'>
When timers are migrated away from an offline CPU the debugobjects state
gets corrupted. The timer is accounted as inactive on deletion, but the
enqueue on the alive CPU lacks the activation call.

That used to work, but got broken when the trace point and the debug
objects call got separated. That change missed to fixup
migrate_timer_list().

Add the missing debug_timer_activate() invocation to fix it.

Fixes: dc1e7dc5ac62 ("timer: Move trace point to get proper index")
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/87bjb0l7ha.ffs@fw13
</content>
</entry>
<entry>
<title>hrtimer: Return ktime_t from hrtimer_get_next_event()/hrtimer_next_event_without()</title>
<updated>2026-05-06T06:33:09Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-05-04T06:56:10Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=3af1f49f415dcac8c0df8bfc593df0371c219876'/>
<id>urn:sha1:3af1f49f415dcac8c0df8bfc593df0371c219876</id>
<content type='text'>
These functions really work in terms of ktime_t and not u64.

Change their return types and adapt the callers.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260504-hrtimer-next_event-v2-1-7a5d0550b42f@linutronix.de
</content>
</entry>
<entry>
<title>timers: Get this_cpu once while clearing the idle state</title>
<updated>2026-03-24T22:21:30Z</updated>
<author>
<name>Shrikanth Hegde</name>
<email>sshegde@linux.ibm.com</email>
</author>
<published>2026-03-23T19:36:30Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=551e49beb1752387aed09eb2a0ea4c82ed1f3a35'/>
<id>urn:sha1:551e49beb1752387aed09eb2a0ea4c82ed1f3a35</id>
<content type='text'>
Calling smp_processor_id() on:
- In CONFIG_DEBUG_PREEMPT=y, if preemption/irq is disabled, then it does
not print any warning.
- In CONFIG_DEBUG_PREEMPT=n, it doesn't do anything apart from getting
__smp_processor_id

So with both CONFIG_DEBUG_PREEMPT=y/n, in preemption disabled section it is
better to cache the value. It saves a few cycles. Though tiny, repeated
adds up.

timer_clear_idle() is called with interrupts disabled. So cache the value
once.

Signed-off-by: Shrikanth Hegde &lt;sshegde@linux.ibm.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Reviewed-by: Mukesh Kumar Chaurasiya (IBM) &lt;mkchauras@gmail.com&gt;
Link: https://patch.msgid.link/20260323193630.640311-5-sshegde@linux.ibm.com
</content>
</entry>
<entry>
<title>cpufreq: ondemand: Simplify idle cputime granularity test</title>
<updated>2026-01-28T21:24:58Z</updated>
<author>
<name>Frederic Weisbecker</name>
<email>frederic@kernel.org</email>
</author>
<published>2026-01-28T16:05:27Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=a554a25e66efea0b78fb3d24f4f19289e037c0dc'/>
<id>urn:sha1:a554a25e66efea0b78fb3d24f4f19289e037c0dc</id>
<content type='text'>
cpufreq calls get_cpu_idle_time_us() just to know if idle cputime
accounting has a nanoseconds granularity.

Use the appropriate indicator instead to make that deduction.

Signed-off-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Link: https://patch.msgid.link/aXozx0PXutnm8ECX@localhost.localdomain
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'core-core-2025-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2025-12-02T18:18:49Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-12-02T18:18:49Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=7f8d5f70fffe2177afcc62f02feead5827dfe8dd'/>
<id>urn:sha1:7f8d5f70fffe2177afcc62f02feead5827dfe8dd</id>
<content type='text'>
Pull core irq cleanup from Thomas Gleixner:
 "Tree wide cleanup of the remaining users of in_irq() which got
  replaced by in_hardirq() and marked deprecated in 2020"

* tag 'core-core-2025-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  treewide: Remove in_irq()
</content>
</entry>
<entry>
<title>timers: Fix NULL function pointer race in timer_shutdown_sync()</title>
<updated>2025-11-22T21:55:26Z</updated>
<author>
<name>Yipeng Zou</name>
<email>zouyipeng@huawei.com</email>
</author>
<published>2025-11-22T09:39:42Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=20739af07383e6eb1ec59dcd70b72ebfa9ac362c'/>
<id>urn:sha1:20739af07383e6eb1ec59dcd70b72ebfa9ac362c</id>
<content type='text'>
There is a race condition between timer_shutdown_sync() and timer
expiration that can lead to hitting a WARN_ON in expire_timers().

The issue occurs when timer_shutdown_sync() clears the timer function
to NULL while the timer is still running on another CPU. The race
scenario looks like this:

CPU0					CPU1
					&lt;SOFTIRQ&gt;
					lock_timer_base()
					expire_timers()
					base-&gt;running_timer = timer;
					unlock_timer_base()
					[call_timer_fn enter]
					mod_timer()
					...
timer_shutdown_sync()
lock_timer_base()
// For now, will not detach the timer but only clear its function to NULL
if (base-&gt;running_timer != timer)
	ret = detach_if_pending(timer, base, true);
if (shutdown)
	timer-&gt;function = NULL;
unlock_timer_base()
					[call_timer_fn exit]
					lock_timer_base()
					base-&gt;running_timer = NULL;
					unlock_timer_base()
					...
					// Now timer is pending while its function set to NULL.
					// next timer trigger
					&lt;SOFTIRQ&gt;
					expire_timers()
					WARN_ON_ONCE(!fn) // hit
					...
lock_timer_base()
// Now timer will detach
if (base-&gt;running_timer != timer)
	ret = detach_if_pending(timer, base, true);
if (shutdown)
	timer-&gt;function = NULL;
unlock_timer_base()

The problem is that timer_shutdown_sync() clears the timer function
regardless of whether the timer is currently running. This can leave a
pending timer with a NULL function pointer, which triggers the
WARN_ON_ONCE(!fn) check in expire_timers().

Fix this by only clearing the timer function when actually detaching the
timer. If the timer is running, leave the function pointer intact, which is
safe because the timer will be properly detached when it finishes running.

Fixes: 0cc04e80458a ("timers: Add shutdown mechanism to the internal functions")
Signed-off-by: Yipeng Zou &lt;zouyipeng@huawei.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20251122093942.301559-1-zouyipeng@huawei.com
</content>
</entry>
<entry>
<title>treewide: Remove in_irq()</title>
<updated>2025-10-24T19:39:27Z</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2025-10-24T18:06:51Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=70e0a80a1f3580ccf5bc1f34dbb433c67d9d8d00'/>
<id>urn:sha1:70e0a80a1f3580ccf5bc1f34dbb433c67d9d8d00</id>
<content type='text'>
This old alias for in_hardirq() has been marked as deprecated since
2020; remove the stragglers.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://patch.msgid.link/20251024180654.1691095-1-willy@infradead.org
</content>
</entry>
</feed>
