From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1168717AbdDXKjN (ORCPT ); Mon, 24 Apr 2017 06:39:13 -0400 Received: from 8bytes.org ([81.169.241.247]:50797 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1168617AbdDXKjH (ORCPT ); Mon, 24 Apr 2017 06:39:07 -0400 Date: Mon, 24 Apr 2017 12:39:05 +0200 From: Joerg Roedel To: Pan Bian Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Pan Bian Subject: Re: [PATCH 1/1] iommu/amd: fix incorrect error handling Message-ID: <20170424103905.GH7266@8bytes.org> References: <1492943001-1078-1-git-send-email-bianpan201602@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1492943001-1078-1-git-send-email-bianpan201602@163.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 23, 2017 at 06:23:21PM +0800, Pan Bian wrote: > From: Pan Bian > > In function amd_iommu_bind_pasid(), the control flow jumps to label > out_free when pasid_state->mm and mm is NULL. And mmput(mm) is called. > In function mmput(mm), mm is referenced without validation. This will > result in a NULL dereference bug. This patch fixes the bug. > > Signed-off-by: Pan Bian Applied, thanks.