uprobes: Change prepare_uretprobe() to (try to) flush the dead frames
authorOleg Nesterov <oleg@redhat.com>
Tue, 21 Jul 2015 13:40:23 +0000 (15:40 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 31 Jul 2015 08:38:05 +0000 (10:38 +0200)
commita5b7e1a89b820f2b9b23634ca4c59b555e8d9a0d
tree6c15eed109c9cc8982f428dc2d8a6b56b7aeb5fc
parent5eeb50de42fd3251845d03c556db012267c72b3f
uprobes: Change prepare_uretprobe() to (try to) flush the dead frames

Change prepare_uretprobe() to flush the !arch_uretprobe_is_alive()
return_instance's. This is not needed correctness-wise, but can help
to avoid the failure caused by MAX_URETPROBE_DEPTH.

Note: in this case arch_uretprobe_is_alive() can be false
positive, the stack can grow after longjmp(). Unfortunately, the
kernel can't 100% solve this problem, but see the next patch.

Tested-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Acked-by: Anton Arapov <arapov@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150721134023.GA4776@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/uprobes.c