File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -34,23 +34,22 @@ unsigned long profile_pc(struct pt_regs *regs)
3434{
3535 unsigned long pc = instruction_pointer (regs );
3636
37- #ifdef CONFIG_SMP
3837 if (!user_mode_vm (regs ) && in_lock_functions (pc )) {
3938#ifdef CONFIG_FRAME_POINTER
4039 return * (unsigned long * )(regs -> bp + sizeof (long ));
4140#else
42- unsigned long * sp = (unsigned long * )& regs -> sp ;
43-
44- /* Return address is either directly at stack pointer
45- or above a saved flags. Eflags has bits 22-31 zero,
46- kernel addresses don't. */
41+ unsigned long * sp = (unsigned long * )regs -> sp ;
42+ /*
43+ * Return address is either directly at stack pointer
44+ * or above a saved flags. Eflags has bits 22-31 zero,
45+ * kernel addresses don't.
46+ */
4747 if (sp [0 ] >> 22 )
4848 return sp [0 ];
4949 if (sp [1 ] >> 22 )
5050 return sp [1 ];
5151#endif
5252 }
53- #endif
5453 return pc ;
5554}
5655EXPORT_SYMBOL (profile_pc );
Original file line number Diff line number Diff line change @@ -34,14 +34,16 @@ unsigned long profile_pc(struct pt_regs *regs)
3434{
3535 unsigned long pc = instruction_pointer (regs );
3636
37- /* Assume the lock function has either no stack frame or a copy
38- of flags from PUSHF
39- Eflags always has bits 22 and up cleared unlike kernel addresses. */
4037 if (!user_mode_vm (regs ) && in_lock_functions (pc )) {
4138#ifdef CONFIG_FRAME_POINTER
4239 return * (unsigned long * )(regs -> bp + sizeof (long ));
4340#else
4441 unsigned long * sp = (unsigned long * )regs -> sp ;
42+ /*
43+ * Return address is either directly at stack pointer
44+ * or above a saved flags. Eflags has bits 22-31 zero,
45+ * kernel addresses don't.
46+ */
4547 if (sp [0 ] >> 22 )
4648 return sp [0 ];
4749 if (sp [1 ] >> 22 )
You can’t perform that action at this time.
0 commit comments