Skip to contentSkip to conversation

rseq: Delete duplicate if statement in rseq_virt_userspace_exit()

PATCH Applied Dan Carpenter 3 participants 3 messages Nov 18, 2025 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rseq: Delete duplicate if statement in rseq_virt_userspace_exit()

This if statement is indented weirdly. It's a duplicate and doesn't affect runtime (beyond wasting a little time). Delete it.

---
This was introduced in commit 32034df66b5f ("rseq: Switch to TIF_RSEQ if supported") but it doesn't cause a bug, so there is no Fixes tag.

 include/linux/rseq.h | 1 -
 1 file changed, 1 deletion(-)
include/linux/rseq.h +0 -1
index b5e4803c4ebe..bf8a6bf315f3 100644
@@ -126,7 +126,6 @@ static inline void rseq_force_update(void)
  */
 static inline void rseq_virt_userspace_exit(void)
 {
-	if (current->rseq.event.sched_switch)
 	/*
 	 * The generic optimization for deferring RSEQ updates until the next
 	 * exit relies on having a dedicated TIF_RSEQ.
Signature · 1 line
2.51.0
merge bot Applied
#1 lore raw
The following commit has been merged into the core/rseq branch of tip:

The following commit has been merged into the core/rseq branch of tip:

Commit-ID:     80adaccf0e1c8c8fff44be2d959f6dba80af0491
Gitweb:        https://git.kernel.org/tip/80adaccf0e1c8c8fff44be2d959f6dba80af0491
Author:        Dan Carpenter <[email protected]>
AuthorDate:    Tue, 18 Nov 2025 13:52:13 +03:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Tue, 18 Nov 2025 15:56:55 +01:00

rseq: Delete duplicate if statement in rseq_virt_userspace_exit()

This if statement is indented weirdly. It's a duplicate and doesn't affect runtime (beyond wasting a little time). Delete it.

---
 include/linux/rseq.h | 1 -
 1 file changed, 1 deletion(-)
include/linux/rseq.h +0 -1
index b5e4803..bf8a6bf 100644
@@ -126,7 +126,6 @@ static inline void rseq_force_update(void)
  */
 static inline void rseq_virt_userspace_exit(void)
 {
-	if (current->rseq.event.sched_switch)
 	/*
 	 * The generic optimization for deferring RSEQ updates until the next
 	 * exit relies on having a dedicated TIF_RSEQ.
#2 lore raw
In reply to Dan Carpenter
Quoted 2 lines · Dan Carpenter

This if statement is indented weirdly. It's a duplicate and doesn't affect runtime (beyond wasting a little time). Delete it.

It's actually optimized out by the compiler in both cases, but yes that's an odd one and likely a reject fixup artifact.

Thanks for detecting it!