From patchwork Tue May 17 17:13:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 623220 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3r8P7L4cFhz9sdn for ; Wed, 18 May 2016 03:13:50 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751536AbcEQRNt (ORCPT ); Tue, 17 May 2016 13:13:49 -0400 Received: from mga03.intel.com ([134.134.136.65]:57592 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526AbcEQRNt (ORCPT ); Tue, 17 May 2016 13:13:49 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 17 May 2016 10:13:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,324,1459839600"; d="scan'208";a="978916373" Received: from dcgshare.lm.intel.com ([10.232.118.254]) by orsmga002.jf.intel.com with ESMTP; 17 May 2016 10:13:30 -0700 Received: by dcgshare.lm.intel.com (Postfix, from userid 1017) id 99077E00EA; Tue, 17 May 2016 11:13:30 -0600 (MDT) From: Keith Busch To: linux-pci@vger.kernel.org, Bjorn Helgaas Cc: Jon Derrick , Keith Busch Subject: [PATCH 2/2] x86/vmd: Initialize list item in irq disable Date: Tue, 17 May 2016 11:13:25 -0600 Message-Id: <1463505205-30431-2-git-send-email-keith.busch@intel.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1463505205-30431-1-git-send-email-keith.busch@intel.com> References: <1463505205-30431-1-git-send-email-keith.busch@intel.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Multiple calls to disable an IRQ would have caused the driver to dereference a poisoned list item. This re-initializes the list to allow multiple requests to disable the irq. Signed-off-by: Keith Busch --- arch/x86/pci/vmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/pci/vmd.c b/arch/x86/pci/vmd.c index b1662bf..e9e461b 100644 --- a/arch/x86/pci/vmd.c +++ b/arch/x86/pci/vmd.c @@ -135,6 +135,7 @@ static void vmd_irq_disable(struct irq_data *data) raw_spin_lock(&list_lock); list_del_rcu(&vmdirq->node); + LIST_HEAD_INIT_RCU(&vmdirq->node); raw_spin_unlock(&list_lock); }