uprobes: Fix utask->depth accounting in handle_trampoline()
uprobes: Fix utask->depth accounting in handle_trampoline()

commit 878b5a6efd38030c7a90895dc8346e8fb1e09b4c upstream.

Currently utask->depth is simply the number of allocated/pending
return_instance's in uprobe_task->return_instances list.

handle_trampoline() should decrement this counter every time we
handle/free an instance, but due to typo it does this only if
->chained == T. This means that in the likely case this counter
is never decremented and the probed task can't report more than
MAX_URETPROBE_DEPTH events.

Reported-by: Mikhail Kulemin <14b25aba2d0d19fa1e8674c04ab4ee7085672c7c@ru.ibm.com>
Reported-by: Hemant Kumar Shaw <e724366d0eb03b3b532f151276b7d81de2fc3b02@linux.vnet.ibm.com>
Signed-off-by: Oleg Nesterov <20b70f0af00562e63758b9ee42012ecc96c58590@redhat.com>
Acked-by: Anton Arapov <14deb5e5e417133e888bf47bb6a3555c9bb7d81c@redhat.com>
Cc: 60fcdccfd958d359debfe6e6e7417cd7f1aaa9e3@hitachi.com
Cc: 1f69195f6d934d4caf5816234bde319316df237e@linux.vnet.ibm.com
Cc: 922727025a0cf43e784fa68f5f4f4f544f8fca4e@sourceware.org
Link: 5984e9ac524f90a7ea123d543000860fe091166c@redhat.com
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>


TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas