Skip to content

Commit 170d1a3

Browse files
Carlos Llamasgregkh
authored andcommitted
binder: fix offset calculation in debug log
The vma start address should be substracted from the buffer's user data address and not the other way around. Cc: Tiffany Y. Yang <ynaffit@google.com> Cc: stable <stable@kernel.org> Fixes: 162c797 ("binder: avoid user addresses in debug logs") Signed-off-by: Carlos Llamas <cmllamas@google.com> Reviewed-by: Tiffany Y. Yang <ynaffit@google.com> Link: https://lore.kernel.org/r/20250325184902.587138-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8e55352 commit 170d1a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/android/binder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6373,7 +6373,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m,
63736373
seq_printf(m, " node %d", buffer->target_node->debug_id);
63746374
seq_printf(m, " size %zd:%zd offset %lx\n",
63756375
buffer->data_size, buffer->offsets_size,
6376-
proc->alloc.vm_start - buffer->user_data);
6376+
buffer->user_data - proc->alloc.vm_start);
63776377
}
63786378

63796379
static void print_binder_work_ilocked(struct seq_file *m,

0 commit comments

Comments
 (0)