Commit graph

589736 commits

Author SHA1 Message Date
Ross Lagerwall
707e59ba49 xen/qspinlock: Don't kick CPU if IRQ is not initialized
The following commit:

  1fb3a8b2cf ("xen/spinlock: Fix locking path engaging too soon under PVHVM.")

... moved the initalization of the kicker interrupt until after
native_cpu_up() is called.

However, when using qspinlocks, a CPU may try to kick another CPU that is
spinning (because it has not yet initialized its kicker interrupt), resulting
in the following crash during boot:

  kernel BUG at /build/linux-Ay7j_C/linux-4.4.0/drivers/xen/events/events_base.c:1210!
  invalid opcode: 0000 [#1] SMP
  ...
  RIP: 0010:[<ffffffff814c97c9>]  [<ffffffff814c97c9>] xen_send_IPI_one+0x59/0x60
  ...
  Call Trace:
   [<ffffffff8102be9e>] xen_qlock_kick+0xe/0x10
   [<ffffffff810cabc2>] __pv_queued_spin_unlock+0xb2/0xf0
   [<ffffffff810ca6d1>] ? __raw_callee_save___pv_queued_spin_unlock+0x11/0x20
   [<ffffffff81052936>] ? check_tsc_warp+0x76/0x150
   [<ffffffff81052aa6>] check_tsc_sync_source+0x96/0x160
   [<ffffffff81051e28>] native_cpu_up+0x3d8/0x9f0
   [<ffffffff8102b315>] xen_hvm_cpu_up+0x35/0x80
   [<ffffffff8108198c>] _cpu_up+0x13c/0x180
   [<ffffffff81081a4a>] cpu_up+0x7a/0xa0
   [<ffffffff81f80dfc>] smp_init+0x7f/0x81
   [<ffffffff81f5a121>] kernel_init_freeable+0xef/0x212
   [<ffffffff81817f30>] ? rest_init+0x80/0x80
   [<ffffffff81817f3e>] kernel_init+0xe/0xe0
   [<ffffffff8182488f>] ret_from_fork+0x3f/0x70
   [<ffffffff81817f30>] ? rest_init+0x80/0x80

To fix this, only send the kick if the target CPU's interrupt has been
initialized. This check isn't racy, because the target is waiting for
the spinlock, so it won't have initialized the interrupt in the
meantime.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xenproject.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-04-23 13:40:02 +02:00
Doug Ledford
f4e7de63ab IB/core: Fix oops in ib_cache_gid_set_default_gid
When we fail to find the default gid index, we can't continue
processing in this routine or else we will pass a negative
index to later routines resulting in invalid memory access
attempts and a kernel oops.

Fixes: 03db3a2d81 (IB/core: Add RoCE GID table management)
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-04-22 20:26:44 -04:00
Kevin Hilman
e6d939bfd4 The i.MX fixes for 4.6:
- The sdhci-esdhc-imx DMA support is broken due to commit 7b91369b46
    ("mmc: sdhci: Set DMA mask when adding host").  It requires device's
    dma_mask be set up properly to get DMA work.  The fixing patch
    initializes the DMA mask to enable the access again.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJXDg+UAAoJEFBXWFqHsHzOxLEH/jbiBkmo4w1JYfOgVwTRF58h
 pCP+OmXvM5gmO0QoyxmxzmISQU8RYkk+dRrM8GNasp9TY3TAc+R6CzrOJrJ4uzFK
 oMuc5f/52/ExRt9MgeGYy/Cy05g1iqUCp2SucyUxrcPSC6I85QOqCIRUFqnuyP7L
 MtHuLudSCOKmAjtWpwHqoHG8/tlWQX2iw0YW8mn1SsSUau/ROtSP21mN6/NxOgcD
 tHg53u3Bq//kWyoccsJ8FbQz7SkKvPq5fOkW3aBv67ZkFuf7fqwve6dGGQ/ojkA0
 g5ikPmaExxH/E5pYFmtdzv6dN8D4n9SVMW5MV42p41JTdnqVmdFiraGwT0z1uf8=
 =Oq+h
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes

Merge "ARM: i.MX fixes for 4.6" from Shawn Guo:

The i.MX fixes for 4.6:
 - The sdhci-esdhc-imx DMA support is broken due to commit 7b91369b46
   ("mmc: sdhci: Set DMA mask when adding host").  It requires device's
   dma_mask be set up properly to get DMA work.  The fixing patch
   initializes the DMA mask to enable the access again.

* tag 'imx-fixes-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: mach-imx: sdhci-esdhc-imx: initialize DMA mask
2016-04-22 16:55:05 -07:00
Kevin Hilman
22c49e5a09 Fixes for omaps for v4.6-rc cycle:
- Clockdomain fix for dra7 timer interrupts
 
 - Two fixes for GPMC EDMA binding, I missed the need for a merge with
   GPMC changes and EDMA changes
 
 - Fix beagle-x15 eSATA by dropping misconfigured extcon_usb1
 
 - Fix occasional external aborts on 36xx with PM that we've been
   chasing for past few months. It turned out to be duplicate restore
   of INTC registers that can in some cases cause us to hit erratum 1.106.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXD8cCAAoJEBvUPslcq6VzKlEQAJsIi+p0Bk8ior9eqEphnWI5
 NdMcu0POJb/SVLPfLzH5WxM/8Rd81Se56uiy1Hpa9cqxFxfStQm9/ltU/8EJEvAC
 XnxwX78jfB7I6BcynKia+M/Sc4CgVxi41iq3lc1AUY5srN7kYyxFTljlMQMKwgTg
 QFM4sFFCARUifO+z3SejgaO3vde0cMlZPh4gGYEx01xxYoqYk5kdWxHN1nRBH9T2
 a/F7GrnMgTgALITP6oij9cb/uLyog7YraDc1fWQzAhm9JdneAbI21MHwkLsEB+Il
 EDGcyq9VKMO8nXD2sGlt1EIjnaPZAd45To/OECGd11N7qog79/LEo5gMN/Is76kO
 cx6nrvqGrOfynt2q3GyfMWiMRn36mk1gZ+FtOGCxRc0ROyqXfLyhKWKZkEK7aotf
 R6Ga/ufNRiw0Ded0XABlt2PD6PPWD+Ly5wiU8AwOraM7XW6415FK07fD+hhZczOG
 66wFC+J8nQGO7VecBrJOnqms2YnPlc4dgfVCo8jnAjRFtfPG9UjnPZBloxlDKMJB
 OSkVPtRLCHiVk1xG51TCKgIgwJ5s957ohb9ImTIikXHsdLu39F3P7Tx4LQfYS8pd
 B2AbktI0VYkJqiuaLjHdbxWBY8AL5UrZynn+pxjbVQcmuqgHGrDD7DWB8nmspvu0
 4HvovFXCm8NvRZBMJhh9
 =6rQp
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.6/fixes-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Merge "omap fixes for v4.6-rc cycle" from Tony Lindgren:

Fixes for omaps for v4.6-rc cycle:

- Clockdomain fix for dra7 timer interrupts

- Two fixes for GPMC EDMA binding, I missed the need for a merge with
  GPMC changes and EDMA changes

- Fix beagle-x15 eSATA by dropping misconfigured extcon_usb1

- Fix occasional external aborts on 36xx with PM that we've been
  chasing for past few months. It turned out to be duplicate restore
  of INTC registers that can in some cases cause us to hit erratum 1.106.

* tag 'omap-for-v4.6/fixes-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP3: Fix external abort on 36xx waking from off mode idle
  ARM: dts: am57xx-beagle-x15: remove extcon_usb1
  ARM: dts: am437x: Fix GPMC dma properties
  ARM: dts: am33xx: Fix GPMC dma properties
  ARM: DRA7: clockdomain: Implement timer workaround for errata i874
2016-04-22 16:53:49 -07:00
Linus Torvalds
09502d9fff Pin control fixes for the v4.6 series:
- Make the i.MX driver select REGMAP as a dependency
 - Fix up the Mediatek debounce time unit
 - Fix a real hairy ffs vs __ffs issue in the Single pinctrl driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXGml+AAoJEEEQszewGV1zw3cP/iF2PvVwmf/tbKqlBjLlIF5g
 NYu3YCI8GaRCm8IQBviW9coZIumUH/joWFK58igdm0+vbtW6mschqVsRWUThRFb8
 g+PiqZHRg9FhZWpBadQyVJ2rm3fji073CvFgJjWJr11d2dvuxkGfOoHc4Xt5RHop
 hx2a0mzgzXp3JmWH9rYbu+G3nSTyYNQ346sk7yr9hRGuGus/xaJGy9QBIVp2BxYd
 poy+Z5O2cpMQzlQRGda87MmIDVo0BP01rzCdovxtbYULDX3UVzgPeg2L/KYG09It
 5ONRze4B1GVwhd5skkN0ZU/LA2aPJYkRVkQttHDq1sk7MCYBPKTTTSK7fKAuQWwk
 u3UclCJgHpcIY0hhB92SQhgOCo2N0nd7NjLuftyteR6+tmKT2TGISNHOF24lSA5K
 GmpbzuhKaYNlchJPsa0bECXEoe0HM1sLhAAczebxjnsQ1y3UP+sY5yBiM7oYCJBh
 cj/qODn+QlF0TxN1ceLJ3Vxj2pZduC1g18WV//UnNMoRCjIVkBedeiydA5J0swji
 n9we5UhbNv2HlMawTwpZP/FXacVmswv6e4lL9dMO57NRSfm5CBhZW8kzfqRH5vpS
 e6ImwEqRA1z/Y+6Tyfieym//Vq/rz57GLwXqFH1pkIpnKH52Wy7oY5OCfq3bGLMX
 RH09KkGdv+DXwWN9fq+H
 =xIao
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 "Some pin control driver fixes came in.  One headed for stable and the
  other two are just ordinary merge window fixes.

   - Make the i.MX driver select REGMAP as a dependency
   - Fix up the Mediatek debounce time unit
   - Fix a real hairy ffs vs __ffs issue in the Single pinctrl driver"

* tag 'pinctrl-v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: single: Fix pcs_parse_bits_in_pinctrl_entry to use __ffs than ffs
  pinctrl: mediatek: correct debounce time unit in mtk_gpio_set_debounce
  pinctrl: imx: Kconfig: PINCTRL_IMX select REGMAP
2016-04-22 11:52:49 -07:00
Laszlo Ersek
630ba0cc7a efi: Fix out-of-bounds read in variable_matches()
The variable_matches() function can currently read "var_name[len]", for
example when:

 - var_name[0] == 'a',
 - len == 1
 - match_name points to the NUL-terminated string "ab".

This function is supposed to accept "var_name" inputs that are not
NUL-terminated (hence the "len" parameter"). Document the function, and
access "var_name[*match]" only if "*match" is smaller than "len".

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Matthew Garrett <mjg59@coreos.com>
Cc: Jason Andryuk <jandryuk@gmail.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: <stable@vger.kernel.org> # v3.10+
Link: http://thread.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/86906
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
2016-04-22 19:41:41 +01:00
Linus Torvalds
ddce192106 arm64 fixes:
- Cache invalidation fix for early CPU boot status update (incorrect
   cacheline)
 
 - of_put_node() missing in the spin_table code
 
 - EL1/El2 early init inconsistency when Virtualisation Host Extensions
   are present
 
 - RCU warning fix in the arm_pmu.c driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXGgsnAAoJEGvWsS0AyF7xEQ0P/1t9N459ttwATfBVkqZzUowJ
 w5hGGQmuq1zEKFsjsNWATcMTraLU4Kqoao6jDO5/uxGvRSaEGbwpU0nZPLuXghHb
 V6V0kc6LAh91AKxtnIyebaxSfBmDOrQb8dH/ZfOIL5SMPvhrrrG70axniKQq/46I
 uUfe8uVpSiqV+w9jUlJteWlugHW1ivtojpe1cNOoFuSc+I+jvrE87DPowxSBqs20
 CAsD2njdEtYV0C/NxFcuSJmhG3USi4r41VQ5mvqiQc3odgrF0sC0/Ytl7rPw9GIa
 qBLumJUyCYQcsV/wJ6deSKWSOddNTf/q1b0Dnbq/wMp4nLwYvO4QrePjNmfT0ZyI
 /i6HxUxAwYxbP1F790n0WZoRaZx9yNk/qjeneYtF5lgXbU61rf0zhmLPEJ5uo6x2
 GP85z1I0xRClq+Fa15qybq+zp10VlNsSkMZKhv03kmqnGRFNqxYEhzZhhHDJnQhq
 WeG8aVj7LJbeRRh0l6gYfIwu3HdO6dDKAqzqv54cDuwhiGPS46LbCLpZVa/C3B4K
 qyUprCt6FaBs528yysLewVcjmbUu6cvda27OB88Er/6C6jvKnKQ+20nVbzGOd7+V
 ex7kTXVe41rO3vWulBFDKB8Q3c02URpXJKmMsNVlbzNX77tLkDbd2Lyf5vSkJK7x
 JeRj/ua+r8rOdWS+Nhxb
 =/LTw
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Cache invalidation fix for early CPU boot status update (incorrect
   cacheline)

 - of_put_node() missing in the spin_table code

 - EL1/El2 early init inconsistency when Virtualisation Host Extensions
   are present

 - RCU warning fix in the arm_pmu.c driver

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Fix EL1/EL2 early init inconsistencies with VHE
  drivers/perf: arm-pmu: fix RCU usage on pmu resume from low-power
  arm64: spin-table: add missing of_node_put()
  arm64: fix invalidation of wrong __early_cpu_boot_status cacheline
2016-04-22 11:11:15 -07:00
Linus Torvalds
ff061624e1 powerpc fixes for 4.6 #2
- scan_features() updates incorrect bits for REAL_LE from Anton Blanchard
  - Update cpu_user_features2 in scan_features() from Anton Blanchard
  - Update TM user feature bits in scan_features() from Anton Blanchard
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXGfRfAAoJEFHr6jzI4aWAeCQP+wVdFa4Q+T0uFQf/lQBPfQLa
 wDODtskmqwfWk2YqIv3LKTnrkubs8nGy2Vc5Tm27/G/x+uMPOrTD/eoBiG3DH8E3
 eiX1tlqO+oM8dm+g/FxGSCbkWSoYKQrc1QQ1oWtADPPhSm1xU0GYdPqQrDyAfFEr
 JEg5ifOkbTZ3VauuK2kXVxIgNHtwfPoeQfTEmKk7x1Pay0z3zNx65tKInGKmatL8
 7dS+Y8gPNODUfky61M1Y0f/KDwOsBO7gyiIdkkJxnYW1IAqTTsvK90fKPVzSfM0Y
 jnOBdlysIPsiXFNDjT0gBBBRm7McCZO/bZEjK7aSWUMP/FOWIR+HkB3+fpcB+o8u
 tbmMJ8AfHvz4PXzf0h0TySOy6uhA65LJfBnssBoZcCQyxTzdIQC7crDH2639L+8q
 djUYGzWXrplCq/r/uQrogY7a7Ff/UFW76mRMX1lj2hi8lpQEnr7sBPAqwEApgvtr
 WRqBkUjyuTWnnDSnen0NR1QMfh9zMNNjHHBaU+UJv0gU3lBRL+VpmFizsdjVk8/E
 0wC2l1lws3txxaWXGmpJNKve9P2+iEVfY5KAigkKO3yV5xUuwOhtED6sTKqTY5wR
 kp3AC+7fjUxQFJ4g4BVohakie5RR6LkLZ7xCwB0LWPff3LUIiHGelsd+ii1kjxwm
 /tiR9CYEO1O9KcKlwv8X
 =woiB
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
 "Three powerpc cpu feature fixes from Anton Blanchard:

   - scan_features() updated incorrect bits for REAL_LE

   - update cpu_user_features2 in scan_features()

   - update TM user feature bits in scan_features()"

* tag 'powerpc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc: Update TM user feature bits in scan_features()
  powerpc: Update cpu_user_features2 in scan_features()
  powerpc: scan_features() updates incorrect bits for REAL_LE
2016-04-22 10:53:12 -07:00
Linus Torvalds
7c5047a124 IOMMU Fixes for Linux v4.6-rc4
The fixes include:
 
 	* Two patches to revert the use of default domains in the ARM
 	  SMMU driver. Enabling this caused regressions which need more
 	  thorough fixing. So the regressions are fixed for now by
 	  disabling the use of default domains.
 
 	* A fix for a v4.4 regression in the AMD IOMMU driver which
 	  broke devices behind invisible PCIe-to-PCI bridges with IOMMU
 	  enabled.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJXGfQRAAoJECvwRC2XARrjw8QP/1cnSlwlmrx6klaSaD0XlVe+
 IoxU8USSunBojepKHIQiLmDrLvsan5LcqWqq7ExyiSV9hZuO81gcL7cVaZyh3cVt
 0lYFxgJy7xOuprmP/8c/omTipyH/qciC0iVgZ3879j3KjJcEo5smSy3gvSEd1dE4
 N14Yacz+frvBt6bsk+xXM4eOgO+RNmvHMuewd9Pi/Dd7yp5tcgYdWlyxYJPaFHd+
 ayV40GtEdZd18tfpmKfOJG3yYpzDX0eD2bddYztmb6+xRiitQt2v5fgF2QEaFAyO
 DqXPGgFSoSa/8EFqpP2JwwHDJezRZHWyBpylNKU4Pyu2dQ1JREUPS47JaXPmh7eI
 zJecky9rA4Mz7pdlx/rH2BFhS9cSQmQRt9L++dy2iG8Gnw3WOFcncRINi725OOF3
 mw3gKnYxtLAStRj2kjGEZJx2UG5K4N4oHs1lT2iWRqdp/t2V10trMmT4CSUYGnbq
 5YnwFUSNotXRuLL/dNLjf0WOYzuHICwxaC/Czmcdz2AqtvNtnC8YyBUL4sMcr7fZ
 0o6r+F376a8e4A7T/YUyfPbralyj/sdiuzQqTbtOdFZkYaKEqQmSVJBgCag6zns5
 Ay1G+uuh2kCAb1gIGsQfKMOXIkTmP4lCZssR1rju4dKYVgPqjLn1+FDqfLW6z+tB
 ggGp8Auv0n3DqzKD7HDr
 =bCV6
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:
 "The fixes include:

   - Two patches to revert the use of default domains in the ARM SMMU
     driver.  Enabling this caused regressions which need more thorough
     fixing.  So the regressions are fixed for now by disabling the use
     of default domains.

   - A fix for a v4.4 regression in the AMD IOMMU driver which broke
     devices behind invisible PCIe-to-PCI bridges with IOMMU enabled"

* tag 'iommu-fixes-v4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/arm-smmu: Don't allocate resources for bypass domains
  iommu/arm-smmu: Fix stream-match conflict with IOMMU_DOMAIN_DMA
  iommu/amd: Fix checking of pci dma aliases
2016-04-22 10:41:31 -07:00
Linus Torvalds
d61fb48b2f Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "i915, nouveau and amdgpu/radeon fixes in this:

  nouveau:
     Two fixes, one for a regression with dithering and one for a bug
     hit by the userspace drivers.

  i915:
     A few fixes, mostly things heading for stable, two important
     skylake GT3/4 hangs.

  radeon/amdgpu:
     Some audio, suspend/resume and some runtime PM fixes, along with
     two patches to harden the userptr ABI a bit"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (24 commits)
  drm: Loongson-3 doesn't fully support wc memory
  drm/nouveau/gr/gf100: select a stream master to fixup tfb offset queries
  amdgpu/uvd: add uvd fw version for amdgpu
  drm/amdgpu: forbid mapping of userptr bo through radeon device file
  drm/radeon: forbid mapping of userptr bo through radeon device file
  drm/amdgpu: bump the afmt limit for CZ, ST, Polaris
  drm/amdgpu: use defines for CRTCs and AMFT blocks
  drm/dp/mst: Validate port in drm_dp_payload_send_msg()
  drm/nouveau/kms: fix setting of default values for dithering properties
  drm/radeon: print a message if ATPX dGPU power control is missing
  Revert "drm/radeon: disable runtime pm on PX laptops without dGPU power control"
  drm/amdgpu/acp: fix resume on CZ systems with AZ audio
  drm/radeon: add a quirk for a XFX R9 270X
  drm/radeon: print pci revision as well as pci ids on driver load
  drm/i915: Use fw_domains_put_with_fifo() on HSW
  drm/i915: Force ringbuffers to not be at offset 0
  drm/i915: Adjust size of PIPE_CONTROL used for gen8 render seqno write
  drm/i915/skl: Fix spurious gpu hang with gt3/gt4 revs
  drm/i915/skl: Fix rc6 based gpu/system hang
  drm/i915/userptr: Hold mmref whilst calling get-user-pages
  ...
2016-04-22 10:29:52 -07:00
Linus Torvalds
d4b0528827 sound fixes for 4.6-rc5
Again a relatively calm week without surprise: most of fixes are about
 HD-audio, including fixes for Cirrus codec regression and a race over
 regmap access.  Although both change are slightly unintuitive, the
 risk of further breakage is quite low, I hope.
 
 Other than that, all the rest are trivial.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXGeZhAAoJEGwxgFQ9KSmkOg4P/RWGLla59n6L6QCE2kNp3rQS
 fPjVG2ctEHAqVi6lqLSletV2HkA1K6MY/tyawjtjG2Fs6JqbITasOWJmI10aDzDl
 tmLWBlmJf4zRye2YbFmP4v5dE9VuRhU9ucMc4IqBT9+DgTEVNuCcQiW9amyj4kJ7
 XcjT6z0tj/5MXe+hmjvHuEwc6qYk/4Z7HJDcKlNxsD7dQ9zoLhXmbEndw5600Os5
 cMFzZzRPDofyRbvhooQrn1oJG143bilnseMV83O7WTwzJ+DSiZlJG8ibY7bPYsPL
 qicr4keet5n96gZHbPXeZHvxlCzW4dStna1qPYOWTg8xy1kHGA7tAExznPG23f2h
 ANTQ0lAN+A0I3PjB0S+MP6I2Uw+bkkKpo0w6ugSz8nmSfO1k9mkavK51RWAuQTef
 ITdORv/HTkCHp7jyKBx2ArM+s3mckrNA4kNFOAHYpdXln3vQDPc0BnQkfq1LW6vf
 RQVQSAoSBqZahefgfL2nuhHWa/QqZ+9XTPmxp1dA2YLmYLKtkGOZYuz0XkDYqSaC
 JdnL+3Q7OmTbVvgPPOn595eq7R8VrH2vbQH1pJC+zRL+I9dVmZ7Et7KtBYCr0pON
 G4S+ZieILnMTYdYsEK4jQkC0ZiWwpr+y2Lurz97qVm8yIbKSBEpxakxpVHNP5dDe
 I/6ZrY3i3K4YqYbxPwEF
 =wz0C
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Again a relatively calm week without surprise: most of fixes are about
  HD-audio, including fixes for Cirrus codec regression and a race over
  regmap access.  Although both change are slightly unintuitive, the
  risk of further breakage is quite low, I hope.

  Other than that, all the rest are trivial"

* tag 'sound-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix possible race on regmap bypass flip
  ALSA: pcxhr: Fix missing mutex unlock
  ALSA: hda - add PCI ID for Intel Broxton-T
  ALSA: hda - Keep powering up ADCs on Cirrus codecs
  ALSA: hda/realtek - Add ALC3234 headset mode for Optiplex 9020m
  ALSA - hda: hdmi check NULL pointer in hdmi_set_chmap
  ALSA: hda - Don't trust the reported actual power state
2016-04-22 10:17:18 -07:00
Kevin Hilman
c95e2e7edd Renesas ARM Based SoC Fixes for v4.6
* Correct preset_lpj calculation which may lead to too short delays
 * Correct handling of optional clocks on r8a7791 to restore
   access to the serial port the porter board
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXGEtmAAoJENfPZGlqN0++aYIP/RCANWvI9Z7VH/Y/NQ1f5t4Y
 l4Uv1/dSuIHJq44z0sLMD5gmDVKqP1NnCncfkZabDXceGm9Fk3DlFxeLd+ahMN+B
 dBtDpf1AA9Mr1AEoBrXjNimWSupvJalatqk3nWfLnjpGHQJOKTZCekikQb9WBA5t
 l5r5Pvu/leRfyg/wi10F3hq0a2drKbIbFDOzh37L7al9cvZTnyVZNcchb/vlqZmt
 kAi90crLUXvQ9eOw357kFBmigQF5r/fD0X3f5sFYyDlNldZg3chkyghiluiOcXDL
 eEc6TdHNT/a9hixqpW/Z1BinpvFF+vIjfUZBW9wXTRz0t9EX5Pxr9wSXWEY4+hmp
 DrI9eiEAbX8ltfjOo3Q7LgHstjZ6AJyk3CZJBWk8i2DLK5SEt6eum/BvKRmakTa+
 DLe+SES+uUfg1d35WEqhqPeO7JEybPAVyto++NrCRSkPeDeO32+h2O6yEsMBqEKC
 HFoV/V86Ufqq8MCiZkQBZJGNYqcTeKMiXzvte23tcAXXYmxMct5Z4HLCiFEM4paw
 yyThG9VZofe4pt03u9XqiZjEu23AopMpM9xDpUjK3CKYq6uaJxNoJcgJC6TBbkmT
 D7kdmhhlWCLeyr3pqblbqiWdK7Bx9B65aFhm/nilX0y4p3vvT46vMLvG4SgfFojv
 Ybr9ICHZMaTxJ1V32fty
 =k7qU
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Merge "Renesas ARM Based SoC Fixes for v4.6" from Simon Horman:

Renesas ARM Based SoC Fixes for v4.6

* Correct preset_lpj calculation which may lead to too short delays
* Correct handling of optional clocks on r8a7791 to restore
  access to the serial port the porter board

* tag 'renesas-fixes-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: timer: Fix preset_lpj leading to too short delays
  Revert "ARM: dts: porter: Enable SCIF_CLK frequency and pins"
  ARM: dts: r8a7791: Don't disable referenced optional clocks
2016-04-22 09:58:48 -07:00
Kevin Hilman
c0e309138b Fixes for omaps against v4.6-rc2, mostly to fix suspend for beagle-x15
that broke when we added runtime based SoC revision detection earlier.
 
 It seems suspend worked earlier as things were only partially initialized,
 while now we initialize things properly for dra7.
 
 Note that the "ARM: OMAP: Catch callers of revision information prior
 to it being populated" had to be reverted as it caused bogus warnings
 for other SoCs because omap initcalls bail out based on revision being
 set to 0 for other SoCs. These initcalls will mostly just disappear
 when we drop support for omap3 legacy booting.
 
 Also included is a fix for dra7 sys_32k_ck clock source that is not
 enabled on boot making system fall back to using emulated clock.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXFkmvAAoJEBvUPslcq6VzmakQAKmjDs+iS02No6sQaIkBvadJ
 gAL8EvAPZ5QLt6OW+MvFLiE42kr9NZSbvyLNLzjjqKI9AmuYZnrci8tQJ9uOHMLM
 SmScTjE6b7PvGo2jI+IXkoi1hVL1YP7FKuA0/25EwNaeMKoZ7JPFJ/jpPatvIEg7
 2TB6wk0rdlpGaaSx8uFR2ohDE8lA0gDNRDiHx7G2d9tl9rLLXC2IvS1YhpvLcGw0
 IkRgFGF6+WZ09DZ+B1pnKPrf5wWBGqI44IWBL4epOCsDGxOYFjMix5or7FiaTrcP
 8BGfOVJCRKGjccBvAFJLSznjMQb8jeTHkFxWY8BgY2FSuTJlFrbkxIBraFaZMqG/
 9IOxPvjCJDgJdhGxHuQUGKzbQ2o7D7H5xb5PCxbdscHTcwi2WR6AXI6q+5v2ykqu
 moQXvAPS2GcfVrgXcuIthwvqENExILTwogcgME8/6DvS0l7LlJ7bf1G32jsCvI3M
 mw0+8GKx9qW+7demu6uy0uLiVI5cHfcTWp2ocLnXwnRVmixU5XG4QaPRp/MhB/QV
 F57UxJFHH398zeZ8OgJFzjYwIT+60KCJNU+qMHdBdd76hiJ7Dg0rMxqoxLpbaB4t
 fPbhuE/eUWvZR5IeL1I1M4dDgpp6KThGR86K1wHSMwWkq8Og+XoYMoU3yn0tyqT9
 IHyBWPFAVpKI44uAle7w
 =0X4E
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.6/fixes-rc2-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Merge "omap fixes against v4.6-rc2" from Tony Lindgren

Fixes for omaps against v4.6-rc2, mostly to fix suspend for beagle-x15
that broke when we added runtime based SoC revision detection earlier.

It seems suspend worked earlier as things were only partially initialized,
while now we initialize things properly for dra7.

Note that the "ARM: OMAP: Catch callers of revision information prior
to it being populated" had to be reverted as it caused bogus warnings
for other SoCs because omap initcalls bail out based on revision being
set to 0 for other SoCs. These initcalls will mostly just disappear
when we drop support for omap3 legacy booting.

Also included is a fix for dra7 sys_32k_ck clock source that is not
enabled on boot making system fall back to using emulated clock.

* tag 'omap-for-v4.6/fixes-rc2-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (198 commits)
  Revert "ARM: OMAP: Catch callers of revision information prior to it being populated"
  ARM: OMAP: Catch callers of revision information prior to it being populated
  ARM: dts: dra7: Correct clock tree for sys_32k_ck
  ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
  ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
  Linux 4.6-rc2
  v4l2-mc: avoid warning about unused variable
  Convert straggling drivers to new six-argument get_user_pages()
  .mailmap: add Christophe Ricard
  Make CONFIG_FHANDLE default y
  mm/page_isolation.c: fix the function comments
  oom, oom_reaper: do not enqueue task if it is on the oom_reaper_list head
  mm/page_isolation: fix tracepoint to mirror check function behavior
  mm/rmap: batched invalidations should use existing api
  x86/mm: TLB_REMOTE_SEND_IPI should count pages
  mm: fix invalid node in alloc_migrate_target()
  include/linux/huge_mm.h: return NULL instead of false for pmd_trans_huge_lock()
  mm, kasan: fix compilation for CONFIG_SLAB
  MAINTAINERS: orangefs mailing list is subscribers-only
  net: mvneta: fix changing MTU when using per-cpu processing
  ...
2016-04-22 09:45:53 -07:00
Javier Martinez Canillas
10ff4c5239 i2c: exynos5: Fix possible ABBA deadlock by keeping I2C clock prepared
The exynos5 I2C controller driver always prepares and enables a clock
before using it and then disables unprepares it when the clock is not
used anymore.

But this can cause a possible ABBA deadlock in some scenarios since a
driver that uses regmap to access its I2C registers, will first grab
the regmap lock and then the I2C xfer function will grab the prepare
lock when preparing the I2C clock. But since the clock driver also
uses regmap for I2C accesses, preparing a clock will first grab the
prepare lock and then the regmap lock when using the regmap API.

An example of this happens on the Exynos5422 Odroid XU4 board where a
s2mps11 PMIC is used and both the s2mps11 regulators and clk drivers
share the same I2C regmap.

The possible deadlock is reported by the kernel lockdep:

  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(sec_core:428:(regmap)->lock);
                                lock(prepare_lock);
                                lock(sec_core:428:(regmap)->lock);
   lock(prepare_lock);

  *** DEADLOCK ***

Fix it by leaving the code prepared on probe and use {en,dis}able in
the I2C transfer function.

This patch is similar to commit 34e81ad5f0 ("i2c: s3c2410: fix ABBA
deadlock by keeping clock prepared") that fixes the same bug in other
driver for an I2C controller found in Samsung SoCs.

Reported-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
2016-04-22 15:31:54 +02:00
Michael Ellerman
609d5a1b2b i2c: cpm: Fix build break due to incompatible pointer types
Since commit ea8daa7b97 ("kbuild: Add option to turn incompatible
pointer check into error"), assignments from an incompatible pointer
types have become a hard error, eg:

  drivers/i2c/busses/i2c-cpm.c:545:91: error: passing argument 3 of
  'dma_alloc_coherent' from incompatible pointer type

Fix the build break by converting txdma & rxdma to dma_addr_t.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Fixes: ea8daa7b97
2016-04-22 15:25:53 +02:00
Evgeny Voevodin
d9676fa152 ARCv2: Enable LOCKDEP
- The asm helpers for calling into irq tracer were missing

- Add calls to above helpers in low level assembly entry code for ARCv2

- irq_save() uses CLRI to disable interrupts and returns the prev interrupt
  state (in STATUS32) in a specific encoding (and not the raw value of
  STATUS32). This is usable with SETI in irq_restore(). However
  save_flags() reads the raw value of STATUS32 which doesn't pair with
  irq_save/restore() and thus needs fixing.

Signed-off-by: Evgeny Voevodin <evgeny.voevodin@intel.com>
[vgupta: updated changelog and also added some comments]
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-04-22 18:12:31 +05:30
Greg Kroah-Hartman
d40d334743 phy: for 4.6-rc
*) make rockchip-dp and rockchip-emmc PHY child device of
    GRF
 
 Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJXEzFIAAoJEA5ceFyATYLZ4xYP/1tiOhG2LI0Svd+8wwbc5bFH
 oJNwu8Wo6aPhHHvG4UEdSHMgmcdsFRZMK4p8cvL5QoT4sD8g0AuAvDN6qAPob5PI
 upGkKC1EeR3Z9o4vmyyeHnAryodHKa4rgo0rD/cmx0nVcDw9YV82WUGBsZIPwxCz
 npXNUHhuzQQjAz5E1AS7CipT/y4JXLdqMdUoJGd1zLo9zr53h9eBs/zwgJHMDZQT
 mk4PIG6bJ/bilDYhPoTg12klJMtVRCo6rwgV7dykMEHwuaAfraFBZ86ngUW1t3fC
 S3DsFKBD/TUg6gsF2+SVqm2Z2nH3s6473GDoenfMWkhYvqcfkZKlgxqx2tzNyG6a
 QRPj+ZBZ64z5yb4MVsNUgUhDV1AbazcDYsxPH3GaaaKp4BT8IC5uNLHkEsfdlaXD
 mE4myf1UtgOrHaP3Rg3V7anU4RsHIW2uLsJVuaMfzAgMyx6J0YsCvB3HgVpVCIGP
 MvoPkIijAmg9ToCW0PIQClKo18V8f9VAioqBarL4NapE7xQZBx13zIvnbyJxOZoR
 99DX1ELSxP+5tOvkbH4DdY/21enVfKnKMkkxv0Rk0s6BHVDEWTUlYsrZdfH/D2sl
 CUNf4VoEkxM7VTWEC5q3kXcvl7W1KxEyAwjSZ70gIG4w7WR0juFPFUkRBOkKsFFn
 XCE85Mr4wLtoTSv5oYxl
 =Wh2y
 -----END PGP SIGNATURE-----

Merge tag 'phy-for-4.6-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus

Kishon writes:

phy: for 4.6-rc

*) make rockchip-dp and rockchip-emmc PHY child device of
   GRF

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2016-04-22 17:13:24 +09:00
Tony Luck
ea5dfb5fae x86 EDAC, sb_edac.c: Take account of channel hashing when needed
Haswell and Broadwell can be configured to hash the channel
interleave function using bits [27:12] of the physical address.

On those processor models we must check to see if hashing is
enabled (bit21 of the HASWELL_HASYSDEFEATURE2 register) and
act accordingly.

Based on a patch by patrickg <patrickg@supermicro.com>

Tested-by: Patrick Geary <patrickg@supermicro.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Aristeu Rozanski <arozansk@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-edac@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-04-22 10:10:01 +02:00
Tony Luck
ff15e95c82 x86 EDAC, sb_edac.c: Repair damage introduced when "fixing" channel address
In commit:

  eb1af3b71f ("Fix computation of channel address")

I switched the "sck_way" variable from holding the log2 value read
from the h/w to instead be the actual number. Unfortunately it
is needed in log2 form when used to shift the address.

Tested-by: Patrick Geary <patrickg@supermicro.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Aristeu Rozanski <arozansk@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-edac@vger.kernel.org
Cc: stable@vger.kernel.org
Fixes: eb1af3b71f ("Fix computation of channel address")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-04-22 10:10:01 +02:00
Greg Kroah-Hartman
5813dea9f3 usb: fixes for v4.6-rc5
No more major fixes left. Out of the 6 fixes we have
 here, 4 are on dwc3.
 
 The most important is the memory leak fix in
 dwc3/debugfs.c. We also have a fix for PHY handling
 in suspend/resume and a fix for dwc3-omap's error
 handling.
 
 Suspend/resume also had the potential to trigger a
 NULL pointer dereference on dwc3; that's also fixed
 now.
 
 Our good ol' ffs function gets a use-after-free fix
 while the generic composite.c layer has a robustness
 fix by making sure reserved fields of a possible SSP
 device capability descriptor is cleared to 0.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXFzliAAoJEIaOsuA1yqREv0YP/Ar0niU7Mpu4iW34YAqLIDyT
 oEilZ+t/ARoxmDLbsPVc+Kg/Jrg6/NooJn8/JuSnpY6kELM6V3LzFhKTQ2S31HLh
 5pNIhHhHP+8XE6Gzv0Zaq8zrVL+zDH9Q7X4/Rha/RNwNYZ2w+Ca6iMQsW+Sn+wep
 2f9kkmlOOcceJI25l3j5bBkIHvnZ3R/D94MhMGSqMYpXbQzrnWNSzUQEuVAZJjYN
 2xgJegXzEEZdBW8p+xrhFcdGL1cKCe/Cs+NaiTP2mErM7CQIifc19dchZP5ztHw2
 pzLk6bohnu0ZVTsP2lIWW/SrR2u0Khjdh9Olvya3Gp+/althNvmvs8PIJbMVkQVM
 pj4Bgf0avAqzxtgCA1EwbmTEF6vqnENJfNbX8zROIuQCmgYxnInArxNLts8iBwpW
 VpsWTaez3tnFHm3HebOsspgByJiRwGBXPNL35/FPOebz9Fe28SHFslUqi2BKZSYH
 QJ1GfLUJHqfAvusbv8nDqxlzTiLrUOnAxYe0QB0ybk+eNu86RiiEpMnWU+ARZCOr
 cFdIv2S4UgLzO5dYPnA8CKYz7/4SpvcqXe9WGVBCElyP0bFVO5PFKuo07SZDYka9
 cDj8f/7tzPtRiiegscbQd5QS1z1sHTRmovbeQL8/FVd5vDfb2R6WnsUnc0qvLAjm
 vv5x9AhwF9Rdkhf0c10g
 =6Rqw
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v4.6-rc5

No more major fixes left. Out of the 6 fixes we have
here, 4 are on dwc3.

The most important is the memory leak fix in
dwc3/debugfs.c. We also have a fix for PHY handling
in suspend/resume and a fix for dwc3-omap's error
handling.

Suspend/resume also had the potential to trigger a
NULL pointer dereference on dwc3; that's also fixed
now.

Our good ol' ffs function gets a use-after-free fix
while the generic composite.c layer has a robustness
fix by making sure reserved fields of a possible SSP
device capability descriptor is cleared to 0.
2016-04-22 17:09:05 +09:00
Jan Beulich
103f6112f2 x86/mm/xen: Suppress hugetlbfs in PV guests
Huge pages are not normally available to PV guests. Not suppressing
hugetlbfs use results in an endless loop of page faults when user mode
code tries to access a hugetlbfs mapped area (since the hypervisor
denies such PTEs to be created, but error indications can't be
propagated out of xen_set_pte_at(), just like for various of its
siblings), and - once killed in an oops like this:

  kernel BUG at .../fs/hugetlbfs/inode.c:428!
  invalid opcode: 0000 [#1] SMP
  ...
  RIP: e030:[<ffffffff811c333b>]  [<ffffffff811c333b>] remove_inode_hugepages+0x25b/0x320
  ...
  Call Trace:
   [<ffffffff811c3415>] hugetlbfs_evict_inode+0x15/0x40
   [<ffffffff81167b3d>] evict+0xbd/0x1b0
   [<ffffffff8116514a>] __dentry_kill+0x19a/0x1f0
   [<ffffffff81165b0e>] dput+0x1fe/0x220
   [<ffffffff81150535>] __fput+0x155/0x200
   [<ffffffff81079fc0>] task_work_run+0x60/0xa0
   [<ffffffff81063510>] do_exit+0x160/0x400
   [<ffffffff810637eb>] do_group_exit+0x3b/0xa0
   [<ffffffff8106e8bd>] get_signal+0x1ed/0x470
   [<ffffffff8100f854>] do_signal+0x14/0x110
   [<ffffffff810030e9>] prepare_exit_to_usermode+0xe9/0xf0
   [<ffffffff814178a5>] retint_user+0x8/0x13

This is CVE-2016-3961 / XSA-174.

Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Juergen Gross <JGross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: stable@vger.kernel.org
Cc: xen-devel <xen-devel@lists.xenproject.org>
Link: http://lkml.kernel.org/r/57188ED802000078000E431C@prv-mh.provo.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-04-22 10:05:00 +02:00
Juergen Gross
78b0634d28 x86/doc: Correct limits in Documentation/x86/x86_64/mm.txt
Correct the size of the module mapping space and the maximum available
physical memory size of current processors.

Signed-off-by: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: corbet@lwn.net
Cc: linux-doc@vger.kernel.org
Link: http://lkml.kernel.org/r/1461310504-15977-1-git-send-email-jgross@suse.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-04-22 10:03:24 +02:00
Sebastian Andrzej Siewior
3b9d6da67e cpu/hotplug: Fix rollback during error-out in __cpu_disable()
The recent introduction of the hotplug thread which invokes the callbacks on
the plugged cpu, cased the following regression:

If takedown_cpu() fails, then we run into several issues:

 1) The rollback of the target cpu states is not invoked. That leaves the smp
    threads and the hotplug thread in disabled state.

 2) notify_online() is executed due to a missing skip_onerr flag. That causes
    that both CPU_DOWN_FAILED and CPU_ONLINE notifications are invoked which
    confuses quite some notifiers.

 3) The CPU_DOWN_FAILED notification is not invoked on the target CPU. That's
    not an issue per se, but it is inconsistent and in consequence blocks the
    patches which rely on these states being invoked on the target CPU and not
    on the controlling cpu. It also does not preserve the strict call order on
    rollback which is problematic for the ongoing state machine conversion as
    well.

To fix this we add a rollback flag to the remote callback machinery and invoke
the rollback including the CPU_DOWN_FAILED notification on the remote
cpu. Further mark the notify online state with 'skip_onerr' so we don't get a
double invokation.

This workaround will go away once we moved the unplug invocation to the target
cpu itself.

[ tglx: Massaged changelog and moved the CPU_DOWN_FAILED notifiaction to the
  	target cpu ]

Fixes: 4cb28ced23 ("cpu/hotplug: Create hotplug threads")
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-s390@vger.kernel.org
Cc: rt@linutronix.de
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
Link: http://lkml.kernel.org/r/20160408124015.GA21960@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-04-22 09:49:49 +02:00
Daniel Lezcano
16eeed7e55 clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test
Commit 0881841f7e introduced a regression by inverting a test check
after calling clocksource_mmio_init(). That results on the system to
hang at boot time.

Fix it by inverting the test again.

Fixes: 0881841f7e ("Replace code by clocksource_mmio_init")
Reported-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2016-04-22 09:22:37 +02:00
Steven Rostedt
c2bb9e32e2 objtool: Fix Makefile to properly see if libelf is supported
When doing a make allmodconfig, I hit the following compile error:

  In file included from builtin-check.c:32:0:
  elf.h:22:18: fatal error: gelf.h: No such file or directory
  compilation terminated.
  ...

Digging into it, it appears that the $(shell ..) command in the Makefile does
not give the proper result when it fails to find -lelf, and continues to
compile objtool.

Instead, use the "try-run" makefile macro to perform the test. This gives a
proper result for both cases.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Chris J Arges <chris.j.arges@canonical.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Pedro Alves <palves@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: live-patching@vger.kernel.org
Fixes: 442f04c34a ("objtool: Add tool to perform compile-time stack metadata validation")
Link: http://lkml.kernel.org/r/20160420153234.GA24032@home.goodmis.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-04-22 09:00:57 +02:00
Dave Airlie
18cdfe751f Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Misc radeon and amdgpu bug fixes for 4.6.

* 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux:
  amdgpu/uvd: add uvd fw version for amdgpu
  drm/amdgpu: forbid mapping of userptr bo through radeon device file
  drm/radeon: forbid mapping of userptr bo through radeon device file
  drm/amdgpu: bump the afmt limit for CZ, ST, Polaris
  drm/amdgpu: use defines for CRTCs and AMFT blocks
  drm/radeon: print a message if ATPX dGPU power control is missing
  Revert "drm/radeon: disable runtime pm on PX laptops without dGPU power control"
  drm/amdgpu/acp: fix resume on CZ systems with AZ audio
  drm/radeon: add a quirk for a XFX R9 270X
  drm/radeon: print pci revision as well as pci ids on driver load
  drm/amdgpu: when suspending, if uvd/vce was running. need to cancel delay work.
  drm/radeon: fix initial connector audio value
2016-04-22 10:39:26 +10:00
Huacai Chen
221004c66a drm: Loongson-3 doesn't fully support wc memory
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: stable@vger.kernel.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22 10:24:11 +10:00
Dave Airlie
005e8dad01 Merge branch 'linux-4.6' of git://github.com/skeggsb/linux into drm-fixes
transform feedback fix.

* 'linux-4.6' of git://github.com/skeggsb/linux:
  drm/nouveau/gr/gf100: select a stream master to fixup tfb offset queries
2016-04-22 10:09:33 +10:00
Ben Skeggs
28dca90533 drm/nouveau/gr/gf100: select a stream master to fixup tfb offset queries
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
2016-04-22 10:08:05 +10:00
Sonny Jiang
562e2689ba amdgpu/uvd: add uvd fw version for amdgpu
Was previously always hardcoded to 0.

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2016-04-21 20:03:47 -04:00
Jérôme Glisse
054892ed6a drm/amdgpu: forbid mapping of userptr bo through radeon device file
Allowing userptr bo which are basicly a list of page from some vma
(so either anonymous page or file backed page) would lead to serious
corruption of kernel structures and counters (because we overwrite
the page->mapping field when mapping buffer).

This will already block if the buffer was populated before anyone does
try to mmap it because then TTM_PAGE_FLAG_SG would be set in in the
ttm_tt flags. But that flag is check before ttm_tt_populate in the ttm
vm fault handler.

So to be safe just add a check to verify_access() callback.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-04-21 20:03:47 -04:00
Jérôme Glisse
b5dcec693f drm/radeon: forbid mapping of userptr bo through radeon device file
Allowing userptr bo which are basicly a list of page from some vma
(so either anonymous page or file backed page) would lead to serious
corruption of kernel structures and counters (because we overwrite
the page->mapping field when mapping buffer).

This will already block if the buffer was populated before anyone does
try to mmap it because then TTM_PAGE_FLAG_SG would be set in in the
ttm_tt flags. But that flag is check before ttm_tt_populate in the ttm
vm fault handler.

So to be safe just add a check to verify_access() callback.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-04-21 20:03:46 -04:00
Alex Deucher
83c5cda2cc drm/amdgpu: bump the afmt limit for CZ, ST, Polaris
Fixes array overflow on these chips.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2016-04-21 20:03:46 -04:00
Alex Deucher
3ea25f858f drm/amdgpu: use defines for CRTCs and AMFT blocks
Prerequiste for the next patch which ups the limits.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2016-04-21 20:03:45 -04:00
cpaul@redhat.com
deba0a2af9 drm/dp/mst: Validate port in drm_dp_payload_send_msg()
With the joys of things running concurrently, there's always a chance
that the port we get passed in drm_dp_payload_send_msg() isn't actually
valid anymore. Because of this, we need to make sure we validate the
reference to the port before we use it otherwise we risk running into
various race conditions. For instance, on the Dell MST monitor I have
here for testing, hotplugging it enough times causes us to kernel panic:

[drm:intel_mst_enable_dp] 1
[drm:drm_dp_update_payload_part2] payload 0 1
[drm:intel_get_hpd_pins] hotplug event received, stat 0x00200000, dig 0x10101011, pins 0x00000020
[drm:intel_hpd_irq_handler] digital hpd port B - short
[drm:intel_dp_hpd_pulse] got hpd irq on port B - short
[drm:intel_dp_check_mst_status] got esi 00 10 00
[drm:drm_dp_update_payload_part2] payload 1 1
general protection fault: 0000 [#1] SMP
…
Call Trace:
 [<ffffffffa012b632>] drm_dp_update_payload_part2+0xc2/0x130 [drm_kms_helper]
 [<ffffffffa032ef08>] intel_mst_enable_dp+0xf8/0x180 [i915]
 [<ffffffffa0310dbd>] haswell_crtc_enable+0x3ed/0x8c0 [i915]
 [<ffffffffa030c84d>] intel_atomic_commit+0x5ad/0x1590 [i915]
 [<ffffffffa01db877>] ? drm_atomic_set_crtc_for_connector+0x57/0xe0 [drm]
 [<ffffffffa01dc4e7>] drm_atomic_commit+0x37/0x60 [drm]
 [<ffffffffa0130a3a>] drm_atomic_helper_set_config+0x7a/0xb0 [drm_kms_helper]
 [<ffffffffa01cc482>] drm_mode_set_config_internal+0x62/0x100 [drm]
 [<ffffffffa01d02ad>] drm_mode_setcrtc+0x3cd/0x4e0 [drm]
 [<ffffffffa01c18e3>] drm_ioctl+0x143/0x510 [drm]
 [<ffffffffa01cfee0>] ? drm_mode_setplane+0x1b0/0x1b0 [drm]
 [<ffffffff810f79a7>] ? hrtimer_start_range_ns+0x1b7/0x3a0
 [<ffffffff81212962>] do_vfs_ioctl+0x92/0x570
 [<ffffffff81590852>] ? __sys_recvmsg+0x42/0x80
 [<ffffffff81212eb9>] SyS_ioctl+0x79/0x90
 [<ffffffff816b4e32>] entry_SYSCALL_64_fastpath+0x1a/0xa4
RIP  [<ffffffffa012b026>] drm_dp_payload_send_msg+0x146/0x1f0 [drm_kms_helper]

Which occurs because of the hotplug event shown in the log, which ends
up causing DRM's dp helpers to drop the port we're updating the payload
on and panic.

CC: stable@vger.kernel.org
Signed-off-by: Lyude <cpaul@redhat.com>
Reviewed-by: David Airlie <airlied@linux.ie>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22 09:53:17 +10:00
Dave Airlie
3addc4e3a7 Merge branch 'linux-4.6' of git://github.com/skeggsb/linux into drm-fixes
Single nouveau regression fix
* 'linux-4.6' of git://github.com/skeggsb/linux:
  drm/nouveau/kms: fix setting of default values for dithering properties
2016-04-22 09:53:07 +10:00
Ben Skeggs
38bdcfc1fc drm/nouveau/kms: fix setting of default values for dithering properties
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-04-22 09:24:31 +10:00
Dave Airlie
762ce44589 Merge tag 'drm-intel-fixes-2016-04-21' of git://anongit.freedesktop.org/drm-intel into drm-fixes
Hi Dave, fixes all around, all but one are cc: stable material, the most
important ones are likely the Skylake hang fixes from Mika.

* tag 'drm-intel-fixes-2016-04-21' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Use fw_domains_put_with_fifo() on HSW
  drm/i915: Force ringbuffers to not be at offset 0
  drm/i915: Adjust size of PIPE_CONTROL used for gen8 render seqno write
  drm/i915/skl: Fix spurious gpu hang with gt3/gt4 revs
  drm/i915/skl: Fix rc6 based gpu/system hang
  drm/i915/userptr: Hold mmref whilst calling get-user-pages
  drm/i915: Fixup the free space logic in ring_prepare
  drm/i915/skl+: Use plane size for relative data rate calculation
2016-04-22 09:09:11 +10:00
Linus Torvalds
5f44abd041 RTC fixes for 4.6
A documentation fix for s3c and two fixes for the ds1307.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJXGVFgAAoJENiigzvaE+LCOVAQAIMHfxfhcKPv05RXgOuxrIJ5
 0YdQZG9/CTRr93KgfeeDznI1Zdsg+YdZQxuSzTmlxMt5KBmW1zqs0iAxLQXjwNVO
 Sjb+kkNh7p2d5UkKfEqrSCsz4PRYMR5GJ3PINN9M2b5txOQjiQ45TizrGGNoi893
 AYvvlUrGs8aVOOyV2IaoKh5BB+H56TAPSQBA3i1hJ6epjirchL4ySbmYTMT3bIWL
 c9Hkr9TLH8zltnkyfYWs1pjUgheOS5VerB+oRXB+I46Vg6Ob4i+MxdYdbe11c4uO
 ew/xbztiJF2/iHB7/V4CFAxkUl/f+z13ufueo39oVxAdvuQaX+kZbUYdBYtu+tNL
 5nM1gcDDl87/MhbPogjhpj3WyJB1XCq2ziQ7//ZkEJ7ILWEx4bVoWaLEIbNrsqW2
 zp2X+lQMSKx8gHRxO+PnCA93WzKKy7tGZ7G7ct7E4M0UdTR9/LrCnCo4OwGp0K2e
 QHVWVyJSeH1xJnhHvC2hk5QU/g9JQbyjBTH7WVL/CYbUIihe0i+Vlw+8NLF6tA/1
 BhRkuoQC9gCq0Qjt304WT62y0U5eBDjsgp1VN6i/B7ovIqLoBQIVP+KnEzClHMmM
 7wouYhEU7TlU3ugYgmnFiS2zH2544qB+p2sU0uCHBHXah7wUyagnBwvw4/zuS2Tf
 390v+/CwnuKm1hGBsOSV
 =tU6V
 -----END PGP SIGNATURE-----

Merge tag 'rtc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC fixes from Alexandre Belloni:
 "A few fixes for the RTC subsystem.  The documentation fix already
  missed 4.5 so I think it is worth taking it now:

  A documentation fix for s3c and two fixes for the ds1307"

* tag 'rtc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: ds1307: Use irq when available for wakeup-source device
  rtc: ds1307: ds3231 temperature s16 overflow
  rtc: s3c: Document in binding that only s3c6410 needs a src clk
2016-04-21 15:41:13 -07:00
Linus Torvalds
f78fe0817a Power management fixes for v4.6-rc5
- Fix an intel_pstate driver problem causing CPUs to get stuck in
    the highest P-state when completely idle uncovered by the recent
    switch over from using timers (Rafael Wysocki).
 
  - Avoid attempts to get the current CPU frequency when all devices
    (like I2C controllers that may be nedded for that purpose) have
    been suspended during system suspend/resume (Rafael Wysocki).
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJXGS4tAAoJEILEb/54YlRxOgYQAJfjMJdift90vjXW1rvptx1E
 mHDweIky3ZhsUifBiOHbxkkIH0zOD4gpi761h/0AefK48wwA/4vflrJar5p/ZnyC
 1GnMm/lZ66n2K6kCKnYyhs/CFRqYDDZerhhp88qvA1G9s++wDlmcwqDOfAXF1hFi
 O7N6bkXsElKowTJtJYRwt477NhMOCzSFJBfoUbCFqi5S4t5aksgJurZgdfGxAMiP
 oJ9E8mYzkUlLMxyceZJTk/FRe2x0zS9OibpJB3QfChFJ3EMp6BzT5r8G931yFd53
 YdV7irw6vZiIM6L04BRzKEODciV71pznBTq2aKGYYx1BdO/2urQ27WhfRdRcVngW
 OaVDBH7vDHO3BNt8JRJ3C9Veg2fj2rRTKwyoEc5fbXUf2Af5Wx0XxbzuZ38YEqY1
 KTBKgnYfzpyvLpjIsF0V8Wdzkx4QZC/XLtKicR3O16Dl/MCMTmHvv5s0fQ8b+hJS
 GF8BnTtLROjE4tZo19xbqv5uW1hRO7O3V7RqW7rqstmAbCvWzTkZMRsEiCJFw4aU
 6Sh2Ds8weQjhMG/NHYLLyMNWKfvF8bj7OKalo0CnVbb3RFrRVbP0m95VHDL7MWgS
 JeZDF5rsA0K6vcDdnZW1qUg983W63w0uG2uvG9UGnT8bN5fHQEAdESy1QfeydXIl
 NvvIFzfo0ISKuahL5LdE
 =SNbz
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "Two fixes for issues introduced recently, one for an intel_pstate
  driver problem uncovered by the recent switch over from using timers
  and the other one for a potential cpufreq core problem related to
  system suspend/resume.

  Specifics:

   - Fix an intel_pstate driver problem causing CPUs to get stuck in the
     highest P-state when completely idle uncovered by the recent switch
     over from using timers (Rafael Wysocki).

   - Avoid attempts to get the current CPU frequency when all devices
     (like I2C controllers that may be nedded for that purpose) have
     been suspended during system suspend/resume (Rafael Wysocki)"

* tag 'pm+acpi-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: Abort cpufreq_update_current_freq() for cpufreq_suspended set
  intel_pstate: Avoid getting stuck in high P-states when idle
2016-04-21 14:29:34 -07:00
Nishanth Menon
38a7a73e8e rtc: ds1307: Use irq when available for wakeup-source device
With commit 8bc2a40730 ("rtc: ds1307: add support for the
DT property 'wakeup-source'") we lost the ability for rtc irq
functionality for devices that are actually hooked on a real IRQ
line and have capability to wakeup as well. This is not an expected
behavior. So, instead of just not requesting IRQ, skip the IRQ
requirement only if interrupts are not defined for the device.

Fixes: 8bc2a40730 ("rtc: ds1307: add support for the DT property 'wakeup-source'")
Reported-by: Tony Lindgren <tony@atomide.com>
Cc: Michael Lange <linuxstuff@milaw.biz>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-04-21 23:21:00 +02:00
Zhuang Yuyao
9a3dce62cc rtc: ds1307: ds3231 temperature s16 overflow
while retrieving temperature from ds3231, the result may be overflow
since s16 is too small for a multiplication with 250.

ie. if temp_buf[0] == 0x2d, the result (s16 temp) will be negative.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Tested-by: Michael Tatarinov <kukabu@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-04-21 23:20:59 +02:00
Linus Torvalds
c5edde3a81 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) Fix memory leak in iwlwifi, from Matti Gottlieb.

 2) Add missing registration of netfilter arp_tables into initial
    namespace, from Florian Westphal.

 3) Fix potential NULL deref in DecNET routing code.

 4) Restrict NETLINK_URELEASE to truly bound sockets only, from Dmitry
    Ivanov.

 5) Fix dst ref counting in VRF, from David Ahern.

 6) Fix TSO segmenting limits in i40e driver, from Alexander Duyck.

 7) Fix heap leak in PACKET_DIAG_MCLIST, from Mathias Krause.

 8) Ravalidate IPV6 datagram socket cached routes properly, particularly
    with UDP, from Martin KaFai Lau.

 9) Fix endian bug in RDS dp_ack_seq handling, from Qing Huang.

10) Fix stats typing in bcmgenet driver, from Eric Dumazet.

11) Openvswitch needs to orphan SKBs before ipv6 fragmentation handing,
    from Joe Stringer.

12) SPI device reference leak in spi_ks8895 PHY driver, from Mark Brown.

13) atl2 doesn't actually support scatter-gather, so don't advertise the
    feature.  From Ben Hucthings.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (72 commits)
  openvswitch: use flow protocol when recalculating ipv6 checksums
  Driver: Vmxnet3: set CHECKSUM_UNNECESSARY for IPv6 packets
  atl2: Disable unimplemented scatter/gather feature
  net/mlx4_en: Split SW RX dropped counter per RX ring
  net/mlx4_core: Don't allow to VF change global pause settings
  net/mlx4_core: Avoid repeated calls to pci enable/disable
  net/mlx4_core: Implement pci_resume callback
  net: phy: spi_ks8895: Don't leak references to SPI devices
  net: ethernet: davinci_emac: Fix platform_data overwrite
  net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable
  qede: Fix single MTU sized packet from firmware GRO flow
  qede: Fix setting Skb network header
  qede: Fix various memory allocation error flows for fastpath
  tcp: Merge tx_flags and tskey in tcp_shifted_skb
  tcp: Merge tx_flags and tskey in tcp_collapse_retrans
  drivers: net: cpsw: fix wrong regs access in cpsw_ndo_open
  tcp: Fix SOF_TIMESTAMPING_TX_ACK when handling dup acks
  openvswitch: Orphan skbs before IPv6 defrag
  Revert "Prevent NUll pointer dereference with two PHYs on cpsw"
  VSOCK: Only check error on skb_recv_datagram when skb is NULL
  ...
2016-04-21 12:57:34 -07:00
Simon Horman
b4f70527f0 openvswitch: use flow protocol when recalculating ipv6 checksums
When using masked actions the ipv6_proto field of an action
to set IPv6 fields may be zero rather than the prevailing protocol
which will result in skipping checksum recalculation.

This patch resolves the problem by relying on the protocol
in the flow key rather than that in the set field action.

Fixes: 83d2b9ba1a ("net: openvswitch: Support masked set actions.")
Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-21 15:28:47 -04:00
Shrikrishna Khare
f0d437809d Driver: Vmxnet3: set CHECKSUM_UNNECESSARY for IPv6 packets
For IPv6, if the device indicates that the checksum is correct, set
CHECKSUM_UNNECESSARY.

Reported-by: Subbarao Narahari <snarahari@vmware.com>
Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Signed-off-by: Jin Heo <heoj@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-21 15:28:05 -04:00
Ben Hutchings
f43bfaeddc atl2: Disable unimplemented scatter/gather feature
atl2 includes NETIF_F_SG in hw_features even though it has no support
for non-linear skbs.  This bug was originally harmless since the
driver does not claim to implement checksum offload and that used to
be a requirement for SG.

Now that SG and checksum offload are independent features, if you
explicitly enable SG *and* use one of the rare protocols that can use
SG without checkusm offload, this potentially leaks sensitive
information (before you notice that it just isn't working).  Therefore
this obscure bug has been designated CVE-2016-2117.

Reported-by: Justin Yackoski <jyackoski@crypto-nite.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: ec5f061564 ("net: Kill link between CSUM and SG features.")
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-21 15:12:23 -04:00
Paul Burton
91951f980e irqchip/mips-gic: Don't overrun pcpu_masks array
Commit 2a07870511 ("irqchip/mips-gic: Use gic_vpes instead of
NR_CPUS") & commit 78930f09b9 ("irqchip/mips-gic: Clear percpu_masks
correctly when mapping") both introduce code which accesses gic_vpes
entries in the pcpu_masks array. However, this array has length NR_CPUS.
If NR_CPUS is less than gic_vpes (ie. the kernel supports use of less
CPUs than are present in the system) then we overrun the array, clobber
some other data & generally die pretty promptly.

Most notably this affects uniprocessor kernels running on any multicore
or multithreaded Malta with a GIC (ie. the vast majority of real Malta
boards).

Fix this by only accessing up to min(gic_vpes, NR_CPUS) entries in the
pcpu_masks array, preventing the array overrun.

Fixes: 2a07870511 ("irqchip/mips-gic: Use gic_vpes instead of NR_CPUS")
Fixes: 78930f09b9 ("irqchip/mips-gic: Clear percpu_masks correctly when mapping")
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/1461234714-9975-1-git-send-email-paul.burton@imgtec.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-04-21 21:04:29 +02:00
David S. Miller
669c00c009 Merge branch 'mlx4-fixes'
Or Gerlitz says:

====================
Mellaox 40G driver fixes for 4.6-rc

With the fix for ARM bug being under the works, these are
few other fixes for mlx4 we have ready to go.

Eran addressed the problematic/wrong reporting of dropped packets, Daniel
fixed some matters related to PPC EEH's and Jenny's patch makes sure
VFs can't change the port's pause settings.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-21 15:02:41 -04:00
Eran Ben Elisha
d21ed3a311 net/mlx4_en: Split SW RX dropped counter per RX ring
Count SW packet drops per RX ring instead of a global counter. This
will allow monitoring the number of rx drops per ring.

In addition, SW rx_dropped counter was overwritten by HW rx_dropped
counter, sum both of them instead to show the accurate value.

Fixes: a3333b35da ('net/mlx4_en: Moderate ethtool callback to [...] ')
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reported-by: Brenden Blanco <bblanco@plumgrid.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-21 15:02:40 -04:00
Eugenia Emantayev
2a500090a4 net/mlx4_core: Don't allow to VF change global pause settings
Currently changing global pause settings is done via SET_PORT
command with input modifier GENERAL. This command is allowed
for each VF since MTU setting is done via the same command.

Change the above to the following scheme: before passing the
request to the FW, the PF will check whether it was issued
by a slave. If yes, don't change global pause and warn,
otherwise change to the requested value and store for
further reference.

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-21 15:02:40 -04:00