Messages in this thread | | | Date | Wed, 31 Oct 2012 23:45:23 +0100 | From | Robert Richter <> | Subject | Re: [PATCH] Sometimes, there is OOPS happened when we use oprofile. |
| |
On 31.10.12 14:33:17, H. Peter Anvin wrote: > I'm vaguely concerned about the following: > > + * To always return a non-null > + * stack pointer we fall back to regs as stack if no previous stack > + * exists. > > The logic being that if there is no stack pointer and the stack is > too empty, to simply assume regs point to the top of the stack? Is > this possible to ever be actually seen?
I discussed this with Steven too (https://lkml.org/lkml/2012/9/6/322) and we both had a bad feeling with returning a null pointer by kernel_stack_pointer() (implemented in version 1 of this patch). It could be null if tinfo->previous_esp is null (last stack). Not sure when this may happen.
So using regs as fallback seemed to be ok as this was in for years:
7b6c6c7 x86, 32-bit: fix kernel_trap_sp()
-Robert
| |