From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965147AbcALOmk (ORCPT ); Tue, 12 Jan 2016 09:42:40 -0500 Received: from mx2.suse.de ([195.135.220.15]:60797 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964934AbcALOme (ORCPT ); Tue, 12 Jan 2016 09:42:34 -0500 From: Hannes Reinecke To: Bjorn Helgaas Cc: Alexander Duyck , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Babu Moger , Hannes Reinecke Subject: [PATCH 0/3] PCI VPD access fixes Date: Tue, 12 Jan 2016 15:42:27 +0100 Message-Id: <1452609750-90760-1-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, the current PCI VPD page access assumes that the entire possible VPD data is readable. However, the spec only guarantees a VPD data up to the 'end' marker, with everything beyond that being undefined. This causes a system lockup on certain devices. With this patch we calculate the actual VPD size, or set it to '0' if no valid VPD data could be read. Hannes Reinecke (3): pci: Update VPD definitions pci: Update VPD size with correct length pci: set VPD size to '0' if PCI_VPD_FLAGS_VPD_REF_F0 is set drivers/pci/access.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++- drivers/pci/pci-sysfs.c | 20 +++++++++------ include/linux/pci.h | 27 ++++++++++++++++++-- 3 files changed, 104 insertions(+), 11 deletions(-) -- 1.8.5.6