From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752516AbcADQiU (ORCPT ); Mon, 4 Jan 2016 11:38:20 -0500 Received: from 8bytes.org ([81.169.241.247]:57245 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbcADQiS (ORCPT ); Mon, 4 Jan 2016 11:38:18 -0500 Date: Mon, 4 Jan 2016 17:38:16 +0100 From: Joerg Roedel To: Nicholas Krause Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu:Check that iommu_device_create has completed successfully in alloc_iommu Message-ID: <20160104163816.GS18805@8bytes.org> References: <1451365811-19111-1-git-send-email-xerofoify@gmail.com> <20160104161616.GP18805@8bytes.org> <6B8E4732-8366-4981-8A38-BA542A09F1E0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6B8E4732-8366-4981-8A38-BA542A09F1E0@gmail.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 Mon, Jan 04, 2016 at 11:27:10AM -0500, Nicholas Krause wrote: > Yes that's true and was wondering if you want me to fix it up to set > the pointer back to null first or if preferred around safe state. The best solution is to set the dmar->iommu pointer after the error check for iommu_device_create(). Joerg