Commit Graph

507214 Commits

Author SHA1 Message Date
Chris Wilson
ee73c61c0a drm/i915: Skip allocating shadow batch for 0-length batches
Since

commit 17cabf571e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jan 14 11:20:57 2015 +0000

    drm/i915: Trim the command parser allocations

we may then try to allocate a zero-sized object and attempt to extract
its pages. Understandably this fails.

Note that the real offender seems to be

commit b9ffd80ed6
Author: Brad Volkin <bradley.d.volkin@intel.com>
Date:   Thu Dec 11 12:13:10 2014 -0800

    drm/i915: Use batch length instead of object size in command parser

Testcase: igt/gem_exec_nop #ivb,byt,hsw
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[cherry picked from commit 743e78c1d7
from drm-intel-next because 4.0 seems to be affected by this too,
despite that the obvious culprit is definitely not in 4.0. Whatever,
if fixes a bug.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-30 16:59:47 +02:00
Kalle Valo
69628cd065 * fix a memory leak: we leaked memory each time the module
was loaded.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVGOp+AAoJEC0Llv5uNjIBtnUQALBt98Uf5dWzzb1Kzw0EMB6k
 FMR5sY85BZz9EwvTIm5ZE0ZyLjZF2p8qvxw1mc2OWmaS5HIGOCKWXRRn9LqYmD4P
 kUcYotBpbxvTQI7rNa7ENjo2yXwEC7MPWRJcgjQdUD0NxdIc00SPe/Y5upyOreDn
 NmToXwl3f4SAoe4e7/QtjbG3tj2hlsFmkfDjW0bdlJBfcl+ug69aHEFOlEv/LYfS
 WLlWdBcFWBUjnn90AFtw9vm1zoqPCw9ogKp8RPjuTdKcOEdt9t5jTQk4BJ5v4Zoz
 KE1E1LB97cc7RUxeSBzlC023Getd2nypVQJdFw18PD23vJVvHVQxqqWS8GTVmKZ5
 ybnuSJLLUlZ7s2QjI6vY6y42OTP4q4g/q6dpm1Hcl+WUl7mKdDFmnOnzSnhV6E1O
 yqj3inetRwYXHRCc4hCLXQz1CH5c4/qwJfXvonHHz3Xp/L214u1KVoRyPXlYQo05
 KdjjdAOIdMxApT2Qv+lOGd8U9KtPT8SJcbkM17rwoabD9mXYg5/3g1Db3e0uk3wj
 zmFpAbSSsUb0YNGSNbWk1Ya6kvuenXQdgQSphtK+zvlJ6A3FAnwAxlYOFaKvXQ/i
 0wrSsRbEDySIAcwwnxR2tCc4P0O4pl1OCJ2SmqBIxmiUJ6nzNtUptOd2H8FyCAF1
 ocv0i4LEKEPuRizSc0+Y
 =wIgU
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-for-kalle-2015-03-30' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

* fix a memory leak: we leaked memory each time the module
was loaded.
2015-03-30 09:39:12 +03:00
Dave Airlie
91fd89660b Merge branch 'drm-fixes-4.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
A few more fixes for 4.0 for radeon.  Sorry for the delay, I was
a little under the weather this week and time got away from me.

* 'drm-fixes-4.0' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: programm the VCE fw BAR as well
  drm/radeon: always dump the ring content if it's available
  radeon: Do not directly dereference pointers to BIOS area.
  drm/radeon/dpm: fix 120hz handling harder
2015-03-30 12:17:27 +10:00
Linus Torvalds
e42391cd04 Linux 4.0-rc6 2015-03-29 15:26:31 -07:00
Linus Torvalds
08f41f7c35 ARM: SoC fixes
The latest and greatest fixes for ARM platform code. Worth pointing out are:
 
 - Lines-wise, largest is a PXA fix for dealing with interrupts on DT that was
   quite broken. It's still newish code so while we could have held this off,
   it seemed appropriate to include now
 - Some GPIO fixes for OMAP platforms added a few lines. This was also fixes for
   code recently added (this release).
 - Small OMAP timer fix to behave better with partially upstreamed platforms,
   which is quite welcome.
 - Allwinner fixes about operating point control, reducing overclocking in some
   cases for better stability.
 
 + a handful of other smaller fixes across the map.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVGGpHAAoJEIwa5zzehBx3vi8QAKRlHuJzKlEAGOglrmaYLNwr
 /eSx6wQQlMa+DFr6YVgypYvImCpvbOVPRGMFpaAyriKDrWcu1HiEF4nvq+3Iq1Qt
 yqPRbTh2xU1qZ9kmidcY5rhSX7IO7Bgeo0fV4q1Dyt5rgUKfIRhE6BnYO5C9TbY5
 CoFri3sFSyeAwIUYcbvt7OElVTB2ro6xmqfc6ZspPqPLYnbc9wSSWSKLV8EFM+OS
 6DD3UFiTPN1o0nb/Vo/fuOsryCE3oR2wfomWAr7XMeTbB2DOugocre0ttyxhhbBt
 Dkc0u3/a75AtisIPkoHPGQZX3671SnUKmge9VYGeMWBHpGCvXJMMvPonbkr2yema
 gxH5/KPBwmv4c/asL/nfKiQnHowxLGdCDVCQ+NKfhyvEKZ7WzwVzXekrWn3L8u1W
 xUy3O0XU3YQJVXX/S2ec5RwsGe9K/5OanKTkjeJ8q5zLtJA0ax0fJGyQ+/iEcjFy
 CnlW857EL1ChXQ2WItKvaLyxe/mea4HGonHe5nZSRVZtTVTYTSFASrJchmRR/eu2
 NXnZPBtvAEn8MqTuNyVVjqwifojK8jdVox+mlNoQUoehLhyAYc4IHbC6+/2c5HU7
 dW5tFMGPOlQNmYbXqe+oKSUaaSWcxUaPTzmD6IRUrozrhabyv/lb79GXDLb2c6QL
 Vz7WtY1qTD7TOwPv+Xyd
 =OclH
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "The latest and greatest fixes for ARM platform code.  Worth pointing
  out are:

   - Lines-wise, largest is a PXA fix for dealing with interrupts on DT
     that was quite broken.  It's still newish code so while we could
     have held this off, it seemed appropriate to include now

   - Some GPIO fixes for OMAP platforms added a few lines.  This was
     also fixes for code recently added (this release).

   - Small OMAP timer fix to behave better with partially upstreamed
     platforms, which is quite welcome.

   - Allwinner fixes about operating point control, reducing
     overclocking in some cases for better stability.

  plus a handful of other smaller fixes across the map"

* tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  arm64: juno: Fix misleading name of UART reference clock
  ARM: dts: sunxi: Remove overclocked/overvoltaged OPP
  ARM: dts: sun4i: a10-lime: Override and remove 1008MHz OPP setting
  ARM: socfpga: dts: fix spi1 interrupt
  ARM: dts: Fix gpio interrupts for dm816x
  ARM: dts: dra7: remove ti,hwmod property from pcie phy
  ARM: OMAP: dmtimer: disable pm runtime on remove
  ARM: OMAP: dmtimer: check for pm_runtime_get_sync() failure
  ARM: OMAP2+: Fix socbus family info for AM33xx devices
  ARM: dts: omap3: Add missing dmas for crypto
  ARM: dts: rockchip: disable gmac by default in rk3288.dtsi
  MAINTAINERS: add rockchip regexp to the ARM/Rockchip entry
  ARM: pxa: fix pxa interrupts handling in DT
  ARM: pxa: Fix typo in zeus.c
  ARM: sunxi: Have ARCH_SUNXI select RESET_CONTROLLER for clock driver usage
2015-03-29 15:09:31 -07:00
Olof Johansson
4550bdb0bd Allwinner fixes for 4.0
There's a few fixes to merge for 4.0, one to add a select in the machine
 Kconfig option to fix a potential build failure, and two fixing cpufreq related
 issues.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVEyVYAAoJEBx+YmzsjxAg54AQAIIZvr69IYXoGL4njoVRhKPq
 Tm8RPb4B74mKHuAfRSblP7BV2cr3hCNBrLmyDnPUAw5KmYdNwfZVAEHxitBqin33
 JQphd5NGD3gtI0YYJQ4DrPlydSDMCV+FvH/4ASgEXyCrimAvcvsASgGoTSZ4PsN+
 /I7FmIVdGsYJ3V6uJv9mPlgAW6PiGkGFkJ/9ZpTbN2sRCLiE/SAIoSR4C9QvMbhI
 khlmMlP8fF1TpOK9m7sXlTHvaf1kH5GK3XN6GxgvVPR66R2kEYKTBLSpxbB3zQmH
 PPAx8UAQbIR6T+dBar5a7rDaSPVOQ2d+f+ytXFKeY5Sonb0iShmjD3EMRFj8PYUv
 /JUdr/8o9HDBWBHNw7JeVx2texk/Gk5AGSGMuPjGsyJYkEoNK0vZS2mwB5doQggo
 nAADHBPhJptPyUqA4ubnjdgc82To4eh7z5dYgNYCH8XlvFuIRHsHPlp9QIdaTzTJ
 eHBMQx6pgr66QNjF940s0z2rH/UtGmWT60WpWToQA7EJau0E2VosQAnjLctiQogO
 ZUhgMa5V3zCiK3831bwDG3we3ictudkZgvIFWeRkbI/StRbt/n8A2NRK7QWhqqh7
 SXgNP5kisAq29X9grn5ekku6O4gJ1xobbjwDsdYw3z36uBjFkYUe85j3AJjhW+sG
 v2chTh9PHTZ6hu/uyK1L
 =e6O1
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-4.0' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into fixes

Allwinner fixes for 4.0

There's a few fixes to merge for 4.0, one to add a select in the machine
Kconfig option to fix a potential build failure, and two fixing cpufreq related
issues.

* tag 'sunxi-fixes-for-4.0' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  ARM: dts: sunxi: Remove overclocked/overvoltaged OPP
  ARM: dts: sun4i: a10-lime: Override and remove 1008MHz OPP setting
  ARM: sunxi: Have ARCH_SUNXI select RESET_CONTROLLER for clock driver usage

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-03-29 14:01:02 -07:00
Olof Johansson
b1dae3d8b0 Fixes for omaps for the -rc cycle:
- Fix a device tree based booting vs legacy booting regression for
   omap3 crypto hardware by adding the missing DMA channels.
 
 - Fix /sys/bus/soc/devices/soc0/family for am33xx devices.
 
 - Fix two timer issues that can cause hangs if the timer related
   hwmod data is missing like it often initially is for new SoCs.
 
 - Remove pcie hwmods entry from dts as that causes runtime PM to
   fail for the PHYs.
 
 - A paper bag type dts configuration fix for dm816x GPIO
   interrupts that I just noticed. This is most of the changes
   diffstat wise, but as it's a basic feature for connecting
   devices and things work otherwise, it should be fixed.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVCzVOAAoJEBvUPslcq6VzJKMP/ioZMQuxKWjMZDQhc4PsSZzF
 3qtijSrN4aPnYphih23/7XuE0dws0pWdpH1toYPPlzB78gN18MuFOpHRHSKxy23e
 dTRvgrvfDfVFyHYpvOTstaqNai90HbwpQnWx2IdEI9xhP0N3RNQQDTdE8mrISoVE
 2GyT8hF++MxbBk3/dhx1tIoqSkWvSi2TH8rAQ6I/UR2O07HRz8tdcciHq0goYvA9
 n16Ou7a3WpRiaGQZvN4wAvwRCklKL3vM/7ZpbRlJAW4M1Uzc1OGKSGHrqr9kbG77
 U/QgJ7lQoHOn6zDRYZqCY5lHR5U8wW8WVCH5WNV6GZaVHzbOSDoV/Ygt/CB9eBzh
 i8RAcKyvVOWqYACjQ3ogfaC5AD7Of7DONFDQVBr/4xaUOLVquYx8V4r89dfDTeyY
 i95ay06NaS6esX3Y0lsgBSlvPObRxoVH4nFUUjUH+gLqhqHpqojWF8CMUl/zs8Cm
 xHIb/4VYR/dnlhqZvhn9NGo9MlAo4D6ftNE5BooON8cKPuEnl25pb5KWmNBu1piM
 knNIV7QA/aawQ3jnH9tXyCWcprcxt/2INwwp41DE/mxpn6xiw+5UwzINu6q5NAzs
 DxEWYv08mM6Qrt0YsIe7cYDPO03my547LWhI3tUWf/KQvqc98hP5ZODy/QDQJmbA
 IpP36kjKB5dJldTv2sWb
 =eCH/
 -----END PGP SIGNATURE-----

Merge tag 'fixes-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Fixes for omaps for the -rc cycle:

- Fix a device tree based booting vs legacy booting regression for
  omap3 crypto hardware by adding the missing DMA channels.

- Fix /sys/bus/soc/devices/soc0/family for am33xx devices.

- Fix two timer issues that can cause hangs if the timer related
  hwmod data is missing like it often initially is for new SoCs.

- Remove pcie hwmods entry from dts as that causes runtime PM to
  fail for the PHYs.

- A paper bag type dts configuration fix for dm816x GPIO
  interrupts that I just noticed. This is most of the changes
  diffstat wise, but as it's a basic feature for connecting
  devices and things work otherwise, it should be fixed.

* tag 'fixes-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: Fix gpio interrupts for dm816x
  ARM: dts: dra7: remove ti,hwmod property from pcie phy
  ARM: OMAP: dmtimer: disable pm runtime on remove
  ARM: OMAP: dmtimer: check for pm_runtime_get_sync() failure
  ARM: OMAP2+: Fix socbus family info for AM33xx devices
  ARM: dts: omap3: Add missing dmas for crypto

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-03-29 13:59:16 -07:00
Olof Johansson
ebc0aa8fd5 Late fix for v4.0 on the SoCFPGA platform:
- Fix interrupt number for SPI1 interface
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJVCxZzAAoJEBmUBAuBoyj0V3YQAJN24cPBrxeyAG1atuHN2T9r
 8QtJ2eVOU32IwzNoOl1PHITGaf1b3Ks03NC+GSk3WMAzMJ/fJMY2p6ABpCCrriBZ
 xRZfkqqlJlB6/BNb62BkUK45yy0chgxoPoaDiX9CR0KqBeVciZM0Ag4Tw82oQDDF
 mEBKJxSO7GIzRj5uHzQHaTh6Fi6QMRYLYDMyoRNom1tpdOLm7ufyWI++q6FLk2/W
 YAxI8tj+AN48cgTB9oO+K83RjxVuR7YM4xQPUJ3K21AAAc1AHhXgOyzMd2FZhIhJ
 qC5xODFXVcG5+m6/7vYxkBnLo9sexHF8EdD7ByRE2KMoRrsWU2s304ErUBfzp635
 9LbSHZB2HD3rM7KEz/QiRGYkijACgVVBbIImHAaAbd4H13hz4FevKARPNvFz9u62
 Bu3jYj94wuGJYHuiIa9p4QZcMaQVSThBsnWUfq18l1UljIoeRzK4jt0P/DCowRJO
 J3gtmH1E/N/NKGbw1RqNwqSydUqdbeyDdOua/2oLrEaOthJATCj3eFCTpIK5lrQD
 Ttc3EsdL7r2OVD7zOXZsbH9mZXxgDnIu0E4Ocm3F3Xs22ERRMVPiDb0xvwXbtq5+
 uN0HdFN2P7wb02dv2r3NWcTpQEBVqvPe4VRIv+U4hgXXJJrYeEZqWYQ8Vd2d4bsb
 ZkvK7CHsv9FiU3aCnT7B
 =NEia
 -----END PGP SIGNATURE-----

Merge tag 'socfpga_fix_for_v4.0_2' of git://git.rocketboards.org/linux-socfpga-next into fixes

Late fix for v4.0 on the SoCFPGA platform:
- Fix interrupt number for SPI1 interface

* tag 'socfpga_fix_for_v4.0_2' of git://git.rocketboards.org/linux-socfpga-next:
  ARM: socfpga: dts: fix spi1 interrupt

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-03-29 13:58:14 -07:00
Dave Martin
78d84bc373 arm64: juno: Fix misleading name of UART reference clock
The UART reference clock speed is 7273.8 kHz, not 72738 kHz.

Dots aren't usually used in node names even though ePAPR permits
them.  However, this can easily be avoided by expressing the
frequency in Hz, not kHz.

This patch changes the name to refclk7273800hz, reflecting the
actual clock speed.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-03-29 13:56:08 -07:00
Olof Johansson
53b1a66398 arm: pxa: fixes for v4.0-rc5
There are only 2 fixes, one for the zeus board about the regulator changes,
 where a typo prevented the zeus board from having a working can regulator,
 and one regression triggered by the interrupts IRQ shift of 16 affecting all
 boards.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVBzpKAAoJEAP2et0duMsSVngP+wTxRklD/kyjRrB4edOGvnKj
 yCJdSbw6dK4IQd4K5BbnJKRSxUTZs9TrPA11IB9IznWcoRjHwKkSr6uk5h/bg+vl
 FwbH60iu7DJ4wyKjIzLCstZpONfFYB/bVOZti3lg+9u0A//YMg0/2PcfcfsUzfgi
 /SAaYuJe+A0XZNZYGwtBEDyYo9hkDzJPbYMRneQnL8XwjLJ9BvksoqBZ/4aIQXlb
 gTlUhlCo9wMngfS3Fbhpd+stw/zO1mt0xUXRXwWJYnUSS2x9mz0K/9zz8RWmodtx
 R4NNz3ZhQzMLHxjj3NpUDcId7faiZNVY0yvSVJU7O5/TLgXluNdH+vRTNiOrpVGu
 +s/+nxg0HKuK16Tz/0mlQH0uqWvtjJvtNTLS3yDgJKM3civ2Vl+i4DKYK0Ht8ynN
 ZSBDmARc6Tq8M9JHgzZFAI8ypKACYuIHJzWNF919BuodJ1N2gcexwKo3m6kPoobG
 WFDTzT+TDiFB0Z4VLOWtWKU9V/RrZqZnrF5rqqkpJ1NyOPdotj+9n2Q63JEdzhH7
 eQKSK9P4FcLKtEmlMo/iRI9livkN81nIRRUTsxxrSTjHA8MJAQOBAU7JDs/ic3YX
 j1vyC/Brd0fPbCqnePfS2BO9G14fwHNb2AxoFgM9JI9zb8sIVxscM4s8uczFCIOs
 rd6bZsQ6mhKjrObS1iSe
 =r3W0
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v4.0-rc5' of https://github.com/rjarzmik/linux into fixes

arm: pxa: fixes for v4.0-rc5

There are only 2 fixes, one for the zeus board about the regulator changes,
where a typo prevented the zeus board from having a working can regulator,
and one regression triggered by the interrupts IRQ shift of 16 affecting all
boards.

* tag 'fixes-for-v4.0-rc5' of https://github.com/rjarzmik/linux:
  ARM: pxa: fix pxa interrupts handling in DT
  ARM: pxa: Fix typo in zeus.c

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-03-29 13:47:37 -07:00
Uwe Kleine-König
63c6073214 net: fec: setup right value for mdio hold time
The FEC modules used on i.MX28 and newer have a register to tune the MDIO
output hold time that should be at least 10 ns. Up to now this value was not
explicitly set and so resulted in less hold time if the fec clock was
faster than 100 MHz.

This was noticed on an i.MX28 machine that uses an input clock of ~150
Mhz which resulted in unreliable communication with a Marvell switch.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 13:40:36 -07:00
Alexey Kodanev
4ad19de877 net: tcp6: fix double call of tcp_v6_fill_cb()
tcp_v6_fill_cb() will be called twice if socket's state changes from
TCP_TIME_WAIT to TCP_LISTEN. That can result in control buffer data
corruption because in the second tcp_v6_fill_cb() call it's not copying
IP6CB(skb) anymore, but 'seq', 'end_seq', etc., so we can get weird and
unpredictable results. Performance loss of up to 1200% has been observed
in LTP/vxlan03 test.

This can be fixed by copying inet6_skb_parm to the beginning of 'cb'
only if xfrm6_policy_check() and tcp_v6_fill_cb() are going to be
called again.

Fixes: 2dc49d1680 ("tcp6: don't move IP6CB before xfrm6_policy_check()")

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 13:36:05 -07:00
Hariprasad Shenai
2ff2acf1fb cxgb4vf: Fix sparse warnings
Fixes sparse warnings introduced in commit e85c9a7abf ("cxgb4/cxgb4vf: Add
code to calculate T5 BAR2 Offsets for SGE Queue Registers") and
df64e4d38c ("cxgb4/cxgb4vf: Use new interfaces to calculate BAR2 SGE Queue
Register addresses") and few old ones

sparse warnings:
>> drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1006:48: sparse: cast removes
>> address space of expression
>> drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1006:48: sparse: incorrect type in
>> initializer (different address space)
>> drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1020:40: sparse: incorrect type in
>> argument 1 (different base types)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 13:28:22 -07:00
Nicolas Dichtel
4217291e59 netns: don't clear nsid too early on removal
With the current code, ids are removed too early.
Suppose you have an ipip interface that stands in the netns foo and its link
part in the netns bar (so the netns bar has an nsid into the netns foo).
Now, you remove the netns bar:
 - the bar nsid into the netns foo is removed
 - the netns exit method of ipip is called, thus our ipip iface is removed:
   => a netlink message is sent in the netns foo to advertise this deletion
   => this netlink message requests an nsid for bar, thus a new nsid is
      allocated for bar and never removed.

We must remove nsids when we are sure that nobody will refer to netns currently
cleaned.

Fixes: 0c7aecd4bd ("netns: add rtnl cmd to add and get peer netns ids")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 12:58:21 -07:00
Jason Cooper
dbcf988653 Merge branch 'irqchip/urgent-gic' into irqchip/urgent 2015-03-29 19:34:05 +00:00
Marc Zyngier
241a386c7d irqchip: gicv3-its: Use non-cacheable accesses when no shareability
If the ITS or the redistributors report their shareability as zero,
then it is important to make sure they will no generate any cacheable
traffic, as this is unlikely to produce the expected result.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1427465705-17126-5-git-send-email-marc.zyngier@arm.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2015-03-29 19:25:57 +00:00
Marc Zyngier
4ad3e3634a irqchip: gicv3-its: Fix PROP/PEND and BASE/CBASE confusion
The ITS driver sometime mixes up the use of GICR_PROPBASE bitfields
for the GICR_PENDBASE register, and GITS_BASER for GICR_CBASE.

This does not lead to any observable bug because similar bits are
at the same location, but this just make the code even harder to
understand...

This patch provides the required #defines and fixes the mixup.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1427465705-17126-4-git-send-email-marc.zyngier@arm.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2015-03-29 19:25:51 +00:00
Andre Przywara
7e195ba037 irqchip: gicv3-its: Fix device ID encoding
When building ITS commands which have the device ID in it, we
should mask off the whole upper 32 bits of the first command word
before inserting the new value in there.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1427465705-17126-3-git-send-email-marc.zyngier@arm.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2015-03-29 19:25:49 +00:00
Marc Zyngier
263fcd312d irqchip: gicv3-its: Fix encoding of collection's target redistributor
With a monolithic GICv3, redistributors are addressed using a linear
number, while a distributed implementation uses physical addresses.

When encoding a target address into a command, we strip the lower
16 bits, as redistributors are always 64kB aligned. This works
perfectly well with a distributed implementation, but has the
silly effect of always encoding target 0 in the monolithic case
(unless you have more than 64k CPUs, of course).

The obvious fix is to shift the linear target number by 16 when
computing the target address, so that we don't loose any precious
bit.

Reported-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1427465705-17126-2-git-send-email-marc.zyngier@arm.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2015-03-29 19:25:45 +00:00
David S. Miller
17f5ddd5a3 Merge branch 'cxgb4'
Hariprasad Shenai says:

====================
cxgb4: Fixes ingress queue mapping and other fixes

The below series fixes ingress queue mapping by allocating them dynamically to
prevent stack overflow. Disable napi and interrupts before unregistering netdev
to avoid crash while unloading driver when traffic is flowing.

The patches series is created against 'net' tree.
And includes patches on cxgb4 driver.

We have included all the maintainers of respective drivers. Kindly review the
change and let us know in case of any review comments.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 12:24:46 -07:00
Hariprasad Shenai
b37987e8db cxgb4: Disable interrupts and napi before unregistering netdev
Disable interrupts and quiesce rx before unregistering net device to avoid crash
while unloading driver when traffic is flowing through.

Based on original work by Shameem Khalid <shameem@chelsio.com>

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 12:24:43 -07:00
Hariprasad Shenai
4b8e27a86d cxgb4: Allocate dynamic mem. for egress and ingress queue maps
QIDs (egress/ingress) from firmware in FW_*_CMD.alloc command
can be anywhere in the range from EQ(IQFLINT)_START to EQ(IQFLINT)_END.
For eg, in the first load eqid can be from 100 to 300.
In the next load it can be from 301 to 500 (assume eq_start is 100 and eq_end is
1000).

The driver was assuming them to always start from EQ(IQFLINT)_START till
MAX_EGRQ(INGQ). This was causing stack overflow and subsequent crash.

Fixed it by dynamically allocating memory (of qsize (x_END - x_START + 1)) for
these structures.

Based on original work by Santosh Rastapur <santosh@chelsio.com>

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 12:24:42 -07:00
WANG Cong
f243e5a785 ipmr,ip6mr: call ip6mr_free_table() on failure path
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 12:13:54 -07:00
Ben Hutchings
7a1e890e21 usbnet: Fix tx_bytes statistic running backward in cdc_ncm
cdc_ncm disagrees with usbnet about how much framing overhead should
be counted in the tx_bytes statistics, and tries 'fix' this by
decrementing tx_bytes on the transmit path.  But statistics must never
be decremented except due to roll-over; this will thoroughly confuse
user-space.  Also, tx_bytes is only incremented by usbnet in the
completion path.

Fix this by requiring drivers that set FLAG_MULTI_FRAME to set a
tx_bytes delta along with the tx_packets count.

Fixes: beeecd42c3 ("net: cdc_ncm/cdc_mbim: adding NCM protocol statistics")
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2015-03-29 12:06:45 -07:00
Ben Hutchings
1e9e39f4a2 usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME drivers
Currently the usbnet core does not update the tx_packets statistic for
drivers with FLAG_MULTI_PACKET and there is no hook in the TX
completion path where they could do this.

cdc_ncm and dependent drivers are bumping tx_packets stat on the
transmit path while asix and sr9800 aren't updating it at all.

Add a packet count in struct skb_data so these drivers can fill it
in, initialise it to 1 for other drivers, and add the packet count
to the tx_packets statistic on completion.

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Tested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 12:06:43 -07:00
Linus Torvalds
7fc377ecf4 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Ingo Molnar:
 "Fix x86 syscall exit code bug that resulted in spurious non-execution
  of TIF-driven user-return worklets, causing big trouble for things
  like KVM that rely on user notifiers for correctness of their vcpu
  model, causing crashes like double faults"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/asm/entry: Check for syscall exit work with IRQs disabled
2015-03-28 11:25:04 -07:00
Linus Torvalds
4a89452e70 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar:
 "Two clocksource driver fixes, and an idle loop RCU warning fix"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource/drivers/sun5i: Fix cpufreq interaction with sched_clock()
  clocksource/drivers: Fix various !CONFIG_HAS_IOMEM build errors
  timers/tick/broadcast-hrtimer: Fix suspicious RCU usage in idle loop
2015-03-28 11:21:23 -07:00
Linus Torvalds
19dba4f3e9 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fix from Ingo Molnar:
 "A single sched/rt corner case fix for RLIMIT_RTIME correctness"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Fix RLIMIT_RTTIME when PI-boosting to RT
2015-03-28 11:17:32 -07:00
Linus Torvalds
ee9b63dd0f Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Ingo Molnar:
 "A perf kernel side fix for a fuzzer triggered lockup"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix irq_work 'tail' recursion
2015-03-28 11:12:08 -07:00
Linus Torvalds
0fa7271a8a Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fix from Ingo Molnar:
 "A module unload lockdep race fix"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  lockdep: Fix the module unload key range freeing logic
2015-03-28 11:05:03 -07:00
Linus Torvalds
713d25dba9 Merge branch 'parisc-4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parsic fixes from Helge Deller:
 "One patch from Mikulas fixes a bug on parisc by artifically
  incrementing the counter in pmd_free when the kernel tries to free
  the preallocated pmd.

  Other than that we now prevent that syscalls gets added without
  incrementing __NR_Linux_syscalls and fix the initial pmd setup code
  if a default page size greater than 4k has been selected"

* 'parisc-4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Fix pmd code to depend on PT_NLEVELS value, not on CONFIG_64BIT
  parisc: mm: don't count preallocated pmds
  parisc: Add compile-time check when adding new syscalls
2015-03-28 10:58:53 -07:00
Linus Torvalds
22824c5369 Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm ppc bugfixes from Marcelo Tosatti.

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: PPC: Book3S HV: Fix instruction emulation
  KVM: PPC: Book3S HV: Endian fix for accessing VPA yield count
  KVM: PPC: Book3S HV: Fix spinlock/mutex ordering issue in kvmppc_set_lpcr()
2015-03-28 10:54:59 -07:00
Linus Torvalds
af0c11ca80 ARC signal handling related fixes uncovered during recent testing of NPTL tools
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVFTw+AAoJEGnX8d3iisJeojUP/12ANSkctP29kOjZFkZrav6v
 M9qaSR0NqtuxqQ7o8SY4FeA61/vKvy0Sfg5aqfLq1b4YU7FJginyOxZv+d3NPNto
 HCS4XVJwFiEmqYx6EgIrCnYmxNQsRTseJEI24/ImHmzvnjufx/JQ9wr0wQVcw/S3
 ewxIyf0uyyVJ2UAOMjn2F3ukJYIpteItyT/59ndWluB/+JTHhhJUsIYowP2irU29
 EsvEiExNv5d+n35gtxY7GdKEsX5bQc8bTT2UiladcWYIWdb9OoV4+L8MgFh7JHii
 vV71D4kdH5bhJsD1D98nm9jFpP6GfPWCY2BMTIhWIYmg+2Zl+cfiaYgIIuBYNG+x
 +ahrqB5Nbm+Ux4R7KnIYlXMgDiWMPetkAptUmbod293M/pXPyyQtFhiaB2X9l6Bl
 48IUvWYjSp5p8mfhwBXcMItTazrv46HqarHfl3NG0sljRc9BwdPqlumhB1xxsQXg
 iauvvD6s6GHRIGapYlINRww9mCaNu5bTcY9cD6AHEc++6Ov/ZYpWnnipmUINNCmL
 4yLd+pUQ6QoPuvCHbpzdEvb/eb/LDSbo17nB3aPNn/pPGzICgAXnhY4ET6nzZ3LM
 Dc/8FfrYmalYHmjeoWC8CPR/XmrmI7xCkNlF/kre+vCWRLs8Zewl/btxyU48+hho
 81HBp3a0QCzCOcFKvzam
 =zVXd
 -----END PGP SIGNATURE-----

Merge tag 'arc-4.0-fixes-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:
 "We found some issues with signal handling taking down the system.  I
  know its late, but these are important and all marked for stable.

  ARC signal handling related fixes uncovered during recent testing of
  NPTL tools"

* tag 'arc-4.0-fixes-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: signal handling robustify
  ARC: SA_SIGINFO ucontext regs off-by-one
2015-03-28 10:47:27 -07:00
Linus Torvalds
38ae1dfc78 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull selinux bugfix from James Morris.

Fix broken return value.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  selinux: fix sel_write_enforce broken return value
2015-03-28 10:41:22 -07:00
Darshana Padmadas
4ce7ca89d6 iio: imu: Use iio_trigger_get for indio_dev->trig assignment
This patch uses iio_trigger_get to increment the reference
count of trigger device, to avoid incorrect assignment.
Can result in a null pointer dereference during removal if the
trigger has been changed before removal.

This patch refers to a similar situation encountered through the
following discussion:
http://www.spinics.net/lists/linux-iio/msg13669.html

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28 13:51:40 +00:00
Stefan Agner
f54e9f2be3 iio: adc: vf610: use ADC clock within specification
Depending on conversion mode used, the ADC clock (ADCK) needs
to be below a maximum frequency. According to Vybrid's data
sheet this is 20MHz for the low power conversion mode.

The ADC clock is depending on input clock, which is the bus
clock by default. Vybrid SoC are typically clocked at at 400MHz
or 500MHz, which leads to 66MHz or 83MHz bus clock respectively.
Hence, a divider of 8 is required to stay below the specified
maximum clock of 20MHz.

Due to the different bus clock speeds, the resulting sampling
frequency is not static. Hence use the ADC clock and calculate
the actual available sampling frequency dynamically.

This fixes bogous values observed on some 500MHz clocked Vybrid
SoC. The resulting value usually showed Bit 9 being stuck at 1,
or 0, which lead to a value of +/-512.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Fugang Duan <B38611@freescale.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28 12:00:02 +00:00
Richard Weinberger
bbc45f3ab7 iio/adc/cc10001_adc.c: Fix !HAS_IOMEM build
Fixes:
drivers/built-in.o: In function `cc10001_adc_probe':
cc10001_adc.c:(.text+0x412e92): undefined reference to `devm_ioremap_resource'

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28 11:59:31 +00:00
Benjamin Herrenschmidt
41d9489319 drivers/of: Add empty ranges quirk for PA-Semi
The "sdc" node is missing the ranges property, it needs to be treated
as having an empty one otherwise translation fails for its children.

Fixes 746c9e9f92, "of/base: Fix PowerPC address parsing hack"

Tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Stable <stable@vger.kernel.org> # v3.18+
2015-03-27 19:31:16 -07:00
Linus Torvalds
a39bdfb590 Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog fixes from Wim Van Sebroeck:

 - mtk_wdt: signedness bug in mtk_wdt_start()

 - imgpdc: Fix NULL pointer dereference during probe and fix the default
   heartbeat

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: imgpdc: Fix default heartbeat
  watchdog: imgpdc: Fix probe NULL pointer dereference
  watchdog: mtk_wdt: signedness bug in mtk_wdt_start()
2015-03-27 14:45:42 -07:00
Linus Torvalds
a7fe850d3b sound fixes for 4.0-rc6
Three trivial oneliner fixes for HD-audio.  Two are device-specific
 quirks while one is a generic fix for recent Realtek codecs.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVFBixAAoJEGwxgFQ9KSmkvDMQALgan4KGLGHAuNZ0mLU01iA9
 9x3P0V33h2uCyjXZJ8ncfxXq3omuQ69Vkk+nUUfzdYw3/mBTy3BWwlf3IVMxUaCQ
 UWV36CBf0ZlA2j5CLIqq1axCx4lSv0vmbkoZN3vXh+sLHK/DRqJhqObInpNMRr0R
 TLDDM69tvG25dMZbHV6U1Q98HzNlRRPgqxuob3wCaQzg7jyCYbNpk+Q+D70UwOpv
 VsqhJSWeoGlRmBQZLpmaJxpO0r5moRCPz/uUlR2XrdBk7PIwoeKIIKOoDcUKCbwR
 NlVqldyvRgtRKbjl7HDLyagbHUwf1U6p7WUI27WZY3bBzQl80XUe4eWGmd1gNJqV
 0y0akktO5ZjhTWJvxzENC5sQwBVHBYP+cvABYVOMccKixQWPmpGGcpQYEAODliNZ
 rwUadJlfZwfxkFNyopMwGfHFhhc3ox/WcTcYh93PucM9jsSpZr2wDeS60s/scyD6
 /hEMzTkrxGVzRhPJ6HG4PqHT6oMS6py7FTG35Y4rTjWMvR4UpdakpD17cIqz0Kpj
 wO8Ifxgfr+EzmRx+hHYVrLKc1zpHQGrawYYT4nWxqfdSiWmSFC/zdMYYpXrzSv+m
 5agjlwVRE65muWp/5VvQLuXwQvDwoM/YMSASNso20qlCOGrQeQF1osrskwtw+7ew
 FVC1lX5VEC+gETaa/ql8
 =dar7
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "Three trivial oneliner fixes for HD-audio.

  Two are device-specific quirks while one is a generic fix for recent
  Realtek codecs"

* tag 'sound-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Add one more node in the EAPD supporting candidate list
  ALSA: hda_intel: apply the Seperate stream_tag for Sunrise Point
  ALSA: hda - Add dock support for Thinkpad T450s (17aa:5036)
2015-03-27 14:38:02 -07:00
Martin K. Petersen
6fc4d97a49 libata: Blacklist queued TRIM on Samsung SSD 850 Pro
Blacklist queued TRIM on this drive for now.

Reported-by: Stefan Keller <linux-list@zahlenfresser.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
CC: stable@vger.kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
2015-03-27 15:22:46 -04:00
Martin K. Petersen
ff7f53fb82 libata: Update Crucial/Micron blacklist
Micron has released an updated firmware (MU02) for M510/M550/MX100
drives to fix the issues with queued TRIM. Queued TRIM remains broken on
M500 but is working fine on later drives such as M600 and MX200.

Tweak our blacklist to reflect the above.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=71371
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
2015-03-27 15:22:40 -04:00
Christian König
88f9eae4d7 drm/radeon: programm the VCE fw BAR as well
Otherwise the VCE firmware needs to be in the first 256MB of VRAM.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-27 10:17:44 -04:00
Christian König
1b01fc347a drm/radeon: always dump the ring content if it's available
Dumping is still possible if a ring isn't ready, only when it
isn't allocated at all we need to abort here.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-27 10:17:43 -04:00
David Miller
f2c9e560b4 radeon: Do not directly dereference pointers to BIOS area.
Use readb() and memcpy_fromio() accessors instead.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2015-03-27 10:17:42 -04:00
Alex Deucher
3899ca844b drm/radeon/dpm: fix 120hz handling harder
Need to expand the check to handle short circuiting
if the selected state is the same as current state.

bug:
https://bugs.freedesktop.org/show_bug.cgi?id=87796

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2015-03-27 10:17:42 -04:00
Jani Nikula
ad692b46db drm/edid: set ELD for firmware and debugfs override EDIDs
If the user supplies EDID through firmware or debugfs override, the
driver callbacks are bypassed and the connector ELD does not get
updated, and audio fails. Set ELD for firmware and debugfs EDIDs too.

There should be no harm in gratuitously doing this for non HDMI/DP
connectors, as it's still up to the driver to use the ELD, if any.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82349
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=80691
Reported-by: Emil <emilsvennesson@gmail.com>
Reported-by: Rob Engle <grenoble@gmail.com>
Tested-by: Jolan Luff <jolan@gormsby.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-03-27 13:27:04 +02:00
Yan, Zheng
a901125c65 locks: fix file_lock deletion inside loop
locks_delete_lock_ctx() is called inside the loop, so we
should use list_for_each_entry_safe.

Fixes: 8634b51f6c (locks: convert lease handling to file_lock_context)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
2015-03-27 07:18:20 -04:00
Jean Delvare
bfbaafae85 firmware: dmi_scan: Prevent dmi_num integer overflow
dmi_num is a u16, dmi_len is a u32, so this construct:

	dmi_num = dmi_len / 4;

would result in an integer overflow for a DMI table larger than
256 kB. I've never see such a large table so far, but SMBIOS 3.0
makes it possible so maybe we'll see such tables in the future.

So instead of faking a structure count when the entry point does
not provide it, adjust the loop condition in dmi_table() to properly
deal with the case where dmi_num is not set.

This bug was introduced with the initial SMBIOS 3.0 support in commit
fc43026278 ("dmi: add support for SMBIOS 3.0 64-bit entry point").

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: <stable@vger.kernel.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2015-03-27 10:53:46 +00:00
Grygorii Strashko
c6ac19dac2 gpio: syscon: reduce message level when direction reg offset not in dt
Now GPIO syscon driver produces bunch of warnings during the
boot of Kesytone 2 SoCs:
 gpio-syscon soc:keystone_dsp_gpio@02620240: can't read the dir register offset!
 gpio-syscon soc:keystone_dsp_gpio@2620244: can't read the dir register offset!

This message unintentionally was added using dev_err(), but its
actual log level is debug, because third cell of "ti,syscon-dev" is
optional.

Hence change it to dev_dbg() as it should be.

This patch fixes commit:
 5a3e3f8 ("gpio: syscon: retriave syscon node and regs offsets from dt")

Reported-by: Russell King <linux@arm.linux.org.uk>
Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-03-27 11:17:08 +01:00