From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH] msm: iommu: fix leak and invalid access Date: Tue, 28 May 2013 14:27:55 +0200 Message-ID: <20130528122754.GD2575@8bytes.org> References: <51931347.7020600@huawei.com> <519C5E8F.7060006@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <519C5E8F.7060006-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Libo Chen Cc: ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org, joerg.roedel-5C7GfCeVMHo@public.gmane.org, LKML , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org, davidb-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Wed, May 22, 2013 at 01:58:39PM +0800, Libo Chen wrote: > > > > This patch merge two patch that I sended before: > > 1. msm: iommu: add missing platform_device_unregister() in err case > > 2. msm: iommu: no need kfree before kzalloc successful > > > > It fixes two obvious problems: > > 1. We have registered msm_iommu_driver first, and need unregister it when > > registered msm_iommu_ctx_driver fail > > > > 2. We don`t need to kfree drvdata before kzalloc successful > > > > Signed-off-by: Libo Chen > > --- > > drivers/iommu/msm_iommu_dev.c | 11 +++++------ > > 1 files changed, 5 insertions(+), 6 deletions(-) Has this patch already been handled? If not please resend it to me and I will take care of it. Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933866Ab3E1M17 (ORCPT ); Tue, 28 May 2013 08:27:59 -0400 Received: from 8bytes.org ([85.214.48.195]:59015 "EHLO mail.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933818Ab3E1M15 (ORCPT ); Tue, 28 May 2013 08:27:57 -0400 Date: Tue, 28 May 2013 14:27:55 +0200 From: Joerg Roedel To: Libo Chen Cc: ohad@wizery.com, joerg.roedel@amd.com, davidb@codeaurora.org, LKML , Varun.Sethi@freescale.com, iommu@lists.linux-foundation.org, mingo@kernel.org, ddutile@redhat.com Subject: Re: [PATCH] msm: iommu: fix leak and invalid access Message-ID: <20130528122754.GD2575@8bytes.org> References: <51931347.7020600@huawei.com> <519C5E8F.7060006@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <519C5E8F.7060006@huawei.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue May 28 14:27:56 2013 X-DSPAM-Confidence: 0.9987 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 51a4a2cc20865721246468 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 22, 2013 at 01:58:39PM +0800, Libo Chen wrote: > > > > This patch merge two patch that I sended before: > > 1. msm: iommu: add missing platform_device_unregister() in err case > > 2. msm: iommu: no need kfree before kzalloc successful > > > > It fixes two obvious problems: > > 1. We have registered msm_iommu_driver first, and need unregister it when > > registered msm_iommu_ctx_driver fail > > > > 2. We don`t need to kfree drvdata before kzalloc successful > > > > Signed-off-by: Libo Chen > > --- > > drivers/iommu/msm_iommu_dev.c | 11 +++++------ > > 1 files changed, 5 insertions(+), 6 deletions(-) Has this patch already been handled? If not please resend it to me and I will take care of it. Joerg