From: Vegard N. <veg...@gm...> - 2016-05-21 13:51:14
|
Hi people, I'm having some trouble with using current_thread_info() during UML early boot. Sometimes it works just fine, but often I get segfaults because current_thread_info() is returning an invalid pointer. It looks random: 0x202118, 0x1003e0003, 0xd33b90b3, 0x6db043, etc. I found an earlier thread which described the same problem: http://permalink.gmane.org/gmane.linux.uml.devel/14642 However, I think the patch there is a bit hacky/papers over an underlying bug, since it just uses is_kernel_addr() before deciding whether to return the pointer from current_thread_info() or not. The fact that the crash is random leads me to think it's some sort of race during the UML boot. Does anybody understand fully what's going on here, why it returns those invalid (seemingly random) values? If the problem is that we're on a wrong stack, can we switch stacks earlier during boot or something to make current_thread_info() always return a valid thread_info pointer? Thanks, Vegard |