All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: davem@davemloft.net, bhelgaas@google.com,
	gregkh@linuxfoundation.org, matorola@gmail.com, mroos@linux.ee
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "PCI: Fix unaligned accesses in VC code" has been added to the 4.6-stable tree
Date: Sun, 24 Jul 2016 16:56:47 -0700	[thread overview]
Message-ID: <146940460722421@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    PCI: Fix unaligned accesses in VC code

to the 4.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-fix-unaligned-accesses-in-vc-code.patch
and it can be found in the queue-4.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From ef0dab4aae14e25efddf1577736f8450132800c5 Mon Sep 17 00:00:00 2001
From: David Miller <davem@davemloft.net>
Date: Sat, 18 Jun 2016 23:52:25 -0700
Subject: PCI: Fix unaligned accesses in VC code

From: David Miller <davem@davemloft.net>

commit ef0dab4aae14e25efddf1577736f8450132800c5 upstream.

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: 5f8fc43217a0 ("PCI: Include pci/pcie/Kconfig directly from pci/Kconfig")
Reported-by: Meelis Roos <mroos@linux.ee>
Reported-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pci/vc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/pci/vc.c
+++ b/drivers/pci/vc.c
@@ -221,9 +221,9 @@ static int pci_vc_do_save_buffer(struct
 		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


Patches currently in stable-queue which might be from davem@davemloft.net are

queue-4.6/pci-fix-unaligned-accesses-in-vc-code.patch
queue-4.6/cdc_ncm-workaround-for-em7455-silent-data-interface.patch
queue-4.6/macsec-set-actual-real-device-for-xmit-when-protect_frames.patch
queue-4.6/ipv6-fix-mem-leak-in-rt6i_pcpu.patch
queue-4.6/geneve-fix-max_mtu-setting.patch
queue-4.6/net_sched-fix-mirrored-packets-checksum.patch
queue-4.6/packet-use-symmetric-hash-for-packet_fanout_hash.patch

                 reply	other threads:[~2016-07-25  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=146940460722421@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bhelgaas@google.com \
    --cc=davem@davemloft.net \
    --cc=matorola@gmail.com \
    --cc=mroos@linux.ee \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.