From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932621AbcASHuM (ORCPT ); Tue, 19 Jan 2016 02:50:12 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:45493 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932535AbcASHuJ (ORCPT ); Tue, 19 Jan 2016 02:50:09 -0500 Subject: Re: [PATCH RESEND] android: binder: Sanity check at binder ioctl To: Greg KH References: <1453175136-3351-1-git-send-email-puck.chen@hisilicon.com> <20160119073358.GA30483@kroah.com> CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , From: chenfeng Message-ID: <569DEA87.1020905@hisilicon.com> Date: Tue, 19 Jan 2016 15:49:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20160119073358.GA30483@kroah.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.192.172] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.569DEAAB.00E6,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d865b4abec9e873d9f4657d96bb4523c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/1/19 15:33, Greg KH wrote: > On Tue, Jan 19, 2016 at 11:45:36AM +0800, Chen Feng wrote: >> When a process fork a child process, we should not allow the >> child process use the binder which opened by parent process. >> >> But if the binder-object creater is a thread of one process who exit, >> the other thread can also use this binder-object normally. >> We can distinguish this by the member proc->tsk->mm. >> If the thread exit the tsk->mm will be NULL. >> >> proc->tsk->mm != current->mm && proc->tsk->mm >> >> So only allow the shared mm_struct to use the same binder-object and >> check the existence of mm_struct. >> >> Signed-off-by: Chen Feng >> Signed-off-by: Wei Dong >> Signed-off-by: Junmin Zhao >> Reviewed-by: Zhuangluan Su >> --- >> drivers/android/binder.c | 2 ++ >> 1 file changed, 2 insertions(+) > > Why resend? What changed from the previous version? > My fault, it's my error commit. mistake the current->mm with current->tsk->mm. The robot-compile finds out this error. > greg k-h > > . >