Commit Graph

468750 Commits

Author SHA1 Message Date
Doug Anderson 5d1d150d7d spi/rockchip: Avoid accidentally turning off the clock
If our client is requesting a clock that is above the maximum clock
then the following division will result in 0:
  rs->max_freq / rs->speed

We'll then program 0 into the SPI_BAUDR register.  The Rockchip TRM
says: "If the value is 0, the serial output clock (sclk_out) is
disabled."

It's much better to end up with the fastest possible clock rather than
a clock that is off, so enforce a minimum value.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29 12:07:38 +01:00
Darrick J. Wong d80d448c6c ext4: fix same-dir rename when inline data directory overflows
When performing a same-directory rename, it's possible that adding or
setting the new directory entry will cause the directory to overflow
the inline data area, which causes the directory to be converted to an
extent-based directory.  Under this circumstance it is necessary to
re-read the directory when deleting the old dirent because the "old
directory" context still points to i_block in the inode table, which
is now an extent tree root!  The delete fails with an FS error, and
the subsequent fsck complains about incorrect link counts and
hardlinked directories.

Test case (originally found with flat_dir_test in the metadata_csum
test program):

# mkfs.ext4 -O inline_data /dev/sda
# mount /dev/sda /mnt
# mkdir /mnt/x
# touch /mnt/x/changelog.gz /mnt/x/copyright /mnt/x/README.Debian
# sync
# for i in /mnt/x/*; do mv $i $i.longer; done
# ls -la /mnt/x/
total 0
-rw-r--r-- 1 root root 0 Aug 25 12:03 changelog.gz.longer
-rw-r--r-- 1 root root 0 Aug 25 12:03 copyright
-rw-r--r-- 1 root root 0 Aug 25 12:03 copyright.longer
-rw-r--r-- 1 root root 0 Aug 25 12:03 README.Debian.longer

(Hey!  Why are there four files now??)

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
2014-08-28 22:22:29 -04:00
Darrick J. Wong db9ee22036 jbd2: fix descriptor block size handling errors with journal_csum
It turns out that there are some serious problems with the on-disk
format of journal checksum v2.  The foremost is that the function to
calculate descriptor tag size returns sizes that are too big.  This
causes alignment issues on some architectures and is compounded by the
fact that some parts of jbd2 use the structure size (incorrectly) to
determine the presence of a 64bit journal instead of checking the
feature flags.

Therefore, introduce journal checksum v3, which enlarges the
descriptor block tag format to allow for full 32-bit checksums of
journal blocks, fix the journal tag function to return the correct
sizes, and fix the jbd2 recovery code to use feature flags to
determine 64bitness.

Add a few function helpers so we don't have to open-code quite so
many pieces.

Switching to a 16-byte block size was found to increase journal size
overhead by a maximum of 0.1%, to convert a 32-bit journal with no
checksumming to a 32-bit journal with checksum v3 enabled.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: TR Reardon <thomas_reardon@hotmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
2014-08-28 22:22:29 -04:00
Darrick J. Wong 022eaa7517 jbd2: fix infinite loop when recovering corrupt journal blocks
When recovering the journal, don't fall into an infinite loop if we
encounter a corrupt journal block.  Instead, just skip the block and
return an error, which fails the mount and thus forces the user to run
a full filesystem fsck.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
2014-08-28 22:22:28 -04:00
Dmitry Monakhov 6603120e96 ext4: update i_disksize coherently with block allocation on error path
In case of delalloc block i_disksize may be less than i_size. So we
have to update i_disksize each time we allocated and submitted some
blocks beyond i_disksize.  We weren't doing this on the error paths,
so fix this.

testcase: xfstest generic/019

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
2014-08-28 22:20:41 -04:00
Mikulas Patocka d49ec52ff6 dm crypt: fix access beyond the end of allocated space
The DM crypt target accesses memory beyond allocated space resulting in
a crash on 32 bit x86 systems.

This bug is very old (it dates back to 2.6.25 commit 3a7f6c990a "dm
crypt: use async crypto").  However, this bug was masked by the fact
that kmalloc rounds the size up to the next power of two.  This bug
wasn't exposed until 3.17-rc1 commit 298a9fa08a ("dm crypt: use per-bio
data").  By switching to using per-bio data there was no longer any
padding beyond the end of a dm-crypt allocated memory block.

To minimize allocation overhead dm-crypt puts several structures into one
block allocated with kmalloc.  The block holds struct ablkcipher_request,
cipher-specific scratch pad (crypto_ablkcipher_reqsize(any_tfm(cc))),
struct dm_crypt_request and an initialization vector.

The variable dmreq_start is set to offset of struct dm_crypt_request
within this memory block.  dm-crypt allocates the block with this size:
cc->dmreq_start + sizeof(struct dm_crypt_request) + cc->iv_size.

When accessing the initialization vector, dm-crypt uses the function
iv_of_dmreq, which performs this calculation: ALIGN((unsigned long)(dmreq
+ 1), crypto_ablkcipher_alignmask(any_tfm(cc)) + 1).

dm-crypt allocated "cc->iv_size" bytes beyond the end of dm_crypt_request
structure.  However, when dm-crypt accesses the initialization vector, it
takes a pointer to the end of dm_crypt_request, aligns it, and then uses
it as the initialization vector.  If the end of dm_crypt_request is not
aligned on a crypto_ablkcipher_alignmask(any_tfm(cc)) boundary the
alignment causes the initialization vector to point beyond the allocated
space.

Fix this bug by calculating the variable iv_size_padding and adding it
to the allocated size.

Also correct the alignment of dm_crypt_request.  struct dm_crypt_request
is specific to dm-crypt (it isn't used by the crypto subsystem at all),
so it is aligned on __alignof__(struct dm_crypt_request).

Also align per_bio_data_size on ARCH_KMALLOC_MINALIGN, so that it is
aligned as if the block was allocated with kmalloc.

Reported-by: Krzysztof Kolasa <kkolasa@winsoft.pl>
Tested-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2014-08-28 14:24:09 -04:00
Linus Torvalds 59753a8054 One simple fix to invalidate GPIO non-request.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJT/00OAAoJEFGvii+H/Hdhv44P/30y36qDKV7bMUmICRtw/Cb0
 XwAfaBR75bLxVVmF/VtYPpuKJ4wTHGl3bg2Tx0XehcyuFYYgLglz/WsK6y7VYFCQ
 Yw/1QqalWWrW+jPJiaofQpL3P3Q12RoIvkdBI1L5KnDEvipdgHlXDkDwvd1L/JHc
 wYJvM2LVL4PCRc3x/7+L3pRhdyeCFpPgvNDk5Y4xbGOU8eoQd7fwQz8EJgmEEQzC
 Kv7mHUqi04lE1DnYIvbJ/YL1tSVYXRaCBRwWk4XtBTGYUi/FQ/edFoa0iXy/ym59
 u21zoNiYGxBpdRXEX+LbpJs0YF0rMHxYqpGgUdSJwU1YTF7dvqaZCmo5Qmnv6akE
 VF8nu1yvMPaPLcVuxuf7ttnZZsmwpD6BG1P8VHAwxWl6S2Fjkr9f9ommYLMF8cIL
 cx0PJkUgNHwHH2Zs56DhZjfGCvl9El9XFxL4pnGxCg94amiCKnbf6LeW/bPN9uxh
 4e1FU3+FQ+SAIcPmPRRfae5tM+zEFRyA7lNDEYXkETZ91v7hmykAi7kijw7D6RHc
 G4toOUpE2koIxlx/k4th8hrIwNexvKPq5fowHC3E6vLcXmQwT4Y5H1HxmXZnw36T
 qnLI2HBbUoBBuxLmXN64WOZHcPr5GNlS+9RpgsB7JnkH3E2jpB8/J1NuX5lOPowR
 pQqUmGr53NB9MVobkYS5
 =tMZh
 -----END PGP SIGNATURE-----

Merge tag 'backlight-fixes-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight

Pull backlight fix from Lee Jones:
 "One simple fix to invalidate GPIO non-request"

* tag 'backlight-fixes-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
  pwm-backlight: Fix bogus request for GPIO#0 when instantiated from DT
2014-08-28 10:47:10 -07:00
Linus Torvalds 2db3cff2d3 Couple of simple fixes due for the 3.17 rcs
(and a sneaky document addition that slipped from the previous pull-request)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJT/0s6AAoJEFGvii+H/HdhNiEP/R+zAKkTCmJyw2aeJR9RrNaO
 Qu2rzavdCsM/DKJiEKsF0QNvyMFM3S1Tx16pnOWcsCdJI9LVgeCRv7Fpn2mJKNRI
 UlmRHuG+SRu2nzr0gc+hyEOuz5VhpGemKo4tntUEPKrj5eXD25e3QgYHFIdTI32k
 c/bG7eKV7LbPSrybzLNw6FNRuH0YyN667PEck1HVFerCv/921LwO4seOVPAwecgu
 tELpaY7oxDTxoPe8QmxzmPWvCri1OjGaQTEfHoCWXfUaeYcOksI4mJ1zoIBZ0aHb
 uSY+wVnXfkAbmz7kzcJJvVYuf4PhI0mRh2uEhpvzJxMaetAA3JVf0/JXOhTGbATK
 itWgSqCVXooMf+8DIEsMkmXgqV0+Nvy0vZxv+viIdQ4ea9nUrWVT+KJmYsKp8lk9
 SAXsDv+4sr3POCN4QwvAsEKmujtngkOws2YSRRZqiPw8DAiNVpjgF/bZ6jZXVvQs
 wpOqGFJhwS3etyBica1hEZorhGoQzLEWgXDa+D+9jPs1TWVBJVYKeGaRFPGVZxgN
 6mAObpbv0/Uc6SUUlv55qfF3A1KUE2n7001SoD7zYEcTQ9jIcqw8CgKlb4kgrROv
 VeFb4wIxF6kGuijiKMZvwoH0x+QL/fXrvIVK6x8UN2Zy3+QMva+x8pu8tZQvTYun
 CibJKkoCwT2dth7D9pWS
 =DaB2
 -----END PGP SIGNATURE-----

Merge tag 'mfd-fixes-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull mfd fixes from Lee Jones:
 "Couple of simple fixes due for the 3.17 rcs

  (and a sneaky document addition that slipped from the previous
  pull-request)"

* tag 'mfd-fixes-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
  mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators
  mfd: tc3589x: Add device tree bindings
  mfd: ab8500-core: Use 'ifdef' for config options
  mfd: htc-i2cpld: Fix %d confusingly prefixed with 0x in format string
  mfd: omap-usb-host: Fix %d confusingly prefixed with 0x in format string
2014-08-28 10:46:25 -07:00
Linus Torvalds 0caf14e66a Pin control fixes for the v3.17 series, only driver fixes:
- SH-PFC (Renesas) r8a7791 CAN bus pin group problem
 - Rockchip (GPIO0 configuration)
 - Tegra-xusb (interrupt handling)
 - Exynos (GPIO interrupt locking)
 - Qualcomm (fix misleading example interrupts)
 - Minor non-critical fixes for abx500 and AT91 also sneaked in,
   because I initially intended this pull for post RC-1, hope it's
   still OK.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJT/yB/AAoJEEEQszewGV1zV0wP/3QPm5P3bWLGLQNjEldlqX9u
 WHW8TetInUiylTzdV0klJcucGOj6TsKMuS+UEOPGg7dZ8cQ2JQ3CUgB7i8L6+Rhw
 cgbSyAtdos89xMTsu6WhR4x/1IVXE8KeitgPcshdOvhJM/b9OVowss2Y2gG2/fsZ
 duw5zN0Fj0R02BclJ5hj9GHUrnDfbk8VPvExdTHld2rjAZ4/CtL+zHbktOh44HgG
 C55HHbMSOk52U+/NYUJW6Yc7iFfXOpKJzmv+No8TdwaY67V80mrf3HjVIEoUCOh0
 DZiwRwr0nmnbtog2c8XLD+oQLpnVgbJsNub/1h+bvn+uHi5J2K746iSk5BDBhuzP
 PsK7hXTtFKvdpW762nqT+WRu+oDY4oor3YG6W/y5MQAHX513qNU+z5RiN90UV8/V
 WHz6X4qq52amv0larVUf4STK5dBcoEAQrbiI51g5CLnBQGCOj264go6ZWdgWPCT+
 rhu4fT8qprbBl8TOrKBUJXP4ZzesqTn5t0bVlVt+H153DCRgLVNw3C+xo2zHIlVz
 2Fz9oCcALdGPxmkEK2vdTRtGcvW3Y3FdwFCdkCTr4uSfyDzUWbdUvOwKEFYiW8+3
 FJsgOE6SDIzgNU5C7fF3g0DAoxesXVr1y+sZNVaVX93cIDk7LWs6xgWUipVg/Abp
 x9sm+cIYwWdpgCuWhULh
 =Aivv
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v3.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin-control fixes from Linus Walleij:
 "My first (a bit delayed) pack of pin control fixes for the v3.17
  series, only driver fixes:

   - SH-PFC (Renesas) r8a7791 CAN bus pin group problem
   - Rockchip (GPIO0 configuration)
   - Tegra-xusb (interrupt handling)
   - Exynos (GPIO interrupt locking)
   - Qualcomm (fix misleading example interrupts)
   - minor non-critical fixes for abx500 and AT91 also sneaked in,
     because I initially intended this pull for post RC-1, hope it's
     still OK"

* tag 'pinctrl-v3.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: qcom: apq8064: Correct interrupts in example
  pinctrl: exynos: Lock GPIOs as interrupts when used as EINTs
  pinctrl: pinctrl-at91.c: fix decimal printf format specifiers prefixed with 0x
  pinctrl: abx500: remove useless check
  pinctrl: tegra-xusb: testing wrong variable in probe()
  pinctrl: tegra-xusb: fix an off by one test
  pinctrl: rockchip: fix rk3288 gpio0 configuration
  sh-pfc: r8a7791: fix CAN pin groups
2014-08-28 10:31:29 -07:00
Linus Torvalds daf543b177 Small dma-buf pull request for 3.17-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJT/tOwAAoJEAG+/NWsLn5bzKwQAPIfgjf97bdZPl6wqKtegHk4
 kYxGb9mLTZ0p3zqQt4msmbiiAjd1J0GWaVfyBWzjIHg0QSZYKwwFKU9RxclS+NfL
 SvBQWDsj9EC0UBZOqWHaiJ1zGlKnOvS5mA/ldkFnqhhivCdfO/TMkbNAHT2Qm0sI
 JLAVkamfJP+LspL9/kG99MjQaVNKkLvnroOly16c2TD9B3NNkr9mxMrOhVyU+L+X
 XCPB9Vu38+xHCSCrV9Rn7BNCJcflHoqG3KIGGNoU+VF0FRY+nV4eZAuh1KbhseEP
 Ibo/Zjf0m67Mxq00lk3VyD61rsV6dcuqNk4YPGDV1/dS2IUCXV1JHcQ/6pOBdX9S
 c71yaf+YrByNsiXAvClT7oPFQcSVAPhwhxM2dyKdtnPzA59GQGutXJtBjBCC0bB+
 6MD9RkjFFAZRTQTb63J/8eMFrJ84wc8DZdL8x2PCq4Bf5X2jlbHOlbHM92LVflsD
 DrSpgnrKdSC08JazaP6Yhg46q801p3+Z07KxM6zecOyjwI27B+/Cqih57bPgKb7a
 cVrFHzQmQfW0RDqg3nr/UZxSNDQALQj43k2/v7ktoYnluK9OgBgWE+bmqEjOKNyk
 PbJl83brz1Ot/RkEBAtK0FgdO17Anz/42Q8n1k6cUEw33r1v9s+iTqMu8x143fLO
 bI0F5Q44LBd08Dgy128v
 =Tc07
 -----END PGP SIGNATURE-----

Merge tag 'for-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf

Pull dma-buf fixes from Sumit Semwal:
 "The major changes for 3.17 already went via Greg-KH's tree this time
  as well; this is a small pull request for dma-buf - all documentation
  related"

* tag 'for-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf:
  dma-buf/fence: Fix one more kerneldoc warning
  dma-buf/fence: Fix a kerneldoc warning
  Documentation/dma-buf-sharing.txt: update API descriptions
2014-08-28 10:30:25 -07:00
Linus Torvalds 521bd5e4d9 sound fixes for 3.17-rc3
Here contains not many exciting changes but just a few minor ones:
 An off-by-one proc write fix, a couple of trivial incldue guard
 fixes, Acer laptop pinconfig fix, and a fix for DSD formats that
 are still rarely used.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJT/w1wAAoJEGwxgFQ9KSmkkMAQAKlRFjLRrcM+y4ly8Gjr1ZTe
 QjkdPBdkQlWiMIPLlX1Xr+pWG5kZiUMiAl5lBkiF6ubcjVYl6KoJGzGzwcAdYkor
 H0tY2+mqinOS9gi3qwnTQjvlhGeTwLqs7hIkIjfaaUHSBn5I6TYsMgMQ2I6Rmo82
 Ox6bhJbunNRhCpyebzTjzgcruGej8FkzpJullWs6XTdxCY2rtFpVn0b6FUgdbab+
 uTgfBeckvtIA327s7qRmWyAOn5t73tCqV3CJ/PnBCXByODiMRrkaM0OLb/O7QvN5
 VTrKyGQyUhf3WNT6R1nuGPbC24ajxu5p0GkSZNuHWoerMIgNobtoBNplzL+P8UUs
 s83Sm21Y7n2jSXPs+rJdjy4MdLng6QcXH/ZoCnpZeIeVxs4qU4O9Q7HMDJZCYS7M
 EEutl8/gt43su4wHO2RGfU3DOIFnjtPQzqqkkwzdwoxB9jhMHfq73qRTrAHC3biB
 hqjRQRcX++Z5C0PPuVUvRSwidWTbeEfot3MvXKXaHyWTojyGRqfKsCXhudFLCNYU
 BlwAxrLI8kWaKdr9oVe+KS1XoBVQJIIar62plwFozTEuHuQ2P0FNpP6MFViPNoFf
 UOHvXCTHi8JaVSBjhlKHrtto2Zcak1tIlQ1Ewog0Wg1cJrDOdWxHEwJ2tUI0N7aC
 fZ3lwxhRarA9URNrjNqV
 =raXL
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "Here contains not many exciting changes but just a few minor ones: An
  off-by-one proc write fix, a couple of trivial incldue guard fixes,
  Acer laptop pinconfig fix, and a fix for DSD formats that are still
  rarely used"

* tag 'sound-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Set up initial pins for Acer Aspire V5
  ALSA: pcm: Fix the silence data for DSD formats
  ALSA: ctxfi: ct20k1reg: Fix typo in include guard
  ALSA: hda: ca0132_regs.h: Fix typo in include guard
  ALSA: core: fix buffer overflow in snd_info_get_line()
2014-08-28 09:44:25 -07:00
Linus Torvalds 6e8f7b09e4 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Nothing major, one core oops fixes, some radeon oops fixes, some sti
  driver fixups, msm driver fixes and a minor Kconfig update for the ww
  mutex debugging"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/ast: Add missing entry to dclk_table[]
  drm: fix division-by-zero on dumb_create()
  ww-mutex: clarify help text for DEBUG_WW_MUTEX_SLOWPATH
  radeon: Test for PCI root bus before assuming bus->self
  drm/radeon: handle broken disabled rb mask gracefully (6xx/7xx) (v2)
  drm/radeon: save/restore the PD addr on suspend/resume
  drm/msm: Fix missing unlock on error in msm_fbdev_create()
  drm/msm: fix compile error for non-dt builds
  drm/msm/mdp4: request vblank during modeset
  drm/msm: avoid flood of kernel logs on faults
  drm: sti: Add missing dependency on RESET_CONTROLLER
  drm: sti: Make of_device_id array const
  drm: sti: Fix return value check in sti_drm_platform_probe()
  drm: sti: hda: fix return value check in sti_hda_probe()
  drm: sti: hdmi: fix return value check in sti_hdmi_probe()
  drm: sti: tvout: fix return value check in sti_tvout_probe()
2014-08-28 09:40:37 -07:00
Tony Lindgren daebabd578 mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators
Commit 43fef47f94 (mfd: twl4030-power: Add a configuration to turn
off oscillator during off-idle) added support for configuring the PMIC
to cut off resources during deeper idle states to save power.

This however caused regression for n900 display power that needed the
PMIC configuration to be disabled with commit d937678ab6 (ARM: dts:
Revert enabling of twl configuration for n900).

Turns out the root cause of the problem is that we must use
TWL4030_RESCONFIG_UNDEF instead of DEV_GRP_NULL to avoid disabling
regulators that may have been enabled before the init function
for twl4030-power.c runs. With TWL4030_RESCONFIG_UNDEF we let the
regulator framework control the regulators like it should. Here we
need to only configure the sys_clken and sys_off_mode triggers for
the regulators that cannot be done by the regulator framework as
it's not running at that point.

This allows us to enable the PMIC configuration for n900.

Fixes: 43fef47f94 (mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle)

Cc: stable@vger.kernel.org # v3.16
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-08-28 15:57:55 +01:00
Linus Walleij bc80436033 mfd: tc3589x: Add device tree bindings
This defines the device tree bindings for the Toshiba TC3589x
series of multi-purpose expanders. Only the stuff I can test
is defined: GPIO and keypad. Others may implement more
subdevices further down the road.

This is to complement
commit a435ae1d51
"mfd: Enable the tc3589x for Device Tree" which left off
the definition of the device tree bindings.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-08-28 15:57:54 +01:00
Toshiaki Makita 7b5af5cffc cfq-iosched: Add comments on update timing of weight
Explain that weight has to be updated on activation.
This complements previous fix e15693ef18 ("cfq-iosched: Fix wrong
children_weight calculation").

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-08-28 08:16:29 -06:00
Thierry Reding 1f58d9465c dma-buf/fence: Fix one more kerneldoc warning
The seqno_fence_init() function's cond argument isn't described in the
kerneldoc comment. Fix that to silence a warning when building DocBook
documentation.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2014-08-28 11:59:38 +05:30
Thierry Reding e9f3b79648 dma-buf/fence: Fix a kerneldoc warning
kerneldoc doesn't know how to parse variables, so don't let it try.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2014-08-28 11:59:09 +05:30
Gioh Kim a07b3b4508 Documentation/dma-buf-sharing.txt: update API descriptions
Update some descriptions for API arguments and descriptions.

Signed-off-by: Gioh Kim <gioh.kim@lge.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2014-08-28 11:57:24 +05:30
Y.C. Chen b8d758d29f drm/ast: Add missing entry to dclk_table[]
This avoid reading past the end of the list for certain modes

Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
Reviewed-by: Egbert Eich <eich@freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-08-28 12:26:42 +10:00
Dave Airlie 36d07e3ac7 Merge branch 'drm-3.17-rc2-sti-fixes' of git://git.linaro.org/people/benjamin.gaignard/kernel into drm-fixes
I have tested the 6 patches send on mailing list since you merge the sti driver.
I haven't seen issue with those patches except for the missing
dependency on Kconfig
where I have change "depends on" to "select".

* 'drm-3.17-rc2-sti-fixes' of git://git.linaro.org/people/benjamin.gaignard/kernel:
  drm: sti: Add missing dependency on RESET_CONTROLLER
  drm: sti: Make of_device_id array const
  drm: sti: Fix return value check in sti_drm_platform_probe()
  drm: sti: hda: fix return value check in sti_hda_probe()
  drm: sti: hdmi: fix return value check in sti_hdmi_probe()
  drm: sti: tvout: fix return value check in sti_tvout_probe()
2014-08-28 11:48:58 +10:00
Dave Airlie 5fa9be63a4 Merge branch 'msm-fixes-3.17' of git://people.freedesktop.org/~robclark/linux into drm-fixes
misc msm fixes from Rob.

* 'msm-fixes-3.17' of git://people.freedesktop.org/~robclark/linux:
  drm/msm: Fix missing unlock on error in msm_fbdev_create()
  drm/msm: fix compile error for non-dt builds
  drm/msm/mdp4: request vblank during modeset
  drm/msm: avoid flood of kernel logs on faults
2014-08-28 11:48:05 +10:00
Rajendra Nayak f7f7a29bf0 ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
To deal with IPs which are specific to dra74x and dra72x, maintain seperate
ocp interface lists, while keeping the common list for all common IPs.

Move USB OTG SS4 to dra74x only list since its unavailable in
dra72x and is giving an abort during boot. The dra72x only list
is empty for now and a placeholder for future hwmod additions which
are specific to dra72x.

Fixes: d904b38df0 ("ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss")
Reported-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
[paul@pwsan.com: fixed comment style to conform with CodingStyle]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2014-08-27 19:38:23 -06:00
Rajendra Nayak af438fec6c ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() variants
Use the corresponding compatibles to identify the devices.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2014-08-27 19:38:22 -06:00
David Herrmann 00e7208997 drm: fix division-by-zero on dumb_create()
Kinda unexpected, but DIV_ROUND_UP() can overflow if passed an argument
bigger than UINT_MAX - DIVISOR. Fix this by testing for "!cpp" before
using it in the following division.

Note that DIV_ROUND_UP() is defined as:
        #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))

..this will obviously overflow if (n + d - 1) is bigger than UINT_MAX.

Reported-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-08-28 11:38:04 +10:00
Rob Clark 4d6923733f ww-mutex: clarify help text for DEBUG_WW_MUTEX_SLOWPATH
We really don't want distro's enabling this in their kernels.  Try and
make that more clear.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-08-28 11:34:43 +10:00
Dave Airlie a80612273c Merge branch 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Just a few more radeon fixes for 3.17.

* 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux:
  radeon: Test for PCI root bus before assuming bus->self
  drm/radeon: handle broken disabled rb mask gracefully (6xx/7xx) (v2)
  drm/radeon: save/restore the PD addr on suspend/resume
2014-08-28 11:32:20 +10:00
Linus Torvalds f1bd473f95 Merge branch 'sec-v3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux-security
Pull tomoyo fix from Serge Hallyn.

* 'sec-v3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux-security:
  tomoyo: Fix pathname calculation breakage.
2014-08-27 17:32:37 -07:00
Greg Kroah-Hartman a9ef803d74 USB: fix build error with CONFIG_PM_RUNTIME disabled
commit bdd405d2a5 ("usb: hub: Prevent hub autosuspend if
usbcore.autosuspend is -1") causes a build error if CONFIG_PM_RUNTIME is
disabled.  Fix that by doing a simple #ifdef guard around it.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Michael Welling <mwelling@emacinc.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-27 16:55:29 -07:00
Rafael J. Wysocki 0b4f58b7ce Merge branch 'pm-cpufreq'
* pm-cpufreq:
  cpufreq: s5pv210: Remove spurious __init annotation
  cpufreq: intel_pstate: Add CPU ID for Braswell processor
  intel_pstate: Turn per cpu printk into pr_debug
2014-08-28 01:31:17 +02:00
Mark Brown dc26874239 cpufreq: s5pv210: Remove spurious __init annotation
Since this is a platform driver and can be probed at any time we can't
annotate funtions in the probe path as __init, the code can't safely be
discarded at the end of kernel init.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-08-28 01:30:55 +02:00
Rafael J. Wysocki 772c7137bc Merge branches 'acpi-scan', 'acpi-ec' and 'acpi-lpss'
* acpi-scan:
  ACPI: Run fixed event device notifications in process context
  ACPI / scan: Allow ACPI drivers to bind to PNP device objects

* acpi-ec:
  ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC
  ACPI / EC: Add support to disallow QR_EC to be issued when SCI_EVT isn't set

* acpi-lpss:
  ACPI / LPSS: Add ACPI IDs for Intel Braswell
2014-08-28 01:27:08 +02:00
Mika Westerberg 16405f98bc cpufreq: intel_pstate: Add CPU ID for Braswell processor
This is pretty much the same as Intel Baytrail, only the CPU ID is
different. Add the new ID to the supported CPU list.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-08-28 01:26:21 +02:00
Andi Kleen ce717613f3 intel_pstate: Turn per cpu printk into pr_debug
On larger systems intel_pstate currently spams the boot up
log with its "Intel pstate controlling ..." message for each CPU.
It's the only subsystem that prints a message for each
CPU.

Turn the message into a pr_debug.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-08-28 01:23:08 +02:00
Dmitry Monakhov c174e6d697 ext4: fix transaction issues for ext4_fallocate and ext_zero_range
After commit f282ac19d8 we use different transactions for
preallocation and i_disksize update which result in complain from fsck
after power-failure.  spotted by generic/019. IMHO this is regression
because fs becomes inconsistent, even more 'e2fsck -p' will no longer
works (which drives admins go crazy) Same transaction requirement
applies ctime,mtime updates

testcase: xfstest generic/019

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
2014-08-27 18:40:00 -04:00
Dmitry Monakhov 69dc953640 ext4: fix incorect journal credits reservation in ext4_zero_range
Currently we reserve only 4 blocks but in worst case scenario
ext4_zero_partial_blocks() may want to zeroout and convert two
non adjacent blocks.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
2014-08-27 18:33:49 -04:00
Greg Kroah-Hartman 7c38405ca7 Revert "usb: ehci/ohci-exynos: Fix PHY getting sequence"
This reverts commit 039368901a.

Vivek writes:
	We not longer need this patch, since we have planned to remove
	the usb-phy drivers for samsung [1], we have completely deleted
	the support for the the same from ohci-exynos and ehci-exynos
	drivers too [2].  Sorry for the confusion, but this patch can be
	dropped and instead we can pick the patches in [2].

	[1] http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg35774.html
	[2] https://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg35695.html
	    https://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg35696.html

Cc: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-27 15:23:53 -07:00
Olof Johansson 0dc0d9e18e Renesas ARM Based SoC Clock Fixes For v3.17
* ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR
 
   This resolves a problem introduced by 4bfb358b1d
   ("ARM: shmobile: Add r8a7791 legacy SDHI clocks")
   which was included in v3.15.
 
   This fix does not have any run-time affect at this time.
 
 * ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
 
   This resolves a problem introduced by 9f13ee6f83
   ("ARM: shmobile: r8a7790: add div4 clocks")
   which was included in v3.11.
 
   This fix does not have any run-time affect at this time.
 
 * ARM: shmobile: sh73a0: Remove spurious 0x from SCIFB clock name
 
   This resolves a problem introduced by a0f7e7496d
   ("ARM: shmobile: sh73a0: add CMT1 clock support for DT")
   which was included in v3.17-rc1.
 
   This fix does not have any run-time affect at this time as the clock in
   question is used by a SCIF device that is not enabled by default.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJT+oE/AAoJENfPZGlqN0++6eYQAK8LStttSbAjBHONrCQpj1/n
 fBu+S9RjzYOKLtG4L7pVXOJSFuIiPB03y4IeiFRflIS6TQyopl7DmTZvN/AztIjE
 dOamQ+Z2ePrLcNUG1ZNfpEUSxfImOqtcm38R58HRDOnMYTszLOaVxtU0Dre9Y3Me
 cYHEN/17PUQWdQ7j5tcaDwXtl4oVjS+1RmzkODKpP2N+1w4l0rcXHEXuNJC6NpW8
 1i2CWnlb64hQ0L1tOBVabmUXmlwbasV5dBnysupn3IZHOMO+liNSb9T2RHpvtKSw
 U4hu4cZXSGNWoFlWzrs7SoJf1uFF0h5GlrgUm5TGPA1oUPsRzJKRS6D70daElmpi
 e5OszD89bs/LftHY4wpcwQ3ic/PSCqMGdF4aFAzVtfseND9tzrK+8aa8GX18bb9R
 hGfEeiXzp2EnIEtBMUmrrk0cV9thx1zuwaGoai0P2E82SXbMglrKYVAm0xN3yxRc
 77u47S479o7xGSdT2/EBX+EIWnFrGZheT10iPc+aEWRRTxWFf5e10j1i3F1Lw7cL
 5P3PNrMUv3s1Vf82gHKfdtlaYZZoMuF3r03ezt2EScg9MDxhytBDHxiokfw7NRdA
 OA8IaXuoU4MSXArgkdJ89kzV1AnK8aMGlQY/BXfjPqgPUGRQ8TK/sEDp2I5poMeZ
 t2xCtxUvCA39NM/xBDyS
 =jurT
 -----END PGP SIGNATURE-----

Merge tag 'renesas-clock-fixes-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Merge "Renesas ARM Based SoC Clock Fixes For v3.17" from Simon Horman:

* ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR

  This resolves a problem introduced by 4bfb358b1d
  ("ARM: shmobile: Add r8a7791 legacy SDHI clocks")
  which was included in v3.15.

  This fix does not have any run-time affect at this time.

* ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR

  This resolves a problem introduced by 9f13ee6f83
  ("ARM: shmobile: r8a7790: add div4 clocks")
  which was included in v3.11.

  This fix does not have any run-time affect at this time.

* ARM: shmobile: sh73a0: Remove spurious 0x from SCIFB clock name

  This resolves a problem introduced by a0f7e7496d
  ("ARM: shmobile: sh73a0: add CMT1 clock support for DT")
  which was included in v3.17-rc1.

  This fix does not have any run-time affect at this time as the clock in
  question is used by a SCIF device that is not enabled by default.

* tag 'renesas-clock-fixes-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR
  ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
  ARM: shmobile: sh73a0: Remove spurious 0x from SCIFB clock name

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-08-27 15:14:05 -07:00
Olof Johansson e1e5b71843 i.MX fixes for 3.17, 2nd take:
- Fixes suspend/resume issue on imx53-qsrb due to PMIC IRQ pin
    configuration missing
  - A couple small SolidRun board fixes/correction from Rabeeh
    and Russell
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJT/XBJAAoJEFBXWFqHsHzOuqgH/3XqY4n0kL7lZQGRl8sBA/1m
 bLtlKYaGjtn5ITXYONuWyxk9MrkCUaVUEEkcM3Gty6kHbCZ9F8nqSa5NiYs4MyGR
 FiBX1GANmz96t61i90jlNNxHdPfnmgj3ZXEDTEj9g2brwGceUgQZv4/D59qSy41H
 VlyIIOREQbrIoFlln1cEaKf2UXOpmSpB835QHROwy9K4aK0kZKAR4v5eqM2aQaIl
 9VpvR5Xfsmr5vH/srlkY+Vc2ODVF1nQZsa3ikleAh2rzFQ4thwSKqpSxF7HL6EAo
 zafJuI67ctyzIFk1PlsUuqCM2NimzACnpgrNG6Vn2KDq/JavNIsuyna0KgzzXqE=
 =jOFz
 -----END PGP SIGNATURE-----

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

Merge "ARM: imx: fixes for 3.17, 2nd take" from Shawn Guo:

i.MX fixes for 3.17, 2nd take:
 - Fixes suspend/resume issue on imx53-qsrb due to PMIC IRQ pin
   configuration missing
 - A couple small SolidRun board fixes/correction from Rabeeh
   and Russell

* tag 'imx-fixes-3.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: microsom-ar8035: MDIO pad must be set open drain
  ARM: dts: hummingboard/cubox-i: change SPDIF output to be more descriptive
  ARM: dts: hummingboard/cubox-i: add USB OC pinctrl configuration
  ARM: dts: imx53-qsrb: Fix suspend/resume

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-08-27 15:12:22 -07:00
Olof Johansson c2e1da63e6 Fixes for omaps, mostly to revert NAND back to using software ECC
by default as that's what many boards expect. Also fixes for omap5
 clocks, PM wake-up events, GPIO interrupt cells for dra7, and few
 other minor fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJT/PNtAAoJEBvUPslcq6VzQsoP/0a2WXN51/oqrhviMGURLDFy
 57Mc6Yz4annJPeyzmD7myPEoppOAzC+Ysp04gC2Ig5ygj94KPJb5Mc2o28lZT4wr
 OTNjQA2W+5CpefXHTRSRaoqcfOD9qUmcnb+rGTiTIxSu8DYxWaf8seAxL2Q2YJ7u
 +DPREfhs0YZyA1kxiZy1xssR2pM1lsPthf0hBDxPyxaTnBxvWFlZAw+06xWVlA+G
 Lk5NZZOFXKTKGV6Cq28q+FQvveUqW3An87pfFZZsSyBQfCIZdNDtCQ7OXCgjA+E2
 OZ7fYh+phbFkr8W+0fJGu3b3t8ehFm74tvQ1qQlb0R0GrqRMaYXooO4Wk73sgJmc
 MbaBGZ7CzkLC7IgvfitbdDRlFmrQeVHoBoH+UtwkNh4CyWtBzdrvxxgj8BvtJSYs
 rWfppeEZrsWKdESNdjV4YFqkrMEHfyOlTjAqDUVd8CjtF1fOyQ/WkfpgqcpsYfj5
 7YhW5qMjtYYmNoklU62sQyJx2HhpYpjdI83qmKT6zUM2OlrJYmco3FFXFRHRfNv2
 o6M61iO+dwYuEjfZ1NhlCep41/MJ2El1oYMnNNvXy/DBveh9887TuX4S5WYIcF2M
 ofhv4y3JDGPfXvvdpE/M1FiqHoJ0Epl+IUbaeNR61mbBmZZG3ExvPiqvYgdrhbnk
 2kr7x8fPRfgsc41z1ajH
 =i+aY
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.17/fixes-against-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Merge "omap fixes against v3.17-rc2" from Tony Lindgren:

Fixes for omaps, mostly to revert NAND back to using software ECC
by default as that's what many boards expect. Also fixes for omap5
clocks, PM wake-up events, GPIO interrupt cells for dra7, and few
other minor fixes.

* tag 'omap-for-v3.17/fixes-against-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: omap54xx-clocks: Fix the l3 and l4 clock rates
  ARM: OMAP2+: hwmod: Rearm wake-up interrupts for DT when MUSB is idled
  ARM: dts: Enable UART wake-up events for beagleboard
  ARM: dts: Remove twl6030 clk32g "regulator"
  ARM: OMAP2+: omap_device: remove warning that clk alias already exists
  ARM: OMAP: fix %d confusingly prefixed with 0x in format string
  ARM: dts: DRA7: fix interrupt-cells for GPIO
  mtd: nand: omap: Fix 1-bit Hamming code scheme, omap_calculate_ecc()
  ARM: dts: omap3430-sdp: Revert to using software ECC for NAND
  ARM: OMAP2+: GPMC: Support Software ECC scheme via DT
  mtd: nand: omap: Revert to using software ECC by default
2014-08-27 15:08:28 -07:00
Heiko Stübner 541555e95c MAINTAINERS: catch special Rockchip code locations
Add some more locations that aren't catched by the general wildcard.
This includes the devicetree files, clock directory, rk3x i2c driver,
everything in a third layer under drivers like iio/adc/rockchip_saradc.c
and the i2s driver.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-08-27 15:03:20 -07:00
Alex Williamson 0bd252de78 radeon: Test for PCI root bus before assuming bus->self
If we assign a Radeon device to a virtual machine, we can no longer
assume a fixed hardware topology, like the GPU having a parent device.
This patch simply adds a few pci_is_root_bus() tests to avoid passing
a NULL pointer to PCI access functions, allowing the radeon driver to
work in a QEMU 440FX machine with an assigned HD8570 on the emulated
PCI root bus.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-27 17:54:50 -04:00
Hans de Goede e21eba05af xhci: Disable streams on Via XHCI with device-id 0x3432
This is a bit bigger hammer then I would like to use for this, but for now
it will have to make do. I'm working on getting my hands on one of these so
that I can try to get streams to work (with a quirk flag if necessary) and
then we can re-enable them.

For now this at least makes uas capable disk enclosures work again by forcing
fallback to the usb-storage driver.

https://bugzilla.kernel.org/show_bug.cgi?id=79511

Cc: stable@vger.kernel.org # 3.15
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-27 13:35:38 -07:00
Johan Hovold 5654699fb3 USB: serial: fix potential heap buffer overflow
Make sure to verify the number of ports requested by subdriver to avoid
writing beyond the end of fixed-size array in interface data.

The current usb-serial implementation is limited to eight ports per
interface but failed to verify that the number of ports requested by a
subdriver (which could have been determined from device descriptors) did
not exceed this limit.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-27 13:23:52 -07:00
Johan Hovold d979e9f9ec USB: serial: fix potential stack buffer overflow
Make sure to verify the maximum number of endpoints per type to avoid
writing beyond the end of a stack-allocated array.

The current usb-serial implementation is limited to eight ports per
interface but failed to verify that the number of endpoints of a certain
type reported by a device did not exceed this limit.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-27 13:23:52 -07:00
Linus Torvalds ff0c57ac70 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:

 - fixes for potential memory corruption problems in magicmouse and
   picolcd drivers (the HW would have to be manufactured to be
   deliberately evil to trigger those) which were found by Steven
   Vittitoe

 - fix for false error message appearing in dmesg from logitech-dj
   driver, from Benjamin Tissoires

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: picolcd: sanity check report size in raw_event() callback
  HID: magicmouse: sanity check report size in raw_event() callback
  HID: logitech-dj: prevent false errors to be shown
2014-08-27 09:38:06 -07:00
Andy Shevchenko 08a707b878 spi: dw: fix kernel crash due to NULL pointer dereference
The obvious fix after the commit d9c73bb8a3 "spi: dw: add support for gpio
controlled chip select". This patch fixes the issue by using locally defined
temporary variable.

Fixes: d9c73bb8a3 (spi: dw: add support for gpio controlled chip select)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: <stable@vger.kernel.org>
2014-08-27 17:32:46 +01:00
Linus Torvalds 1fb00cbca0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
 "The biggest of these comes from Liu Bo, who tracked down a hang we've
  been hitting since moving to kernel workqueues (it's a btrfs bug, not
  in the generic code).  His patch needs backporting to 3.16 and 3.15
  stable, which I'll send once this is in.

  Otherwise these are assorted fixes.  Most were integrated last week
  during KS, but I wanted to give everyone the chance to test the
  result, so I waited for rc2 to come out before sending"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (24 commits)
  Btrfs: fix task hang under heavy compressed write
  Btrfs: fix filemap_flush call in btrfs_file_release
  Btrfs: fix crash on endio of reading corrupted block
  btrfs: fix leak in qgroup_subtree_accounting() error path
  btrfs: Use right extent length when inserting overlap extent map.
  Btrfs: clone, don't create invalid hole extent map
  Btrfs: don't monopolize a core when evicting inode
  Btrfs: fix hole detection during file fsync
  Btrfs: ensure tmpfile inode is always persisted with link count of 0
  Btrfs: race free update of commit root for ro snapshots
  Btrfs: fix regression of btrfs device replace
  Btrfs: don't consider the missing device when allocating new chunks
  Btrfs: Fix wrong device size when we are resizing the device
  Btrfs: don't write any data into a readonly device when scrub
  Btrfs: Fix the problem that the replace destroys the seed filesystem
  btrfs: Return right extent when fiemap gives unaligned offset and len.
  Btrfs: fix wrong extent mapping for DirectIO
  Btrfs: fix wrong write range for filemap_fdatawrite_range()
  Btrfs: fix wrong missing device counter decrease
  Btrfs: fix unzeroed members in fs_devices when creating a fs from seed fs
  ...
2014-08-27 09:14:17 -07:00
Linus Torvalds c0fe5dcb91 Josef Bacik found a bug in the ring_buffer_poll_wait() where the
condition variable (waiters_pending) was set before being added to
 the poll queue via poll_wait(). This allowed for a small race window
 to happen where an event could come in, check the condition variable
 see it set to true, clear it, and then wake all the waiters. But because
 the waiter set the variable before adding itself to the queue, the
 waker could have cleared the variable after it was set and then miss
 waking it up as it wasn't added to the queue yet.
 
 Discussing this bug, we realized that a memory barrier needed to be added
 too, for the rare case that something polls for a single trace event
 to happen (and just one, no more to come in), and miss the wakeup due
 to memory ordering.  Ideally, a memory barrier needs to be added on the
 writer side too, but as that will kill tracing performance and this is
 for a situation that tracing wasn't even designed for (who traces one
 instance of an event, use a printk instead!), this isn't worth adding the
 barrier. But we can in the future add the barrier for when the buffer
 goes from empty to the first event, as that would cover this case.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJT/IgUAAoJEKQekfcNnQGumJgIALG63LVR4ZS+bjHGTxyovCiL
 EE6Aic7/hHB8ajn/QZJAaVbaxf0woIyPaU6NP5p17rgF44gTtaEzg3hDqOXkBXvh
 aMLTEz2Xm6nu1VQ5vk//9qqplE+WMXWS6YjjnxErRja90cBZblFy9h9LzwwexLkm
 oXmhjVF1ke5AKFiXQ+Dj9LJse80MvSEEFk1eeUR7oNqK/4rwzKmkefkUnk2NbST4
 cFkOAbTfZnMXlhUhB2EY2Ptprty3scrA7bpe00ClzFmoQ9MxDVlLJBN9aEjaTnxM
 zKiXsxy/eJ+0IPSOSEajh3IJb96sbqZnt++28vDhck3e6k3G4CQwbuktPdQXUo8=
 =jful
 -----END PGP SIGNATURE-----

Merge tag 'trace-fixes-v3.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull trace buffer epoll hang fix from Steven Rostedt:
 "Josef Bacik found a bug in the ring_buffer_poll_wait() where the
  condition variable (waiters_pending) was set before being added to the
  poll queue via poll_wait().  This allowed for a small race window to
  happen where an event could come in, check the condition variable see
  it set to true, clear it, and then wake all the waiters.  But because
  the waiter set the variable before adding itself to the queue, the
  waker could have cleared the variable after it was set and then miss
  waking it up as it wasn't added to the queue yet.

  Discussing this bug, we realized that a memory barrier needed to be
  added too, for the rare case that something polls for a single trace
  event to happen (and just one, no more to come in), and miss the
  wakeup due to memory ordering.  Ideally, a memory barrier needs to be
  added on the writer side too, but as that will kill tracing
  performance and this is for a situation that tracing wasn't even
  designed for (who traces one instance of an event, use a printk
  instead!), this isn't worth adding the barrier.  But we can in the
  future add the barrier for when the buffer goes from empty to the
  first event, as that would cover this case"

* tag 'trace-fixes-v3.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  trace: Fix epoll hang when we race with new entries
2014-08-27 09:12:36 -07:00
Andy Shevchenko c9d5d6fe16 spi: dw-pci: fix bug when regs left uninitialized
The commit 04f421e7 "spi: dw: use managed resources" changes drivers to use
managed functions, but seems wasn't properly tested in PCI case. The regs field
of struct dw_spi left uninitialized. Thus, kernel crashes when tries to access
to the SPI controller registers. This patch fixes the issue.

Fixes: 04f421e7 (spi: dw: use managed resources)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-08-27 15:45:04 +01:00
Juri Lelli eba1c71819 ARM: 8130/1: cpuidle/cpuidle-big_little: fix reading cpu id part number
Commit af040ffc9b ("ARM: make it easier to check the CPU part number
correctly") changed ARM_CPU_PART_X masks, and the way they are returned and
checked against. Usage of read_cpuid_part_number() is now deprecated, and
calling places updated accordingly. This actually broke cpuidle-big_little
initialization, as bl_idle_driver_init() performs a check using an hardcoded
mask on cpu_id.

Create an interface to perform the check (that is now even easier to read).
Define also a proper mask (ARM_CPU_PART_MASK) that makes this kind of checks
cleaner and helps preventing bugs in the future. Update usage accordingly.

Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-08-27 15:40:45 +01:00