Commit graph

412854 commits

Author SHA1 Message Date
Linus Torvalds b01537bfbc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs dentry reference count fix from Al Viro.

This fixes a possible inode_permission NULL pointer dereference (and
other problems) that were due to the root dentry count being decremented
too much.  In commit 48a066e72d ("RCU'd vfsmounts") the placement of
clearing the LOOKUP_RCU bit changed, and we then returned failure of
incrementing the lockref on the parent dentry with LOOKUP_RCU cleared.

But that meant we needed to go through the same cleanup routines that
the later failures did wrt LOOKUP_ROOT and nd->root.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fix bogus path_put() of nd->root after some unlazy_walk() failures
2013-11-29 09:27:19 -08:00
Linus Torvalds 282c183b02 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm qxl leak fix from Dave Airlie:
 "As usual 5 mins after I send a trivial pull fix I find a real bug!

  This fixes a memory leak and I'd like to get it into stable queue
  asap"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/qxl: fix memory leak in release list handling
2013-11-29 09:26:42 -08:00
Al Viro d870b4a191 fix bogus path_put() of nd->root after some unlazy_walk() failures
Failure to grab reference to parent dentry should go through the
same cleanup as nd->seq mismatch.  As it is, we might end up with
caller thinking it needs to path_put() nd->root, with obvious
nasty results once we'd hit that bug enough times to drive the
refcount of root dentry all the way to zero...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-11-29 01:50:51 -05:00
Dave Airlie 1b28c3e628 drm/qxl: fix memory leak in release list handling
wow no idea how I got this far without seeing this,
leaking the entries in the list makes kmalloc-64 slab grow.

References: https://bugzilla.kernel.org/show_bug.cgi?id=65121
Cc: stable@vger.kernel.org
Reported-by: Matthew Stapleton <matthew4196@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-11-29 08:36:15 +10:00
Linus Torvalds dda9cc3a14 GPIO fixes for the v3.13 series:
- A big slew of documentation for the gpiod transition that
   happened in the merge window, no semantic effect, but we should
   provide proper documentation with the new API.
 
 - Fix flags related to the new API.
 
 - Fix to the find_chip_by_name() lookup function related to the
   new API.
 
 - Fix of_find_gpio() when not using device tree.
 
 - Bug fix for the TB10x direction setting.
 
 - Error path fixes from Dan Carpenter.
 
 - Nasty IRQdomain bug relating to taking an unitialized spinlock.
 
 - Minor fixes here and there.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSl0gWAAoJEEEQszewGV1zSSAQAJVkZCQPMpj+NYOFs8wxubKl
 t0cwISUN8VNrUOkUZbNZNev80FYbBsYGtedLiKSNKPuO/Vu0vBWPlx474XNmk0W+
 OEoV9bjTFOvLYjh+JDEm5BSjHhVoHbo5dAE6/mk2GCfAxuky6XJ/U1IelV+pBVsK
 +AG5ldGomVj64nd7SVnxHT6pu3IR0QspwIY0skgLzX/gmCZFse3jhdmkfuHL7TTg
 94H5/FOLP9zFYhwIhu7jb+ryhvixnnhJ4vbNN16lT2ZrOVy/q1a9YYDY4CNp5Qpz
 DdTHVJ2GS6z2WIwWwoz5zbjjAid0fL7I8yZ3YmsB8pCxUmRleuy5ciKqUtzyo075
 A549HUxMzYuxYzCmGMI8YomMjfdpmtjGnxPd06gKyGUQmEAseAnB1UeGlK8MUMDR
 pXaPTdTi+r7qECKWIk/upkTbJjvp7sW2pKrPiK1CQupgSRDAEGjqYHT4hUglJzoC
 RVidfh1fb0BCG07F98LCmLTHubAzVmDVM4RjJuMb9KuCEOWEVtKjF7KII/dEtcPI
 oNZBwoez4m6glcCAy194ZNn6xON19QhVK4qBB9pdl/h/cIw8JJ+yPagofzLgr25R
 HsH0vSWx6lMVAYiFCRn2WKCsVeUIeZZFO6cswywlH6by8glUZOlzLiMeoO4MsoIu
 UasaUADY+GKYQEbHi/GA
 =GmyD
 -----END PGP SIGNATURE-----

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

Pull GPIO fixes from Linus Walleij:
 "Here us a bunch of patches for the v3.13 series.  Most important stuff
  is related to fixes and documentation for the new GPIO descriptor API.
  If the diffstat is scary you'll notice most of it is to
  Documentation/*:

   - A big slew of documentation for the gpiod transition that happened
     in the merge window, no semantic effect, but we should provide
     proper documentation with the new API.

   - Fix flags related to the new API.

   - Fix to the find_chip_by_name() lookup function related to the new
     API.

   - Fix of_find_gpio() when not using device tree.

   - Bug fix for the TB10x direction setting.

   - Error path fixes from Dan Carpenter.

   - Nasty IRQdomain bug relating to taking an unitialized spinlock.

   - Minor fixes here and there"

* tag 'gpio-v3.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: bcm281xx: Fix return value of bcm_kona_gpio_get()
  gpio: pl061: move irqdomain initialization
  gpio: ucb1400: Add MODULE_ALIAS
  gpiolib: fix of_find_gpio() when OF not defined
  gpio: fix memory leak in error path
  gpio: rcar: NULL dereference on error in probe()
  gpio: msm: make msm_gpio.summary_irq signed for error handling
  gpio: mvebu: make mvchip->irqbase signed for error handling
  gpiolib: use dedicated flags for GPIO properties
  gpiolib: fix find_chip_by_name()
  Documentation: gpiolib: document new interface
  gpio: tb10x: Set output value before setting direction to output
2013-11-28 09:57:46 -08:00
Linus Torvalds 962ba26326 3 bug fixes for md in 3.13-rc
All recent regressions, one in 3.12 so marked for -stable.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIVAwUAUpaIkjnsnt1WYoG5AQLNwQ//asj11BcgtWb0kwS/5y4VuVR2+nnxxVLJ
 QO1NXvUT9BJGk+TYjfTQj4gLkXdFlyLxTgbApFxquM36rUAtvfpz+K/j7hWk6wsY
 NFHuX3U27YD+GWIyOcroT8QhUWYVhonmwqoQFx9Kt6rSa+T1gyloF+Huj5DAUipN
 5rtzlPIXsJca/bafbA40E22Wki0nVJL99kTV7F2fKkYOIo+rm+0BuhtUgHinMKRy
 jSgE4kqTAQIH5Jnsa1h6mRheeQc7W3TzEB6Cx6JN9aj7NTnZmrf1NCPgTTyza2Ub
 oc+FvgDQCqSH9XzKaMEYMn3NixZsYwoBwXkS6joNpm9CzLrpNMs3gX3zjwLAqBH0
 eAaFtm8Z5h/pdp3a7SWAv4hnjzIetqAMIR5CFsd1mkBQeHpWml0kWkE/AFzEFx4C
 qzyuZHQR7+h4gFrQusEokMoAcIG+dOcTogDFdvLEoxzfU8BooZ9/GyKnkYRq9rLd
 OvLtZPJkQ5jcdnvgOtvNpnS9riuLs37UPxlmN+Q862UKoxqg1m1frwIWnShm9eaY
 WYmPiPao0kHhK38y/oSQpZ5NkD+r0KloM2KrJYJeybVCckbg4XQLoA3yPwJhXZyP
 1FnUY7o7dEKtPCcEGcgsDziw/53b3OrmbLmlLKrZIV04tl19pFbbq0PdOhSejMvV
 QHQw4aiJ/HY=
 =nRsH
 -----END PGP SIGNATURE-----

Merge tag 'md/3.13-fixes' of git://neil.brown.name/md

Pull md fixes from Neil Brown:
 "Three bug fixes for md in 3.13-rc

  All recent regressions, one in 3.12 so marked for -stable"

* tag 'md/3.13-fixes' of git://neil.brown.name/md:
  md/raid5: fix newly-broken locking in get_active_stripe.
  md: test mddev->flags more safely in md_check_recovery.
  md/raid5: fix new memory-reference bug in alloc_thread_groups.
2013-11-28 09:51:39 -08:00
Linus Torvalds 3bad8bb5cd Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French:
 "SMB3 "validate negotiate" is needed to prevent certain types of
  downgrade attacks.

  Also changes SMB2/SMB3 copy offload from using the BTRFS copy ioctl
  (BTRFS_IOC_CLONE) to a cifs specific ioctl (CIFS_IOC_COPYCHUNK_FILE)
  to address Christoph's comment that there are semantic differences
  between requesting copy offload in which copy-on-write is mandatory
  (as in the BTRFS ioctl) and optional in the SMB2/SMB3 case.  Also
  fixes SMB2/SMB3 copychunk for large files"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  [CIFS] Do not use btrfs refcopy ioctl for SMB2 copy offload
  Check SMB3 dialects against downgrade attacks
  Removed duplicated (and unneeded) goto
  CIFS: Fix SMB2/SMB3 Copy offload support (refcopy) for large files
2013-11-28 09:50:25 -08:00
Helge Deller 5ecbe3c3c6 kernel/extable: fix address-checks for core_kernel and init areas
The init_kernel_text() and core_kernel_text() functions should not
include the labels _einittext and _etext when checking if an address is
inside the .text or .init sections.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-28 09:49:41 -08:00
Linus Torvalds e7c0d3dac8 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Just two minor fixes as people keep resending since they are so low
  hanging"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau/hwmon: fix compilation without CONFIG_HWMON
  drm/sysfs: fix OOM verification
2013-11-27 21:06:55 -08:00
Linus Torvalds 682a2512ea TTY/serial fixes for 3.13-rc2
Here are some tty/serial driver fixes for reported issues in 3.13-rc2.
 
 The n_gsm "fix" was reverted as it was found to not be correct.
 Hopefully this will be resolved in a future pull request, but as there's
 really only one user of this line setting, it's not a big deal...
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlKWdzYACgkQMUfUDdst+ynH9wCgqdnzb6KfAWwItlVQqDKAtCxr
 504AnRRwxYPHfuRRklvVuZGVx3D0sxbp
 =xGSm
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some tty/serial driver fixes for reported issues in 3.13-rc2.

  The n_gsm "fix" was reverted as it was found to not be correct.
  Hopefully this will be resolved in a future pull request, but as
  there's really only one user of this line setting, it's not a big
  deal..."

* tag 'tty-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  Revert "n_gsm: race between ld close and gsmtty open"
  n_tty: Protect minimum_to_wake reset for concurrent readers
  tty: Reset hupped state on open
  TTY: amiserial, add missing platform check
  TTY: pmac_zilog, check existence of ports in pmz_console_init()
  n_gsm: race between ld close and gsmtty open
  tty/serial/8250: fix typo in help text
  n_tty: Fix 4096-byte canonical reads
  n_tty: Fix echo overrun tail computation
  n_tty: Ensure reader restarts worker for next reader
2013-11-27 21:06:01 -08:00
Linus Torvalds 0b0f7f1cda Staging fixes for 3.13-rc2
Here are a number of staging, and IIO driver, fixes for 3.13-rc2 that
 resolve issues that have been reported for 3.13-rc1.  All of these have
 been in linux-next for a bit this week.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlKWdiEACgkQMUfUDdst+ynbywCfaED1OKlzXXx/VbCd5WRlYd2a
 2IEAoJ4c6LmgW9Vn6z0M/pRblvmPyYj1
 =Tq5a
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
 "Here are a number of staging, and IIO driver, fixes for 3.13-rc2 that
  resolve issues that have been reported for 3.13-rc1.  All of these
  have been in linux-next for a bit this week"

* tag 'staging-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (25 commits)
  Staging: tidspbridge: disable driver
  staging: zsmalloc: Ensure handle is never 0 on success
  staging/lustre/ptlrpc: fix ptlrpc_stop_pinger logic
  staging: r8188eu: Fix AP mode
  Staging: btmtk_usb: Add hdev parameter to hdev->send driver callback
  Staging: go7007: fix up some remaining go->dev issues
  staging: imx-drm: Fix modular build of DRM_IMX_IPUV3
  staging: ft1000: fix use of potentially uninitialized variable
  Revert "staging:media: Use dev_dbg() instead of pr_debug()"
  Staging: zram: Fix memory leak by refcount mismatch
  staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
  staging: nvec: potential NULL dereference on error path
  Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd()
  staging: comedi: s626: fix value written by s626_set_dac()
  Staging: comedi: pcl730: fix some bitwise vs logical AND bugs
  staging: comedi: fix potentially uninitialised variable
  iio:accel:kxsd9 fix missing mutex unlock
  iio: adc: ti_am335x_adc: avoid double free of buffer.
  staging:iio: Fix hmc5843 Kconfig dependencies
  iio: Fix tcs3472 Kconfig dependencies
  ...
2013-11-27 21:05:31 -08:00
Linus Torvalds f496863658 Driver core fixes for 3.13-rc2
Here are 3 patches for sysfs issues that have been reported.  Well, 1
 patch really, the first one is reverted as it's not really needed (the
 correct fix is coming in through the different driver subsystems
 instead.)  But that 1 sysfs fix is needed, so this is still a good thing
 to pull in now.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlKWdcsACgkQMUfUDdst+yn9HgCgvXeP/GeK7Bt+1YhFIsrdRrNq
 7qsAnAvXOHh5FCn7h2Cw0yYb35kgUMQx
 =ZZSr
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here are 3 patches for sysfs issues that have been reported.  Well, 1
  patch really, the first one is reverted as it's not really needed (the
  correct fix is coming in through the different driver subsystems
  instead)

  But that 1 sysfs fix is needed, so this is still a good thing to pull
  in now"

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

* tag 'driver-core-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  Revert "sysfs: handle duplicate removal attempts in sysfs_remove_group()"
  sysfs: use a separate locking class for open files depending on mmap
  sysfs: handle duplicate removal attempts in sysfs_remove_group()
2013-11-27 21:04:37 -08:00
Linus Torvalds ba33fef0f6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:
 - fix compat ioctl leak in uhid, by David Herrmann
 - fix scheduling in atomic context (causing actual lockups in real
   world) in hid-sony driver, by Sven Eckelmann
 - revert patch introducing VID/PID conflict, by Jiri Kosina
 - support from various new device IDs by Benjamin Tissoires and
   KaiChung Cheng

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: uhid: fix leak for 64/32 UHID_CREATE
  HID: kye: fix unresponsive keyboard
  HID: kye: Add report fixup for Genius Manticore Keyboard
  HID: multicouh: add PID VID to support 1 new Wistron optical touch device
  HID: appleir: force input to be set
  Revert "HID: wiimote: add LEGO-wiimote VID"
  HID: sony: Send FF commands in non-atomic context
2013-11-27 20:41:54 -08:00
Linus Torvalds b7fe6bf7f4 ACPI and power management fixes for 3.13-rc2
- Fix for a recent regression in the Tegra cpufreq driver causing
    excess error messages to be printed from Stephen Warren.
 
  - ACPI-based device hotplug fix to prevent conflicting notify handlers
    from being installed for PCI host bridge objects.  From Toshi Kani.
 
  - ACPICA update to upstream version 20131115.  This contains bug fixes
    mostly (loop termination fix for the get AML length function, fixes
    related to namespace node removal and debug output).  From Bob Moore,
    Tomasz Nowicki and Lv Zheng.
 
  - Removal of incorrect inclusions of internal ACPICA header files by
    non-ACPICA code from Lv Zheng.
 
  - Fixes for the ACPI sysfs interface exposing tables to user space
    from Daisuke Hatayama and Jeremy Compostella.
 
  - Assorted ACPI and cpufreq cleanups from Sachin Kamat and Al Stone.
 
  - cpupower tool fix and man page from Thomas Renninger.
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABCAAGBQJSlfhOAAoJEILEb/54YlRxAAcP/0cHhj2bhkeMvs1fzsDjCkCZ
 XkoIYFgdfk1NEW27kgDBoNAziKwz8aB7m5F2oumFuoUexOcG67ZYPGqrXfOJnWcc
 VD0eMqIBkpI+xGzTERqBVU8TU2XE7lFA1iBV86eOzKc3xFmQr2RLvE9GQJtNQ7hq
 3NzesfrPpD8gablUAuH4eW2qiAqOVVPjj+uNjzWYgIpcKyrLxJDgTh9oIL2GzXHT
 EuRXtvZfINVxgqQSR2XIUHwN2dGztTFcJ8UF4yzIuNgx3ul4u3LB7J8lNybRc44M
 +p2ztx7lRCGbLFX9DId/Gl0itYvJL7Vsa7Awd+i4YPXClm22d+X6MPG2s/lfFof7
 nF2R5+wGnBkh4rfF01tF9GzifiT2JAqCewK1bRhpseblTrtFUfc6brcQQ/nlSlsA
 9zInrxz0kdMx1VEgWq70386qgzUDMJXB2ULj4U1SWt9NoK75SaBHeybjBpPIkA4l
 ZRUfV6sOWqUn11qSgfRgyV4/kyYXf8TVO0mxat4Wm3wDMohxwVqc/UW5Rzzd6cKi
 P+qHIkkyiWLdTXAv+AKiSsPvgd8L/4rOAPSCw0pjcC7/1LP94/8qCv4eGkqQkMLf
 5F9ay0B68T8iSw34EuB7JvRV0cpnK8YQtSzTAdiBEStBo/X10d62E/6f/3CTS83t
 Cr6c1KZWyOKIdU93eqZ2
 =pvmJ
 -----END PGP SIGNATURE-----

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

Pull ACPI and power management fixes from Rafael Wysocki:

 - Fix for a recent regression in the Tegra cpufreq driver causing
   excess error messages to be printed from Stephen Warren

 - ACPI-based device hotplug fix to prevent conflicting notify handlers
   from being installed for PCI host bridge objects.  From Toshi Kani

 - ACPICA update to upstream version 20131115.  This contains bug fixes
   mostly (loop termination fix for the get AML length function, fixes
   related to namespace node removal and debug output).  From Bob Moore,
   Tomasz Nowicki and Lv Zheng

 - Removal of incorrect inclusions of internal ACPICA header files by
   non-ACPICA code from Lv Zheng

 - Fixes for the ACPI sysfs interface exposing tables to user space from
   Daisuke Hatayama and Jeremy Compostella

 - Assorted ACPI and cpufreq cleanups from Sachin Kamat and Al Stone

 - cpupower tool fix and man page from Thomas Renninger

* tag 'pm+acpi-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: Clean up incorrect inclusions of ACPICA headers
  tools: cpupower: fix wrong err msg not supported vs not available
  tools: cpupower: Add cpupower-idle-set(1) manpage
  ACPI / sysfs: Fix incorrect ACPI tables walk in acpi_tables_sysfs_init()
  ACPI / sysfs: Set file size for each exposed ACPI table
  ACPICA: Update version to 20131115.
  ACPICA: Add support to delete all objects attached to the root namespace node.
  ACPICA: Delete all attached data objects during namespace node deletion.
  ACPICA: Resources: Fix loop termination for the get AML length function.
  ACPICA: Tests: Add CHECKSUM_ABORT protection for test utilities.
  ACPICA: Debug output: Do not emit function nesting level for kernel build.
  ACPI / sleep: clean up compiler warning about uninitialized field
  cpufreq: exynos: Remove unwanted EXPORT_SYMBOL
  cpufreq: tegra: don't error target() when suspended
  ACPI / hotplug: Fix conflicted PCI bridge notify handlers
2013-11-27 20:40:35 -08:00
Nicolas Dichtel 96d5d9d9e8 doc: fix generation of device-drivers
Since commit 7a6354e241 ("sched: Move wait.c into kernel/sched/"), the
path of this file has changed.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Andy Whitcroft <apw@canonical.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-27 20:40:04 -08:00
Ilia Mirkin eec99016e3 drm/nouveau/hwmon: fix compilation without CONFIG_HWMON
Reported-by: Jim Davis <jim.epost@gmail.com>
Tested-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-11-28 14:38:09 +10:00
Will Deacon 14058d20c1 lockref: include mutex.h rather than reinvent arch_mutex_cpu_relax
arch_mutex_cpu_relax is already conditionally defined in mutex.h, so
simply include that header rather than replicate the code here.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-27 20:37:33 -08:00
David Herrmann a1f84f57f9 drm/sysfs: fix OOM verification
Copy/Paste typo.. we need to test for ->kdev instead of ->dev.

Reported-by: Juha Leppänen <juha_efku@dnainternet.net>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-11-28 14:35:23 +10:00
Dave Jones dad337501d remove obsolete references to powertweak
This tool hasn't been maintained in over a decade, and is pretty much
useless these days.  Let's pretend it never happened.

Also remove a long-dead email address.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-27 20:34:32 -08:00
Linus Torvalds a456c0d9c0 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Ben Herrenschmidt:
 "The main thing that caused problem was that CONFIG_CPU_LITTLE_ENDIAN
  got turned on with allyesconfig and such, which is not a very good
  idea especially since it requires a newer toolchain than what most
  people have.

  So we turned it into a choice instead that defaults to big endian"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/windfarm: Fix XServe G5 fan control Makefile issue
  arch/powerpc/kernel: Use %12.12s instead of %12s to avoid memory overflow
  powerpc/signals: Improved mark VSX not saved with small contexts fix
  powerpc/kdump: Adding symbols in vmcoreinfo to facilitate dump filtering
  powerpc: allyesconfig should not select CONFIG_CPU_LITTLE_ENDIAN
  powerpc: Fix error when cross building TAGS & cscope
  powerpc/booke: Only check for hugetlb in flush if vma != NULL
  powerpc/85xx: typo in dts: "interupt" (four devices)
  powerpc/8xx: mfspr SPRN_TBRx in lieu of mftb/mftbu is not supported
  powerpc/corenet64: compile with CONFIG_E{5,6}500_CPU well
2013-11-27 20:32:38 -08:00
NeilBrown 6d183de407 md/raid5: fix newly-broken locking in get_active_stripe.
commit 566c09c534 raid5: relieve lock contention in get_active_stripe()

modified the locking in get_active_stripe() reducing the range
protected by the (highly contended) device_lock.
Unfortunately it reduced the range too much opening up some races.

One race can occur if get_priority_stripe runs between the
test on sh->count and device_lock being taken.
This will mean that sh->lru is not empty while get_active_stripe
thinks ->count is zero resulting in a 'BUG' firing.

Another race happens if __release_stripe is called immediately
after sh->count is tested and found to be non-zero.  If STRIPE_HANDLE
is not set, get_active_stripe should increment ->active_stripes
when it increments ->count from 0, but as it didn't think it was 0,
it doesn't.

Extending device_lock to cover the test on sh->count close these
races.

While we are here, fix the two BUG tests:
 -If count is zero, then lru really must not be empty, or we've
  lock the stripe_head somehow - no other tests are relevant.
 -STRIPE_ON_RELEASE_LIST is completely independent of ->lru so
  testing it is pointless.

Reported-and-tested-by: Brassow Jonathan <jbrassow@redhat.com>
Reviewed-by: Shaohua Li <shli@kernel.org>
Fixes: 566c09c534
Signed-off-by: NeilBrown <neilb@suse.de>
2013-11-28 11:00:15 +11:00
NeilBrown 142d44c310 md: test mddev->flags more safely in md_check_recovery.
commit 7a0a5355cb md: Don't test all of mddev->flags at once.
made most tests on mddev->flags safer, but missed one.

When
commit 260fa034ef md: avoid deadlock when dirty buffers during md_stop.
added MD_STILL_CLOSED, this caused md_check_recovery to misbehave.
It can think there is something to do but find nothing.  This can
lead to the md thread spinning during array shutdown.

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

Reported-and-tested-by: Richard W.M. Jones <rjones@redhat.com>
Fixes: 260fa034ef
Cc: stable@vger.kernel.org (3.12)
Signed-off-by: NeilBrown <neilb@suse.de>
2013-11-28 11:00:08 +11:00
NeilBrown 0c775d5208 md/raid5: fix new memory-reference bug in alloc_thread_groups.
In alloc_thread_groups, worker_groups is a pointer to an array,
not an array of pointers.
So
   worker_groups[i]
is wrong.  It should be
   &(*worker_groups)[i]

Found-by: coverity
Fixes: 60aaf93385
Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Cc: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2013-11-28 11:00:04 +11:00
Greg Kroah-Hartman 81440e7374 Revert "sysfs: handle duplicate removal attempts in sysfs_remove_group()"
This reverts commit 54d71145a4.

The root cause of these "inverted" sysfs removals have now been found,
so there is no need for this patch.  Keep this functionality around so
that this type of error doesn't show up in driver code again.

Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-27 09:44:55 -08:00
Greg Kroah-Hartman 930ba4a374 Staging: tidspbridge: disable driver
There seems to be no active maintainer for the driver, and there is an
unfixed security bug, so disable the driver for now.

Hopefully someone steps up to be the maintainer, and works to get this
out of staging, otherwise it will be deleted soon.

Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
Cc: Kanigeri, Hari <h-kanigeri2@ti.com>
Cc: Ameya Palande <ameya.palande@nokia.com>
Cc: Guzman Lugo, Fernando <fernando.lugo@ti.com>
Cc: Hebbar, Shivananda <x0hebbar@ti.com>
Cc: Ramos Falcon, Ernesto <ernesto@ti.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Anna, Suman <s-anna@ti.com>
Cc: Gupta, Ramesh <grgupta@ti.com>
Cc: Gomez Castellanos, Ivan <ivan.gomez@ti.com>
Cc: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Armando Uribe De Leon <x0095078@ti.com>
Cc: Deepak Chitriki <deepak.chitriki@ti.com>
Cc: Menon, Nishanth <nm@ti.com>
Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-27 09:32:49 -08:00
Markus Mayer e2f0b00560 gpio: bcm281xx: Fix return value of bcm_kona_gpio_get()
We need to return the corresponding bit for a particular GPIO. This bit
contains shift not mask.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-11-27 15:01:03 +01:00
Linus Walleij 2ba3154d9c gpio: pl061: move irqdomain initialization
The PL061 driver had the irqdomain initialization in an unfortunate
place: when used with device tree (and thus passing the base IRQ
0) the driver would work, as this registers an irqdomain and waits
for mappings to be done dynamically as the devices request their
IRQs, whereas when booting using platform data the irqdomain core
would attempt to allocate IRQ descriptors dynamically (which works
fine) but also to associate the irq_domain_associate_many() on all
IRQs, which in turn will call the mapping function which at this
point will try to set the type of the IRQ and then tries to acquire
a non-initialized spinlock yielding a backtrace like this:

CPU: 0 PID: 1 Comm: swapper Not tainted 3.13.0-rc1+ #652
Backtrace:
[<c0016f0c>] (dump_backtrace) from [<c00172ac>] (show_stack+0x18/0x1c)
 r6:c798ace0 r5:00000000 r4:c78257e0 r3:00200140
[<c0017294>] (show_stack) from [<c0329ea0>] (dump_stack+0x20/0x28)
[<c0329e80>] (dump_stack) from [<c004fa80>] (__lock_acquire+0x1c0/0x1b80)
[<c004f8c0>] (__lock_acquire) from [<c0051970>] (lock_acquire+0x6c/0x80)
 r10:00000000 r9:c0455234 r8:00000060 r7:c047d798 r6:600000d3 r5:00000000
 r4:c782c000
[<c0051904>] (lock_acquire) from [<c032e484>] (_raw_spin_lock_irqsave+0x60/0x74)
 r6:c01a1100 r5:800000d3 r4:c798acd0
[<c032e424>] (_raw_spin_lock_irqsave) from [<c01a1100>] (pl061_irq_type+0x28/0x)
 r6:00000000 r5:00000000 r4:c798acd0
[<c01a10d8>] (pl061_irq_type) from [<c0059ef4>] (__irq_set_trigger+0x70/0x104)
 r6:00000000 r5:c01a10d8 r4:c046da1c r3:c01a10d8
[<c0059e84>] (__irq_set_trigger) from [<c005b348>] (irq_set_irq_type+0x40/0x60)
 r10:c043240c r8:00000060 r7:00000000 r6:c046da1c r5:00000060 r4:00000000
[<c005b308>] (irq_set_irq_type) from [<c01a1208>] (pl061_irq_map+0x40/0x54)
 r6:c79693c0 r5:c798acd0 r4:00000060
[<c01a11c8>] (pl061_irq_map) from [<c005d27c>] (irq_domain_associate+0xc0/0x190)
 r5:00000060 r4:c046da1c
[<c005d1bc>] (irq_domain_associate) from [<c005d604>] (irq_domain_associate_man)
 r8:00000008 r7:00000000 r6:c79693c0 r5:00000060 r4:00000000
[<c005d5d0>] (irq_domain_associate_many) from [<c005d864>] (irq_domain_add_simp)
 r8:c046578c r7:c035b72c r6:c79693c0 r5:00000060 r4:00000008 r3:00000008
[<c005d814>] (irq_domain_add_simple) from [<c01a1380>] (pl061_probe+0xc4/0x22c)
 r6:00000060 r5:c0464380 r4:c798acd0
[<c01a12bc>] (pl061_probe) from [<c01c0450>] (amba_probe+0x74/0xe0)
 r10:c043240c r9:c0455234 r8:00000000 r7:c047d7f8 r6:c047d744 r5:00000000
 r4:c0464380

This moves the irqdomain initialization to a point where the spinlock
and GPIO chip are both fully propulated, so the callbacks can be used
without crashes.

I had some problem reproducing the crash, as the devm_kzalloc():ed
zeroed memory would seemingly mask the spinlock as something OK,
but by poisoning the lock like this:

u32 *dum;
dum = (u32 *) &chip->lock;
*dum = 0xaaaaaaaaU;

I could reproduce, fix and test the patch.

Reported-by: Russell King <linux@arm.linux.org.uk>
Cc: Rob Herring <robherring2@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-11-27 14:13:50 +01:00
David Herrmann 80897aa787 HID: uhid: fix leak for 64/32 UHID_CREATE
UHID allows short writes so user-space can omit unused fields. We
automatically set them to 0 in the kernel. However, the 64/32 bit
compat-handler didn't do that in the UHID_CREATE fallback. This will
reveal random kernel heap data (of random size, even) to user-space.

Fixes: befde0226a ('HID: uhid: make creating devices work on 64/32 systems')

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-11-27 10:53:49 +01:00
Linus Torvalds 8ae516aa8b This includes two fixes.
1) is a bug fix that happens when root does the following:
 
   echo function_graph > current_tracer
   modprobe foo
   echo nop > current_tracer
 
 This causes the ftrace internal accounting to get screwed up and
 crashes ftrace, preventing the user from using the function tracer
 after that.
 
 2) if a TRACE_EVENT has a string field, and NULL is given for it.
 
 The internal trace event code does a strlen() and strcpy() on the
 source of field. If it is NULL it causes the system to oops.
 
 This bug has been there since 2.6.31, but no TRACE_EVENT ever passed
 in a NULL to the string field, until now.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQEcBAABAgAGBQJSlUw+AAoJEKQekfcNnQGugTYIAJQ7Zfhor2Jrw7XzkcBDpQv9
 kqL/NvjLfyA49BLwba0VJCqJA56dEfW7kaSa7Wx0qAHdHKATLDA8G4c9FdHRAmZf
 WJ4jDbrcJqc7DA2vEn4aUuczwvTMx0H1KJHPMAu9taEno3YocIzCMxkuNYelwAz2
 XUkUGtR7olF85pyVccfZLKnKPtslSwxWoG6WgEqiAap6fIorPlcSXBVYFqLKVTRJ
 P2e847eqxMF5ACLmv3dWiEvTPtWY91abN1zpeJYQNjBtQJmzVlvRcXYE6TwPUIFg
 RtB9n3SrT+0lEWvcxDbQi+4hKHf+JQLkGaYwWCMJihbdF4sh36olzpUOimKVqsk=
 =+9+v
 -----END PGP SIGNATURE-----

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

Pull tracing fixes from Steven Rostedt:
 "This includes two fixes.

  1) is a bug fix that happens when root does the following:

     echo function_graph > current_tracer
     modprobe foo
     echo nop > current_tracer

   This causes the ftrace internal accounting to get screwed up and
   crashes ftrace, preventing the user from using the function tracer
   after that.

  2) if a TRACE_EVENT has a string field, and NULL is given for it.

   The internal trace event code does a strlen() and strcpy() on the
   source of field.  If it is NULL it causes the system to oops.

   This bug has been there since 2.6.31, but no TRACE_EVENT ever passed
   in a NULL to the string field, until now"

* tag 'trace-fixes-v3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ftrace: Fix function graph with loading of modules
  tracing: Allow events to have NULL strings
2013-11-26 18:04:21 -08:00
Linus Torvalds 4f9e5df211 Merge branch 'for-linus-bugs' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull ceph bug-fixes from Sage Weil:
 "These include a couple fixes to the new fscache code that went in
  during the last cycle (which will need to go stable@ shortly as well),
  a couple client-side directory fragmentation fixes, a fix for a race
  in the cap release queuing path, and a couple race fixes in the
  request abort and resend code.

  Obviously some of this could have gone into 3.12 final, but I
  preferred to overtest rather than send things in for a late -rc, and
  then my travel schedule intervened"

* 'for-linus-bugs' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: allocate non-zero page to fscache in readpage()
  ceph: wake up 'safe' waiters when unregistering request
  ceph: cleanup aborted requests when re-sending requests.
  ceph: handle race between cap reconnect and cap release
  ceph: set caps count after composing cap reconnect message
  ceph: queue cap release in __ceph_remove_cap()
  ceph: handle frag mismatch between readdir request and reply
  ceph: remove outdated frag information
  ceph: hung on ceph fscache invalidate in some cases
2013-11-26 18:02:46 -08:00
Benjamin Herrenschmidt 721cb59e9d powerpc/windfarm: Fix XServe G5 fan control Makefile issue
We are missing building windfarm_max6690_sensor.o when building
CONFIG_WINDFARM_RM31. Usually all the windfarm drivers are built
and thus this isn't a problem but some more "tailored" setups
(Gentoo ?) building only that driver are not working because
the require sensor module is missing.

Reported-by: Stanislav Ponomarev <devhexorg@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-11-27 11:35:47 +11:00
Rafael J. Wysocki b90f7b8af9 Merge branch 'pm-tools'
* pm-tools:
  tools: cpupower: fix wrong err msg not supported vs not available
  tools: cpupower: Add cpupower-idle-set(1) manpage
2013-11-27 01:05:14 +01:00
Rafael J. Wysocki db8fbb49df Merge branch 'pm-cpufreq'
* pm-cpufreq:
  cpufreq: exynos: Remove unwanted EXPORT_SYMBOL
  cpufreq: tegra: don't error target() when suspended
2013-11-27 01:03:43 +01:00
Rafael J. Wysocki 2d304ba757 Merge branch 'acpica'
* acpica:
  ACPI: Clean up incorrect inclusions of ACPICA headers
  ACPICA: Update version to 20131115.
  ACPICA: Add support to delete all objects attached to the root namespace node.
  ACPICA: Delete all attached data objects during namespace node deletion.
  ACPICA: Resources: Fix loop termination for the get AML length function.
  ACPICA: Tests: Add CHECKSUM_ABORT protection for test utilities.
  ACPICA: Debug output: Do not emit function nesting level for kernel build.
2013-11-27 01:03:27 +01:00
Linus Torvalds 0e4b0743bb ARM: SoC fixes for 3.13-rc
Mostly bugfixes and a few small code removals. Worth pointing out is:
 
 - A handful of more fixes to get DT enablement working properly on OMAP,
   finding new breakage of things that don't work quite right yet without
   the traditional board files. I expect a bit more of this to come in this
   release as people test on their hardware.
 - Implementation of power_down_finish() on vexpress, to make kexec work and
   to stop the MCPM core to produce a warning (the warning was new to 3.13-rc1).
 - A handful of minor fixes for various platforms.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJSlPDhAAoJEIwa5zzehBx31dkP/RyP/esMHSBO5k36eB5V35HP
 /XcexbgnnH4tDVIKl28qH4/AjkT+09uNZ/QQpbshwmEHw1X5i+Dz455suBCdP0T7
 D+dHy/YCMDuMD7ow0OXWyyL9XbILV5VuBUogrdMN/RhzW2gIvIJRuHztKBQcU8sw
 L94OIPjlKX/YFrswuy0LXiIZt2Y2k3zFVFCwcxIpTB4F1avYj7luZjSX6y469TEB
 JyqfO+hooU/qtuc1pKTnBzKxVI7IVae3bberDhZCCKsAxP1/c5rSMy+nf60rqB4O
 nkT09sAr1SBVp6kB4Ql2yHGiZ5ozxSJbMQpx1v73wnS09wL9RXwR1GZPrNcDW90l
 qwergTrBxhYdzWyNAf/87DmQhB+Xf7kGqtUuRHleuuFhBOU29qR8oXQ6WMRkzHn9
 ZTSRZ99l5a3Aul8w+sEWzOKDdZfhycMsBNzWH8xpzR1fgH4N9GRJlSlqkWdrVGca
 QBNiC5bmtPpMgAHSkqK0Zu3rog83NX9NxcXG15FVEah7J4Q/VT/x51AIh0uSRBf0
 35lY86R79SQ3FYYyHhl2pyAw8nhY2EmofGSG2WJ+qfZ9TgDSDFdwA0hz2fp9nwFc
 Lwb3zGUEyGwgJ4I/n/cDGBfY2CsJuTEcDtB4sW1Vw4GrzMQvc43SWly6e5+RSAgq
 reP23wcD4/YKev7//zzI
 =zdhe
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Olof Johansson:
 "Mostly bugfixes and a few small code removals.  Worth pointing out is:

   - A handful of more fixes to get DT enablement working properly on
     OMAP, finding new breakage of things that don't work quite right
     yet without the traditional board files.  I expect a bit more of
     this to come in this release as people test on their hardware.
   - Implementation of power_down_finish() on vexpress, to make kexec
     work and to stop the MCPM core to produce a warning (the warning
     was new to 3.13-rc1).
   - A handful of minor fixes for various platforms"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: bcm2835: add missing #xxx-cells to I2C nodes
  ARM: dts: Add max77686 RTC interrupt to cros5250-common
  ARM: vexpress/TC2: Implement MCPM power_down_finish()
  ARM: tegra: Provide dummy powergate implementation
  ARM: omap: fix warning with LPAE build
  ARM: OMAP2+: Remove legacy omap4_twl6030_hsmmc_init
  ARM: OMAP2+: Remove legacy mux code for display.c
  ARM: OMAP2+: Fix undefined reference to set_cntfreq
  gpio: twl4030: Fix passing of pdata in the device tree case
  gpio: twl4030: Fix regression for twl gpio output
  ARM: OMAP2+: More randconfig fixes for reconfigure_io_chain
  ARM: dts: imx6qdl: disable spdif "rxtx5" clock option
  ARM: dts: Fix omap2 specific dtsi files by adding the missing entries
  ARM: OMAP2+: Fix GPMC and simplify bootloader timings for 8250 and smc91x
  i2c: omap: Fix missing device tree flags for omap2
2013-11-26 11:18:37 -08:00
Linus Torvalds 3af4977ed6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull IMA fixes from James Morris:
 "These three patches fix regressions in the IMA code in your current
  tree.

  The first fixes a couple of bugs in template_desc_init_fields(), and
  the other two ensure that changes in this kernel don't break
  userspace"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  ima: make a copy of template_fmt in template_desc_init_fields()
  ima: do not send field length to userspace for digest of ima template
  ima: do not include field length in template digest calc for ima template
2013-11-26 11:16:54 -08:00
Linus Torvalds b95485143b NTB driver bug fixes to address a missed call to pci_enable_msix,
NTB-RP Link Up issue, Xeon Doorbell errata workaround, ntb_transport
 link down race, and correct dmaengine_get/put usage.  Also, clean-ups
 to remove duplicate defines and document a hardware errata.  Finally,
 some changes to improve performance.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJSj/dCAAoJEG5mS6x6i9IjCfAP/0pVA7VYAjQQGLtpUIf8RNIe
 iNV58Q3h74+CSzyHkz51HYuJB+6uRC6c0ChKuZMUZk/ca3hqfW0FcC1V3SjYLzxP
 Bdf687TaEE4WJOaTI5hnAzzDQ+gU9aE4DgaqvFz43M4jh4scSleuE+CQ0Pjm682x
 71KespuPO7Z77EC5QPbWWV5KRSkF4FHuAuDcr8TYAmSnCb8VDGDxdnwYYwBTeY3j
 DuPUwLGwvbE6X4gWmOYZSwDz6cArEs1CunpeP3EUFY4rjTZArc4MSLWdC6lYQtZp
 T90khUDU/UklUqlOOuydJe30zT60uPBagcEL94JxyWFT+wa5b/ra+gvU+FE4NBzA
 ZW6LVlXnYTQ5XJeO5HNDRBHPZ3zZaDI+TGDBM13EBS0wbcO3PojR6Z78nlkjPLeJ
 /a1sIEfM3ts7u3Vpw8GpBbhl6+8tP6xbV/rDbzfE6mfq/VVwbfAa/k9oQVh8pfoJ
 YyGq1Gr43aAFm0imPRF0qRNDnSDF2UiYrNHntWWyfhW7Vmq/EjT0H21AHhgxnP7b
 3AaKQl7nuYoNzx6x8ZiEcSkDy+8qY84i2vUzd9Qll/SBVCOK7KvBoFmu9x7D+ZdN
 0mS4qFNXSmHhow7ur2ffwzIaSkggVIhLbEiH4bYbPP+wXzhlTLTnnRb3lFmTs/5X
 /HTR7QGxfDAzcjpYAzlS
 =nOG2
 -----END PGP SIGNATURE-----

Merge tag 'ntb-3.13' of git://github.com/jonmason/ntb

Pull non-transparent bridge updates from Jon Mason:
 "NTB driver bug fixes to address a missed call to pci_enable_msix,
  NTB-RP Link Up issue, Xeon Doorbell errata workaround, ntb_transport
  link down race, and correct dmaengine_get/put usage.

  Also, clean-ups to remove duplicate defines and document a hardware
  errata.  Finally, some changes to improve performance"

* tag 'ntb-3.13' of git://github.com/jonmason/ntb:
  NTB: Disable interrupts and poll under high load
  NTB: Enable Snoop on Primary Side
  NTB: Document HW errata
  NTB: remove duplicate defines
  NTB: correct dmaengine_get/put usage
  NTB: Fix ntb_transport link down race
  ntb: Fix missed call to pci_enable_msix()
  NTB: Fix NTB-RP Link Up
  NTB: Xeon Doorbell errata workaround
2013-11-26 11:15:12 -08:00
Steven Rostedt (Red Hat) 8a56d7761d ftrace: Fix function graph with loading of modules
Commit 8c4f3c3fa9 "ftrace: Check module functions being traced on reload"
fixed module loading and unloading with respect to function tracing, but
it missed the function graph tracer. If you perform the following

 # cd /sys/kernel/debug/tracing
 # echo function_graph > current_tracer
 # modprobe nfsd
 # echo nop > current_tracer

You'll get the following oops message:

 ------------[ cut here ]------------
 WARNING: CPU: 2 PID: 2910 at /linux.git/kernel/trace/ftrace.c:1640 __ftrace_hash_rec_update.part.35+0x168/0x1b9()
 Modules linked in: nfsd exportfs nfs_acl lockd ipt_MASQUERADE sunrpc ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables uinput snd_hda_codec_idt
 CPU: 2 PID: 2910 Comm: bash Not tainted 3.13.0-rc1-test #7
 Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS SDBLI944.86P 05/08/2007
  0000000000000668 ffff8800787efcf8 ffffffff814fe193 ffff88007d500000
  0000000000000000 ffff8800787efd38 ffffffff8103b80a 0000000000000668
  ffffffff810b2b9a ffffffff81a48370 0000000000000001 ffff880037aea000
 Call Trace:
  [<ffffffff814fe193>] dump_stack+0x4f/0x7c
  [<ffffffff8103b80a>] warn_slowpath_common+0x81/0x9b
  [<ffffffff810b2b9a>] ? __ftrace_hash_rec_update.part.35+0x168/0x1b9
  [<ffffffff8103b83e>] warn_slowpath_null+0x1a/0x1c
  [<ffffffff810b2b9a>] __ftrace_hash_rec_update.part.35+0x168/0x1b9
  [<ffffffff81502f89>] ? __mutex_lock_slowpath+0x364/0x364
  [<ffffffff810b2cc2>] ftrace_shutdown+0xd7/0x12b
  [<ffffffff810b47f0>] unregister_ftrace_graph+0x49/0x78
  [<ffffffff810c4b30>] graph_trace_reset+0xe/0x10
  [<ffffffff810bf393>] tracing_set_tracer+0xa7/0x26a
  [<ffffffff810bf5e1>] tracing_set_trace_write+0x8b/0xbd
  [<ffffffff810c501c>] ? ftrace_return_to_handler+0xb2/0xde
  [<ffffffff811240a8>] ? __sb_end_write+0x5e/0x5e
  [<ffffffff81122aed>] vfs_write+0xab/0xf6
  [<ffffffff8150a185>] ftrace_graph_caller+0x85/0x85
  [<ffffffff81122dbd>] SyS_write+0x59/0x82
  [<ffffffff8150a185>] ftrace_graph_caller+0x85/0x85
  [<ffffffff8150a2d2>] system_call_fastpath+0x16/0x1b
 ---[ end trace 940358030751eafb ]---

The above mentioned commit didn't go far enough. Well, it covered the
function tracer by adding checks in __register_ftrace_function(). The
problem is that the function graph tracer circumvents that (for a slight
efficiency gain when function graph trace is running with a function
tracer. The gain was not worth this).

The problem came with ftrace_startup() which should always be called after
__register_ftrace_function(), if you want this bug to be completely fixed.

Anyway, this solution moves __register_ftrace_function() inside of
ftrace_startup() and removes the need to call them both.

Reported-by: Dave Wysochanski <dwysocha@redhat.com>
Fixes: ed926f9b35 ("ftrace: Use counters to enable functions to trace")
Cc: stable@vger.kernel.org # 3.0+
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-11-26 10:36:50 -05:00
Steven Rostedt (Red Hat) 4e58e54754 tracing: Allow events to have NULL strings
If an TRACE_EVENT() uses __assign_str() or __get_str on a NULL pointer
then the following oops will happen:

BUG: unable to handle kernel NULL pointer dereference at   (null)
IP: [<c127a17b>] strlen+0x10/0x1a
*pde = 00000000 ^M
Oops: 0000 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.13.0-rc1-test+ #2
Hardware name:                  /DG965MQ, BIOS MQ96510J.86A.0372.2006.0605.1717 06/05/2006^M
task: f5cde9f0 ti: f5e5e000 task.ti: f5e5e000
EIP: 0060:[<c127a17b>] EFLAGS: 00210046 CPU: 1
EIP is at strlen+0x10/0x1a
EAX: 00000000 EBX: c2472da8 ECX: ffffffff EDX: c2472da8
ESI: c1c5e5fc EDI: 00000000 EBP: f5e5fe84 ESP: f5e5fe80
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
CR0: 8005003b CR2: 00000000 CR3: 01f32000 CR4: 000007d0
Stack:
 f5f18b90 f5e5feb8 c10687a8 0759004f 00000005 00000005 00000005 00200046
 00000002 00000000 c1082a93 f56c7e28 c2472da8 c1082a93 f5e5fee4 c106bc61^M
 00000000 c1082a93 00000000 00000000 00000001 00200046 00200082 00000000
Call Trace:
 [<c10687a8>] ftrace_raw_event_lock+0x39/0xc0
 [<c1082a93>] ? ktime_get+0x29/0x69
 [<c1082a93>] ? ktime_get+0x29/0x69
 [<c106bc61>] lock_release+0x57/0x1a5
 [<c1082a93>] ? ktime_get+0x29/0x69
 [<c10824dd>] read_seqcount_begin.constprop.7+0x4d/0x75
 [<c1082a93>] ? ktime_get+0x29/0x69^M
 [<c1082a93>] ktime_get+0x29/0x69
 [<c108a46a>] __tick_nohz_idle_enter+0x1e/0x426
 [<c10690e8>] ? lock_release_holdtime.part.19+0x48/0x4d
 [<c10bc184>] ? time_hardirqs_off+0xe/0x28
 [<c1068c82>] ? trace_hardirqs_off_caller+0x3f/0xaf
 [<c108a8cb>] tick_nohz_idle_enter+0x59/0x62
 [<c1079242>] cpu_startup_entry+0x64/0x192
 [<c102299c>] start_secondary+0x277/0x27c
Code: 90 89 c6 89 d0 88 c4 ac 38 e0 74 09 84 c0 75 f7 be 01 00 00 00 89 f0 48 5e 5d c3 55 89 e5 57 66 66 66 66 90 83 c9 ff 89 c7 31 c0 <f2> ae f7 d1 8d 41 ff 5f 5d c3 55 89 e5 57 66 66 66 66 90 31 ff
EIP: [<c127a17b>] strlen+0x10/0x1a SS:ESP 0068:f5e5fe80
CR2: 0000000000000000
---[ end trace 01bc47bf519ec1b2 ]---

New tracepoints have been added that have allowed for NULL pointers
being assigned to strings. To fix this, change the TRACE_EVENT() code
to check for NULL and if it is, it will assign "(null)" to it instead
(similar to what glibc printf does).

Reported-by: Shuah Khan <shuah.kh@samsung.com>
Reported-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
Link: http://lkml.kernel.org/r/CAGdX0WFeEuy+DtpsJzyzn0343qEEjLX97+o1VREFkUEhndC+5Q@mail.gmail.com
Link: http://lkml.kernel.org/r/528D6972.9010702@samsung.com
Fixes: 9cbf117662 ("tracing/events: provide string with undefined size support")
Cc: stable@vger.kernel.org # 2.6.31+
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-11-26 10:34:46 -05:00
Stephen Warren a31ab44ef5 ARM: bcm2835: add missing #xxx-cells to I2C nodes
The I2C controller node needs #address-cells and #size-cells properties,
but these are currently missing. Add them. This allows child nodes to be
parsed correctly.

Cc: stable@vger.kernel.org
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-11-25 21:56:00 -08:00
Mattia Dongili b975dc3689 sony-laptop: do not scribble keyboard backlight registers on resume
Follow-up to commit 294d31e822 ("sony-laptop: don't change keyboard
backlight settings"): avoid messing up the state on resume.  Leave it to
what was before suspending as it's anyway likely that we still don't
know what value we should write to the EC registers.  This fix is also
required in 3.12

Cc: stable@vger.kernel.org
Tested-by: Karol Babioch <karol@babioch.de>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-26 13:03:36 +09:00
Greg Kroah-Hartman c42b4e6501 Revert "n_gsm: race between ld close and gsmtty open"
This reverts commit c284ee2cf1.  Turns out
the locking was incorrect.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Chao Bi <chao.bi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 18:30:21 -08:00
James Morris 6df025c1ae Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into for-linus 2013-11-26 11:05:14 +11:00
Kevin Hilman 192b4bcbbe The imx fixes for 3.13, part 2:
- Disable S/PDIF "rxtx5" clock option to fix the clocksource breakage
    introduced by S/PDIF driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJSjKihAAoJEFBXWFqHsHzOtPAIAKUpaOQ9LjbGM7TEhIStUY9Z
 GC7v1qDIikvo5iZJnTQgAD5+AFVdTbsufbyaMt1rvDmp6QCHr0Lsh+nzJEukTcLU
 rncE5GMOe7lEwgY5KI7iyw3C+Ow4VPND5gLAWYss2+Fd4wJ+4p2XiKaHtQp1KnI0
 L+g5RqqcV13DyP8usvJizmhQb1uhUReEIOIQJ21XszxiI8lPNa2YjoUCLs1aXrJv
 1/aQZKpzGKXAjrXRmnnJrpPyErs0aMzJ6OJwsac86RPZQSnvu20pdEQ8ze3XC5SA
 phEyUoLPWZcR58/Ot/mhuBHSQRXSENI45Y6CKwpGcoSYUOUnSNLmKZKkVgUIjYM=
 =hPqE
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-3.13-2' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

The imx fixes for 3.13, part 2:
 - Disable S/PDIF "rxtx5" clock option to fix the clocksource breakage
   introduced by S/PDIF driver

* tag 'imx-fixes-3.13-2' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: dts: imx6qdl: disable spdif "rxtx5" clock option

Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-11-25 15:55:18 -08:00
Lv Zheng 91be099857 ACPI: Clean up incorrect inclusions of ACPICA headers
Header file <acpi/acpi.h> contains environemnt settings and architecture
specific implementation that should be included before any other ACPICA
headers in order to keep a consistent build environment for ACPICA users.
The following internal ACPICA header files should be included from
<acpi/acpi.h> and should not be included by other kernel files:
  <acpi/acpiosxf.h>
  <acpi/acpixf.h>

Clean up incorrect inclusions of these files from non-ACPICA source
files.

[rjw: Subject and changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-11-26 00:27:10 +01:00
Doug Anderson c61248afa8 ARM: dts: Add max77686 RTC interrupt to cros5250-common
Without the interrupt you'll get problems if you enable
CONFIG_RTC_DRV_MAX77686.  Setup the interrupt properly in the device
tree.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: stable@vger.kernel.org
2013-11-25 15:14:41 -08:00
Dave Martin 33cb667a00 ARM: vexpress/TC2: Implement MCPM power_down_finish()
This patch implements the power_down_finish() method for TC2, to
enable the kernel to confirm when CPUs are safely powered down.

The information required for determining when a CPU is parked
cannot be obtained from any single place, so a few sources of
information must be combined:

  * mcpm_cpu_power_down() must be pending for the CPU, so that we
    don't get confused by false STANDBYWFI positives arising from
    CPUidle.  This is detected by waiting for the tc2_pm use count
    for the target CPU to reach 0.

  * Either the SPC must report that the CPU has asserted
    STANDBYWFI, or the TC2 tile's reset control logic must be
    holding the CPU in reset.

    Just checking for STANDBYWFI is not sufficient, because this
    signal is not latched when the the cluster is clamped off and
    powered down: the relevant status bits just drop to zero.  This
    means that STANDBYWFI status cannot be used for reliable
    detection of the last CPU in a cluster reaching WFI.

This patch is required in order for kexec to work with MCPM on TC2.

MCPM code was changed in commit 0de0d64675 ('ARM: 7848/1: mcpm:
Implement cpu_kill() to synchronise on powerdown'), and since then it
will hit a WARN_ON_ONCE() due to power_down_finish not being implemented
on the TC2 platform.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-11-25 14:12:14 -08:00
Thomas Renninger f4a5d17efe tools: cpupower: fix wrong err msg not supported vs not available
idlestates in sysfs are counted from 0.

This fixes a wrong error message.
Current behavior on a machine with 4 sleep states is:

cpupower idle-set -e 4
Idlestate 4 enabled on CPU 0

-----Wrong---------------------
cpupower idle-set -e 5
Idlestate enabling not supported by kernel
-----Must and now will be -----
cpupower idle-set -e 5
Idlestate 6 not available on CPU 0
-------------------------------

cpupower idle-set -e 6
Idlestate 6 not available on CPU 0

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-11-25 23:10:50 +01:00
Thomas Renninger 5094d27171 tools: cpupower: Add cpupower-idle-set(1) manpage
The cpupower idle-set subcommand was introduce recently.
This patch provides the missing manpage.

If cpupower is properly installed it will show up automatically
(similar to git), when invoking:
cpupower help idle-set
or
cpupower idle-set --help

Some parts have been taken over and adjusted from
git commit 62d6ae880e
documentation submitted by Carsten Emde.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-11-25 23:10:50 +01:00
Thierry Reding 9886e1fd09 ARM: tegra: Provide dummy powergate implementation
In order to support increased build test coverage for drivers, implement
dummies for the powergate implementation. This will allow the drivers to
be built without requiring support for Tegra to be selected.

This patch solves the following build errors, which can be triggered in
v3.13-rc1 by selecting DRM_TEGRA without ARCH_TEGRA:

drivers/built-in.o: In function `gr3d_remove':
drivers/gpu/drm/tegra/gr3d.c:321: undefined reference to `tegra_powergate_power_off'
drivers/gpu/drm/tegra/gr3d.c:325: undefined reference to `tegra_powergate_power_off'
drivers/built-in.o: In function `gr3d_probe':
drivers/gpu/drm/tegra/gr3d.c:266: undefined reference to `tegra_powergate_sequence_power_up'
drivers/gpu/drm/tegra/gr3d.c:273: undefined reference to `tegra_powergate_sequence_power_up'

Signed-off-by: Thierry Reding <treding@nvidia.com>
[swarren, updated commit description]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-11-25 13:34:51 -08:00