PCI: Only allow WC mmap on prefetchable resources
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 12 Apr 2017 12:25:52 +0000 (13:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:44:47 +0000 (15:44 +0200)
commit9ad81ecb28d611a07b59d8e899e0bd79a423aee2
tree6f8b32d97361d06530e56efb1ba03ed17e32caa2
parent6bec009a2f690c69239ab8c002aa1f5eca8c480e
PCI: Only allow WC mmap on prefetchable resources

commit cef4d02305a06be581bb7f4353446717a1b319ec upstream.

The /proc/bus/pci mmap interface allows the user to specify whether they
want WC or not.  Don't let them do so on non-prefetchable BARs.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/proc.c