PCI: Fix unaligned accesses in VC code
The save/restore buffers for VC state is first composed of a 2-byte control register, then a bunch of 4-byte words. This causes unaligned accesses which trap on platform such as sparc. This is easy to fix by simply moving the buffer pointer forward by 4 bytes instead of 2 after dealing with the control register. The length adjustment needs to be changed likewise as well. Fixes: 5f8fc432 ("PCI: Include pci/pcie/Kconfig directly from pci/Kconfig") Reported-by: NMeelis Roos <mroos@linux.ee> Reported-by: NAnatoly Pugachev <matorola@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # v4.6+
Showing
想要评论请 注册 或 登录