Pull perf events fix from Ingo Molnar: "Fix a race in the user-callchains code" * tag 'perf-urgent-2026-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: sched: Fix perf crash with new is_user_task() helper
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -1776,6 +1776,11 @@ static __always_inline bool is_percpu_thread(void) · 1775 unmodified lines | |||
| 1776 | (current->nr_cpus_allowed == 1); | 1776 | (current->nr_cpus_allowed == 1); |
| 1777 | } | 1777 | } |
| 1778 | 1778 | ||
| 1779 | static __always_inline bool is_user_task(struct task_struct *task) | ||
| 1780 | { | ||
| 1781 | return task->mm && !(task->flags & (PF_KTHREAD | PF_USER_WORKER)); | ||
| 1782 | } | ||
| 1783 | |||
| 1779 | /* Per-process atomic flags. */ | 1784 | /* Per-process atomic flags. */ |
| 1780 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ | 1785 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ |
| 1781 | #define PFA_SPREAD_PAGE 1 /* Spread page cache over cpuset */ | 1786 | #define PFA_SPREAD_PAGE 1 /* Spread page cache over cpuset */ |