From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933608AbcBQBe5 (ORCPT ); Tue, 16 Feb 2016 20:34:57 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35536 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933309AbcBQBez (ORCPT ); Tue, 16 Feb 2016 20:34:55 -0500 From: Nicolas Boichat To: Greg Kroah-Hartman Cc: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Riley Andrews , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, olofj@chromium.org, Lisa Du Subject: [RESEND PATCH] drivers: android: correct the size of struct binder_uintptr_t for BC_DEAD_BINDER_DONE Date: Wed, 17 Feb 2016 09:32:52 +0800 Message-Id: <1455672772-7646-1-git-send-email-drinkcat@chromium.org> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lisa Du There's one point was missed in the patch commit da49889deb34 ("staging: binder: Support concurrent 32 bit and 64 bit processes."). When configure BINDER_IPC_32BIT, the size of binder_uintptr_t was 32bits, but size of void * is 64bit on 64bit system. Correct it here. Signed-off-by: Lisa Du Signed-off-by: Nicolas Boichat --- This patch was first sent upstream here: https://lkml.org/lkml/2015/5/28/747, but was not picked up (probably because it was part of a bigger series that refactored binder). This patch fixes issues when using 64-bit binder API on 32-bit kernels. drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 796301a..16288e7 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2081,7 +2081,7 @@ static int binder_thread_write(struct binder_proc *proc, if (get_user(cookie, (binder_uintptr_t __user *)ptr)) return -EFAULT; - ptr += sizeof(void *); + ptr += sizeof(cookie); list_for_each_entry(w, &proc->delivered_death, entry) { struct binder_ref_death *tmp_death = container_of(w, struct binder_ref_death, work); -- 2.7.0.rc3.207.g0ac5344