Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1425940

Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80
Date 2016-06-19 08:50 +0200
Message-ID <rLEIp-73E-1@gated-at.bofh.it> (permalink)
References <rK5a1-2vN-13@gated-at.bofh.it> <rKCpk-72x-25@gated-at.bofh.it> <rLCdz-5nf-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: David Miller <davem@davemloft.net>
Date: Sat, 18 Jun 2016 21:04:21 -0700 (PDT)

> From: Anatoly Pugachev <matorola@gmail.com>
> Date: Thu, 16 Jun 2016 13:02:07 +0300
> 
>> bisected to git commit 63e3027
> 
> That's a merge commit that adds 100 different commits, and this happened
> way back in March.
> 
> Please find the exact dword access in:
> 
> 	drivers/pci/pcie/portdrv_{core,pci,bus}.c
> 
> that triggers this unaligned access so we can debug this further.

Meanwhile I figured it out, this should fix the bug:

diff --git a/drivers/pci/vc.c b/drivers/pci/vc.c
index dfbab61..1fa3a32 100644
--- a/drivers/pci/vc.c
+++ b/drivers/pci/vc.c
@@ -221,9 +221,9 @@ static int pci_vc_do_save_buffer(struct pci_dev *dev, int pos,
 		else
 			pci_write_config_word(dev, pos + PCI_VC_PORT_CTRL,
 					      *(u16 *)buf);
-		buf += 2;
+		buf += 4;
 	}
-	len += 2;
+	len += 4;
 
 	/*
 	 * If we have any Low Priority VCs and a VC Arbitration Table Offset

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: 4.6-rc*: Kernel unaligned access at  pci_bus_read_config_dword+0x64/0x80 Meelis Roos <mroos@linux.ee> - 2016-06-13 14:50 +0200
  Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80 Anatoly Pugachev <matorola@gmail.com> - 2016-06-14 15:10 +0200
    Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80 Anatoly Pugachev <matorola@gmail.com> - 2016-06-15 00:40 +0200
      Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80 Anatoly Pugachev <matorola@gmail.com> - 2016-06-16 12:10 +0200
        Re: 4.6-rc*: Kernel unaligned access at  pci_bus_read_config_dword+0x64/0x80 David Miller <davem@davemloft.net> - 2016-06-19 06:10 +0200
          Re: 4.6-rc*: Kernel unaligned access at  pci_bus_read_config_dword+0x64/0x80 David Miller <davem@davemloft.net> - 2016-06-19 08:50 +0200
            Re: 4.6-rc*: Kernel unaligned access at  pci_bus_read_config_dword+0x64/0x80 mroos@linux.ee - 2016-06-19 13:50 +0200

csiph-web