Commit graph

562302 commits

Author SHA1 Message Date
Vineet Gupta
6b538db7c6 ARC: dw2 unwind: Catch Dwarf SNAFUs early
Instead of seeing empty stack traces, let kernel fail early so dwarf
issues can be fixed sooner

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-12-21 14:01:49 +05:30
Vineet Gupta
6d0d506012 ARC: dw2 unwind: Don't bail for CIE.version != 1
The rudimentary CIE.version == 3 handling is already present in code
(for return address register specification)

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-12-21 14:01:25 +05:30
Vineet Gupta
2d64affc92 Revert "ARC: dw2 unwind: Ignore CIE version !=1 gracefully instead of bailing"
Blingly ignoring CIE.version != 1 was a bad idea.
It still leaves "desirability" when running perf with callgraphing where libgcc
symbols might show in hotspot.

More importantly, basic CIE.version == 3 support already exists in code:

|
|   retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end);
|

Next commit with simply add continue-not-bail for CIE.version != 1

This reverts commit 323f41f9e7.
2015-12-21 13:29:44 +05:30
Vineet Gupta
07fd7d4bbc ARC: Fix linking errors with CONFIG_MODULE + CONFIG_CC_OPTIMIZE_FOR_SIZE
At -Os, ARC gcc generates millicode thunk for function prologue/epilogue,
which are served by libgcc.

Modules historically are NOT linked with libgcc to avoid code bloat, reducing
runtime relocation fixups etc. I even once tried doing that but got lost
in makefile intricacies.

This means modules at -Os don't get the millicode thunks, causing build
failures below:

| MODPOST 5 modules
| ERROR: "__ld_r13_to_r18" [crypto/sha256_generic.ko] undefined!
| ERROR: "__ld_r13_to_r18_ret" [crypto/sha256_generic.ko] undefined!
| ERROR: "__st_r13_to_r18" [crypto/sha256_generic.ko] undefined!
| ERROR: "__ld_r13_to_r17_ret" [crypto/sha256_generic.ko] undefined!
| ERROR: "__st_r13_to_r17" [crypto/sha256_generic.ko] undefined!
| ERROR: "__ld_r13_to_r16_ret" [crypto/sha256_generic.ko] undefined!
| ERROR: "__st_r13_to_r16" [crypto/sha256_generic.ko] undefined!
|....
|....

Workaround that by inhibiting millicode thunks for loadable modules

Fixes STAR 9000641864:
("Linux built with optimizations for size emits errors for modules")

Reported-by: Anton Kolesov <akolesov@synosys.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-12-21 13:01:19 +05:30
Alexey Brodkin
4b32e89af7 ARC: mm: fix building for MMU v2
ARC700 cores with MMU v2 don't have IC_PTAG AUX register and so we only
define ARC_REG_IC_PTAG for MMU versions >= 3.

But current implementation of cache_line_loop_vX() routines assumes
availability of all of them (v2, v3 and v4) simultaneously.

And given undefined ARC_REG_IC_PTAG if CONFIG_MMU_VER=2 we're seeing
compilation problem:
---------------------------------->8-------------------------------
  CC      arch/arc/mm/cache.o
arch/arc/mm/cache.c: In function '__cache_line_loop_v3':
arch/arc/mm/cache.c:270:13: error: 'ARC_REG_IC_PTAG' undeclared (first use in this function)
   aux_tag = ARC_REG_IC_PTAG;
             ^
arch/arc/mm/cache.c:270:13: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:258: recipe for target 'arch/arc/mm/cache.o' failed
---------------------------------->8-------------------------------

The simples fix is to have ARC_REG_IC_PTAG defined regardless MMU
version being used.

We don't use it in cache_line_loop_v2() anyways so who cares.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-12-21 12:10:40 +05:30
Vineet Gupta
899cfd2bb0 ARC: mm: HIGHMEM: Fix section mismatch splat
| WARNING: vmlinux.o(.text+0xd6c2): Section mismatch in reference from the function alloc_kmap_pgtable() to the function
| .init.text:__alloc_bootmem_low()
The function alloc_kmap_pgtable() references the function __init __alloc_bootmem_low().
This is often because alloc_kmap_pgtable lacks a __init annotation or the annotation of __alloc_bootmem_low is wrong.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-12-21 12:10:40 +05:30
Srinivas Pandruvada
ce360db703 ACPI / processor: Fix thermal cooling device regression
The processor cooling device is no longer present for passive thermal
control.

Commit 239708a3af ("ACPI: Split out ACPI PSS from ACPI Processor driver")
moved the processing to a new function acpi_pss_perf_init(), but
missed "return 0" after successful creation.  This causes the error
handling functions to be called, which will delete the previously
created processor cooling device.

Fixes: 239708a3af (ACPI: Split out ACPI PSS from ACPI Processor driver)
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: 4.3+ <stable@vger.kernel.org> # 4.3+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-12-21 03:41:49 +01:00
NeilBrown
312045eef9 md: remove check for MD_RECOVERY_NEEDED in action_store.
md currently doesn't allow a 'sync_action' such as 'reshape' to be set
while MD_RECOVERY_NEEDED is set.

This s a problem, particularly since commit 738a273806 as that can
cause ->check_shape to call mddev_resume() which sets
MD_RECOVERY_NEEDED.  So by the time we come to start 'reshape' it is
very likely that MD_RECOVERY_NEEDED is still set.

Testing for this flag is not really needed and is in any case very
racy as it can be set at any moment - asynchronously.  Any race
between setting a sync_action and setting MD_RECOVERY_NEEDED must
already be handled properly in some locked code, probably
md_check_recovery(), so remove the test here.

The test on MD_RECOVERY_RUNNING is also racy in the 'reshape' case
so we should test it again after getting mddev_lock().

As this fixes a race and a regression which can cause 'reshape' to
fail, it is suitable for -stable kernels since 4.1

Reported-by: Xiao Ni <xni@redhat.com>
Fixes: 738a273806 ("md/raid5: fix allocation of 'scribble' array.")
Cc: stable@vger.kernel.org (v4.1+)
Signed-off-by: NeilBrown <neilb@suse.com>
2015-12-21 11:10:06 +11:00
Linus Torvalds
4ef7675344 Linux 4.4-rc6 2015-12-20 16:06:09 -08:00
Linus Torvalds
9f7e432786 RTC fixes for 4.4 #2
A fix for a nasty hardware bug in rk808 and a initialization reordering in
 da9063 to fix a possible crash.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJWdqZXAAoJEKbNnwlvZCyzbAcQAIC7LKRmsaMJW3a4vswqQTXr
 2wUknLbrQaWYd/bJXENTZj8rLDmyjlgYJWJOPtrYkmbgd0jfhel5VIvPYgbvqMLe
 7Ta+4bhGZcSDbzi5FXvgJkt42qxSBQQenl+SUbb9rjCmPbVEexHyyhd7VRSR7jMm
 8PlntP30ZoyHh7QB/JQfGwq0VS3TGgwJCZ5zro+zrlq71U0m0162fJ37+xuQ2dQR
 kL7XkRjDZQ/7KGgtqc37WzuP0k2PjtEDYiDxqpITqT/oPdY+JS2TiIitJyTyxIQS
 Q88DF6N0tONBddSAehc8zlCo43wAWdsV7OOCjHvyzJnqHD979Grk3qkESF6KEEIK
 kfLeCFLPKfh+NZWYH/k7000EMgFNt3Z/xBAECEoSev37+33+G9+SRzCXOQCd5C2k
 Azkw04KymHUQr4JS74pcjvFvSn1sNE3woYKfMEoZGdsSofRRLkCmKl5h0w6qPDZI
 3oKiDu7QyHI1HdXLZe814PhkneLIok0/P+NOkf89MJtlCZDlT6w6dNG+mfJP3Du9
 ra2flC5R+S8EK23YLj1mFDkLpilpUWXOnMGznRdgPbkTMgHusiwvfcrUIcXzat3I
 rUEGV73qIX3HaP3lYkuAyJ5tp3cX69pqPR9tWwqZggQt+r/IxJ2jBuE8PDY1cn3K
 pa0kYQ4ojSZvmLHC+pBP
 =xXh7
 -----END PGP SIGNATURE-----

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

Pull RTC fixes from Alexandre Belloni:
 "Late fixes for the RTC subsystem for 4.4:

  A fix for a nasty hardware bug in rk808 and an initialization
  reordering in da9063 to fix a possible crash"

* tag 'rtc-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: da9063: fix access ordering error during RTC interrupt at system power on
  rtc: rk808: Compensate for Rockchip calendar deviation on November 31st
2015-12-20 10:01:11 -08:00
Steve Twiss
77535acedc rtc: da9063: fix access ordering error during RTC interrupt at system power on
This fix alters the ordering of the IRQ and device registrations in the RTC
driver probe function. This change will apply to the RTC driver that supports
both DA9063 and DA9062 PMICs.

A problem could occur with the existing RTC driver if:

A system is started from a cold boot using the PMIC RTC IRQ to initiate a
power on operation. For instance, if an RTC alarm is used to start a
platform from power off.
The existing driver IRQ is requested before the device has been properly
registered.
i.e.
    ret = devm_request_threaded_irq()
comes before
    rtc->rtc_dev = devm_rtc_device_register();

In this case, the interrupt can be called before the device has been
registered and the handler can be called immediately. The IRQ handler
da9063_alarm_event() contains the function call

    rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF);

which in turn tries to access the unavailable rtc->rtc_dev.

The fix is to reorder the functions inside the RTC probe. The IRQ is
requested after the RTC device resource has been registered so that
get_irq_byname is the last thing to happen.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-12-20 13:39:29 +01:00
Julius Werner
f076ef44a4 rtc: rk808: Compensate for Rockchip calendar deviation on November 31st
In A.D. 1582 Pope Gregory XIII found that the existing Julian calendar
insufficiently represented reality, and changed the rules about
calculating leap years to account for this. Similarly, in A.D. 2013
Rockchip hardware engineers found that the new Gregorian calendar still
contained flaws, and that the month of November should be counted up to
31 days instead. Unfortunately it takes a long time for calendar changes
to gain widespread adoption, and just like more than 300 years went by
before the last Protestant nation implemented Greg's proposal, we will
have to wait a while until all religions and operating system kernels
acknowledge the inherent advantages of the Rockchip system. Until then
we need to translate dates read from (and written to) Rockchip hardware
back to the Gregorian format.

This patch works by defining Jan 1st, 2016 as the arbitrary anchor date
on which Rockchip and Gregorian calendars are in sync. From that we can
translate arbitrary later dates back and forth by counting the number
of November/December transitons since the anchor date to determine the
offset between the calendars. We choose this method (rather than trying
to regularly "correct" the date stored in hardware) since it's the only
way to ensure perfect time-keeping even if the system may be shut down
for an unknown number of years. The drawback is that other software
reading the same hardware (e.g. mainboard firmware) must use the same
translation convention (including the same anchor date) to be able to
read and write correct timestamps from/to the RTC.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-12-20 13:39:00 +01:00
Linus Torvalds
69c37a92dd TTY/Serial fixes for 4.4-rc6
Here are some tty/serial driver fixes for 4.4-rc6 that resolve some
 reported problems.  All of these have been in linux-next.  The details
 are in the shortlog.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlZ19rAACgkQMUfUDdst+ykBQQCeKSU7YZFKPTEFbGKS2UfFgMJd
 EokAoIJp4lXqhLHKtI7TNwVFlMQAaDYj
 =2I3R
 -----END PGP SIGNATURE-----

Merge tag 'tty-4.4-rc6' 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 4.4-rc6 that resolve some
  reported problems.  All of these have been in linux-next.  The details
  are in the shortlog"

* tag 'tty-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: Fix GPF in flush_to_ldisc()
  serial: earlycon: Add missing spinlock initialization
  serial: sh-sci: Fix length of scatterlist
  n_tty: Fix poll() after buffer-limited eof push read
  serial: 8250_uniphier: fix dl_read and dl_write functions
2015-12-19 17:44:19 -08:00
Linus Torvalds
24b0d5e738 USB fixes for 4.4-rc6
Here are some USB and PHY fixes for 4.4-rc6.  All of them resolve some
 reported problems.  Full details in the shortlog.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlZ1+CoACgkQMUfUDdst+yksSQCg1MuW8nVyz7eUHcZnd/r4dSPa
 fy8An0J0aKi8IhUMSIAIFcoM4/40ulCE
 =ycut
 -----END PGP SIGNATURE-----

Merge tag 'usb-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB and PHY fixes for 4.4-rc6.  All of them resolve some
  reported problems.  Full details in the shortlog"

* tag 'usb-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: fix invalid memory access in hub_activate()
  USB: ipaq.c: fix a timeout loop
  phy: core: Get a refcount to phy in devm_of_phy_get_by_index()
  phy: cygnus: pcie: add missing of_node_put
  phy: miphy365x: add missing of_node_put
  phy: miphy28lp: add missing of_node_put
  phy: rockchip-usb: add missing of_node_put
  phy: berlin-sata: add missing of_node_put
  phy: mt65xx-usb3: add missing of_node_put
  phy: brcmstb-sata: add missing of_node_put
  phy: sun9i-usb: add USB dependency
2015-12-19 17:33:58 -08:00
Linus Torvalds
3a87711e58 4 fixes for md in 4.4-rc5
- 2 recently introduced regressions fixed.
 - one older bug in RAID10 - tagged for -stable since 4.2
 - one minor sysfs api improvement.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWddZIAAoJEDnsnt1WYoG5L/AQAMBmdj4kQiqVq/y4q26+V79d
 W4AVgmGJLRuya1Xy1yN58TIrG7TLWRciH7q/P21g9AIFEso3wU42PNwvDjYG4xRN
 XzovJA91xmRkz2RSxaDs45kxpaOCB2ED+VgdMn4+VLAl23I0oI/gdGxJfs/OBuWI
 OoG09gNCJXhuZETFRqtlH9BZb+QAfYWdJOKbHXvrXDJlevWmz1Oav+QO+V3rAWRu
 nnupsrlLL9GxvS51oSV7PmRcFFNa03AHDNelUPxdlPrQosi5CgH27SVlxygJtFBP
 djyq4NKFXAD0sTsqeleJ9Ib7D0HZ/P84GC68NNILEDbjdu8kMGWeC8FZ4rXuxRCf
 VARBF+H/647uxfjZfKUwqTZsYYPPANkr6gK8jKgiuo0gc8V1lgF53OsokeWkCPZN
 nvDpS9MYrhKB8m7VO3KL1cIgu9fee2vnJLjf8wsNh2N9SDkBCz+7vENjbfbAyKAz
 V2H97Mgw1UQSnOcsvfVv0r4TmMFUcCslujFyjQu7A83NTWZ/ICGkRVUKP7tK8pc6
 fQ6MG1vIdPzhVduOrTjlTr9eT/4Sk1ofl1LOFC7gnN6vHhubzOfcuwrDWgnqVGiE
 0BY0NVsa7f6tzjA6h9pDjnFjdF6uM4QGEgfnLBmRJ8ehwvXBwH6CJUbIBhDWHhj1
 rrm2LYiEuA1nWfWEpD8x
 =nHNn
 -----END PGP SIGNATURE-----

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

Pull md fixes from Neil Brown:
 "Four fixes for md:

   - two recently introduced regressions fixed.
   - one older bug in RAID10 - tagged for -stable since 4.2
   - one minor sysfs api improvement"

* tag 'md/4.4-rc5-fixes' of git://neil.brown.name/md:
  Fix remove_and_add_spares removes drive added as spare in slot_store
  md: fix bug due to nested suspend
  MD: change journal disk role to disk 0
  md/raid10: fix data corruption and crash during resync
2015-12-19 16:46:46 -08:00
Linus Torvalds
35b3154efb powerpc fixes for 4.4 #4
- Partial revert of "powerpc: Individual System V IPC system calls"
  - pr_warn_once on unsupported OPAL_MSG type from Stewart
  - Fix deadlock in opal-irqchip introduced by "Fix double endian conversion" from Alistair
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWdTe9AAoJEFHr6jzI4aWANO4QAJwqS2Zhga0v/JSqMUpKgrlM
 aFMLp6nM25wHkFmRBbIgJbkQAqG+2Sl43OARuJ4y4b3J9fqjKBXxzymgPQ+Y1OlR
 xd+psLmfRf5r/cge45UgILhxE5LFckVIVg/uYkeI5zfRq9TqYes1Ys+7nGpV7IdB
 zWXseulscE/KcEbDHlBexN9/FujONZk6DU6m17TzJbkiptn+7CA0AahbWsK9t05g
 jXCppDPvGYvYGYQ4Y0G8Qnp3jELDlmPhwYWGLw7gruGTHSfbMQxhFokembk/HDcx
 tSetmTBzGt384h7dVJD6HF89VuwgqECBIL8hl0cajFkjkzgdIieDuEGWM1yov4+R
 7Tv05aO/5xYUy5vTk5qkMfywH+TQOwVjr3p3KZgGdj8ddYu7Sk4rRwKK/4cN1M7W
 /RrRzeSOJ2RkTedzu1/sd0h49r2o7tUtgC0rKosDBkibCk135yNa3pe7FKHyR8NW
 a/B57u6+wFvf374TUVMavcSeRvIa4cQ3YuMPcM8ykrEUJWB+QVEXPNiTNG5rux4Z
 4+VX9n0/LhsEu+dGMrdWkpEUSCXi4p6AQHKpTDocWSfEiGNU77b1vF7va06T34fN
 nbp6O0dXFnTgX6IJ8jEQzc8bELElFNw0gfgH6vHpgh6dkFEyL/ew0mJqQJ17bJLF
 HUxdt4/OgNVj5htfeKDI
 =58wA
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-4.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
 - Partial revert of "powerpc: Individual System V IPC system calls"
 - pr_warn_once on unsupported OPAL_MSG type from Stewart
 - Fix deadlock in opal-irqchip introduced by "Fix double endian
   conversion" from Alistair

* tag 'powerpc-4.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/opal-irqchip: Fix deadlock introduced by "Fix double endian conversion"
  powerpc/powernv: pr_warn_once on unsupported OPAL_MSG type
  Partial revert of "powerpc: Individual System V IPC system calls"
2015-12-19 16:40:48 -08:00
Dave Airlie
1957d62c29 Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
just one regression fix.

* 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/exynos: atomic check only enabled crtc states
2015-12-20 08:51:34 +10:00
Linus Torvalds
3c73a2dda9 spi: Fixes for v4.4
A couple of reference counting bugs here, one in spidev and one with
 holding an extra reference in the core that we never freed if we removed
 a device, plus a driver specific fix.  Both of the refcounting bugs are
 very old but they've only been found by observation so hopefully their
 impact has been low.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWdUKcAAoJECTWi3JdVIfQO1EH/3aQKNFu1Z5cEaKiBtQ0aZZD
 1E/w+OPqmKdaFDlXvwXO+W4UY5m0w0Kg5FPg4wMgpjDJQTiELtLJ3c4BiKp1Du8p
 8RHnpqrYtggCZOK2r6iJNonIdIDDIDZMxxu1KHaKl+Wsqh9/1xUsQg7X9xi5Iaiv
 fVd+QlhmCfC42lU92urBboPmON31XxaITTM8qNhGvQO77L4FdZHiVMP/bmyephV7
 Mr4G7MFZHDZljGqEUhAlamhEiBxmCtQAm0eDhWmbYwN6S3U8L5VSqrkBDbNR08C+
 4qnek2PS2/HlkQwMTpgGZpLrLyk04oWgsFMVZQ2275vR9qZlQTgnlEu50roBBD0=
 =DMO9
 -----END PGP SIGNATURE-----

Merge tag 'spi-fix-v4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A couple of reference counting bugs here, one in spidev and one with
  holding an extra reference in the core that we never freed if we
  removed a device, plus a driver specific fix.  Both of the refcounting
  bugs are very old but they've only been found by observation so
  hopefully their impact has been low"

* tag 'spi-fix-v4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: fix parent-device reference leak
  spi: spidev: Hold spi_lock over all defererences of spi in release()
  spi-fsl-dspi: Fix CTAR Register access
2015-12-19 10:10:43 -08:00
Linus Torvalds
d525c13e9e GPIO fixes for the v4.4 series:
- Revert the error number propagation from the .get() vtable
   entry temporarily, until we make the proper fixes to all drivers.
 - Fix the clamping behaviour in the generic GPIO driver.
 - Driver fix for the ath79 driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWdUHfAAoJEEEQszewGV1zN3IP/1t/w6sOIugibcyLTq5EpL1X
 0fndqaqoRunZdFpeauTujq4hXXhRDtZdqzcSNWMg5Xelq0ROHIRLeEcX1GEQlROM
 t9IfNmsxbso0N02ii4NC5F+jaKitnqeV+ZSzGekQjvTxvF3zJ0EaL/I0dNoImXEl
 K6gX36R31DEoxSabRXJrwfUfJFEfDjtriP4m8GTxt/Nd51QcE1WRpDusXK8smuga
 UaiZsnb0VzuM4QzZ1BvSFafBk6UpYU0245H1pYlPPcQRIkabZTuBQsEWrcLHAtDX
 AjuSqBy/PNYXGEzOVVnv2LETYAhC9KR+t2xXpT9QOXIiAD1XSk1n+UV0doJY22ZW
 x02ZTZiurllby/uuTOH7s3ZZ/NNmwoZK16d4F65qrU74fRvuc/9NeODKiizHXn3a
 +Z9s1dmRedHe8Q2eN/GLUCOHWZBHGj8kJVEgh1Oi1kaFVnP3GXBAeEEEnmZyrRJR
 BRKCQa8LWpXusJPhMsIrPK1M4FyAMFG1EFdq10cvag7UOamIpbK6q3/CIsSD8e1N
 FYcBGAOBMhdtyjAd3DXJXUsDqQ8aRL/LZ8hH1epsATiIvrkzHC10/erxSzA2cWtB
 URe+oatMGXgS8fQCaqyXZiA7gzxUNePXV3QBPvwWEo/OysnO49280owndACYnCMT
 de1R0SvltXC9GzXYVT5t
 =bPar
 -----END PGP SIGNATURE-----

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

Pull GPIO fixes from Linus Walleij:
 "Some GPIO fixes for the v4.4 series.  Most prominent: I revert the
  error propagation from the .get() function until we can fix up all the
  drivers properly for v4.5.

   - Revert the error number propagation from the .get() vtable entry
     temporarily, until we make the proper fixes to all drivers.
   - Fix the clamping behaviour in the generic GPIO driver.
   - Driver fix for the ath79 driver"

* tag 'gpio-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: revert get() to non-errorprogating behaviour
  gpio: generic: clamp values from bgpio_get_set()
  gpio: ath79: Fix the logic to clear offset bit of AR71XX_GPIO_REG_OE register
2015-12-19 10:05:00 -08:00
Linus Torvalds
38beb96e7e Pin control fixes:
- Driver fixes for Freescale i.MX7D, Intel, Broadcom 2835
 - One MAINTAINERS entry
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWdUB5AAoJEEEQszewGV1zSQkQALd13tqitrhJod9wP1auVwqc
 XnyYnIlJNhXbRSIN+rpnLOjQq7eDuU3tS4nxvAEsxHTnejigxGUy59I7RMG32iDj
 TDxJfplmVAJ4UjloeuRpCwneoHPCTMNUVWleD6OOIn0md857OrNjfeMIPtqYbxTO
 ZMDVGwrFjEzzszbaH+Tvo9wUKl+vyiJG8Va2H2CNkwXTu/5jOZpfLKjOT2mlLlyn
 6fjjCOKkwa9ICI8DUq55VNSgJ7y/jpi8HykErwsgdmNXGnA0xEl9tG41soXwqGrz
 jNf6ls/Eqn2WHXkm4zL29ot1lF89d4HsPefpWJH/j8Jt/r64NkjghgLtAAFS2DtC
 kfUuLTPrmAjz7ZR31X/bEsQyngjz37HOv9Lfj0RElb28Bh3e1abBNKtzDOEKmAo+
 271KxZO5Fnqxc05yKsJDK0DOPUbjZhRne+f6Z79eaeEHo65PMz8vi8RcptVurRbr
 84FMhwCxxf1Y8jolYVTOPbGIFeS+oJL1tLb4ApSUPOojHIxl//R0HPEiuHC5kl5F
 ciH3XJeJcpzE8bNk+4if2H+6mAwVyEwKOy8c+AHzc6Y/8jtbNPga32amhZ/6K86C
 dgTWVf4StQNLLPh+INmqAqXlpSNsZjlmsG2+G85e5d5b/tX4EwFakHvbNjs6S+Ux
 48gZGTHDmdbhO4AzMcqt
 =AcUv
 -----END PGP SIGNATURE-----

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

Pull pin control fixes from Linus Walleij:
 - Driver fixes for Freescale i.MX7D, Intel, Broadcom 2835
 - One MAINTAINERS entry

* tag 'pinctrl-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  MAINTAINERS: pinctrl: Add maintainers for pinctrl-single
  pinctrl: bcm2835: Fix initial value for direction_output
  pinctrl: intel: fix offset calculation issue of register PAD_OWN
  pinctrl: intel: fix bug of register offset calculation
  pinctrl: freescale: add ZERO_OFFSET_VALID flag for vf610 pinctrl
2015-12-19 10:01:03 -08:00
Alexey Khoroshilov
45af55006c natsemi: add checks for dma mapping errors
refill_rx() and start_tx() do not check if mapping dma memory succeed.
The patch adds the checks and failure handling.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-19 12:58:46 -05:00
Linus Torvalds
d7d3d84194 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
 "A set of 'usual' driver bugfixes for the I2C subsystem"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: rcar: disable runtime PM correctly in slave mode
  i2c: designware: Keep pm_runtime_enable/_disable calls in sync
  i2c: designware: fix IO timeout issue for AMD controller
  i2c: imx: init bus recovery info before adding i2c adapter
  i2c: do not use 0x in front of %pa
  i2c: davinci: Increase module clock frequency
  i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs
  i2c: rk3x: populate correct variable for sda_falling_time
2015-12-19 09:52:44 -08:00
Linus Torvalds
632f8577d6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov:
 "Just a few assorted driver fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: elants_i2c - fix wake-on-touch
  Input: elan_i2c - set input device's vendor and product IDs
  Input: sun4i-lradc-keys - fix typo in binding documentation
  Input: atmel_mxt_ts - add maxtouch to I2C table for module autoload
  Input: arizona-haptic - fix disabling of haptics device
  Input: aiptek - fix crash on detecting device without endpoints
  Input: atmel_mxt_ts - add generic platform data for Chromebooks
  Input: parkbd - clear unused function pointers
  Input: walkera0701 - clear unused function pointers
  Input: turbografx - clear unused function pointers
  Input: gamecon - clear unused function pointers
  Input: db9 - clear unused function pointers
2015-12-19 09:51:11 -08:00
Andrzej Hajda
c4e074074c drm/exynos: atomic check only enabled crtc states
Since atomic check is called also for disabled crtcs it should skip
mode checking as it can be uninitialized. The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-12-20 01:39:10 +09:00
Wolfram Sang
b4cd08aa1f i2c: rcar: disable runtime PM correctly in slave mode
When we also are I2C slave, we need to disable runtime PM because the
address detection mechanism needs to be active all the time. However, we
can reenable runtime PM once the slave instance was unregistered. So,
use pm_runtime_get_sync/put to achieve this, since it has proper
refcounting. pm_runtime_allow/forbid is like a global knob controllable
from userspace which is unsuitable here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
2015-12-19 12:00:37 +01:00
Linus Torvalds
1eab0e4245 Power management fixes for v4.4-rc6
- Fix a potential regression in the generic power domains
    framework introduced during the 4.3 development cycle that
    may lead to spurious failures of system suspend in certain
    situations (Ulf Hansson).
 
  - Fix a problem in the power capping RAPL (Running Average
    Power Limits) driver that causes it to initialize successfully
    on some systems where it is not supposed to do that which is
    due to an incorrect check in an initialization routine (Prarit
    Bhargava).
 
  - Fix a build problem in the cpufreq Tegra driver that depends
    on the regulator framework, but that dependency is not reflected
    in Kconfig (Arnd Bergmann).
 
  - Fix a recent mistake in the intel_pstate driver where a numeric
    constant is used directly instead of a symbol defined specifically
    for the case in question (Prarit Bhargava).
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJWdNhOAAoJEILEb/54YlRxFBUP/0KwbDo7BLdIjUjyi7y3IG39
 oxcb4volIE69Z7e332Mm6y+hG/CXcfOwTde16+WIYOZfmmHfP1c6bamOoJOwcFI8
 RAU9UmMtsXJaEjtiYx6+J97hLh3pmORZdXPnJqLPICIq0/kG356nqoPDEoTDaXGp
 JRbt4h6mcTFX/rErI1hpk4/QXQMOSKSQUbz4bzTfozgn4y1j0DJhr+TBOoCZJdjE
 r9h6Uk4y1E4f9kHy/25wgKlEB3LPqBm5IcFF1lxzndYIyGQJV829FYo+CuVoLMpj
 tlM1yFhdqSZ9ejCPkAac75i92trWaxADuO9WT/RNhSGEyvpzh43IvGZKbJzKoXIf
 svHkMwCCOcI4x6f6ZXpINSAmk8Vl+QzlBy35f8U9F5JX1ZPN21MsQRX1+QfzKFO/
 TnsGW/GXPIH0cooucBqMS+NieN61R3AKYWsc4Tka7aXWGpdzvr/hvwaEoItxtTti
 WXNn21PxOrQxcSjb46Mwikeniyhw2sLveZJRW2jCgwkYSLOOB3+gz+yu+q2yYlXh
 rzr+ObihVMq0DUte2JfFSUYL2hJDIkwTIa/Rqmq2PJShDBDUmw38RIXZ2EcnxdiA
 g32cboGtS5QvsSQzM2tr9fbioxl7n0zva0p64fSUq97fuX0em7y4kMR4m3y7WOE4
 Nlpb0/dyECRpCvFBuuin
 =da89
 -----END PGP SIGNATURE-----

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

Pull power management fixes from Rafael Wysocki:
 "These fix a potential regression introduced during the 4.3 cycle
  (generic power domains framework), a nasty bug that has been present
  forever (power capping RAPL driver), a build issue (Tegra cpufreq
  driver) and a minor ugliness introduced recently (intel_pstate).

  Specifics:

   - Fix a potential regression in the generic power domains framework
     introduced during the 4.3 development cycle that may lead to
     spurious failures of system suspend in certain situations (Ulf
     Hansson).

   - Fix a problem in the power capping RAPL (Running Average Power
     Limits) driver that causes it to initialize successfully on some
     systems where it is not supposed to do that which is due to an
     incorrect check in an initialization routine (Prarit Bhargava).

   - Fix a build problem in the cpufreq Tegra driver that depends on the
     regulator framework, but that dependency is not reflected in
     Kconfig (Arnd Bergmann).

   - Fix a recent mistake in the intel_pstate driver where a numeric
     constant is used directly instead of a symbol defined specifically
     for the case in question (Prarit Bhargava)"

* tag 'pm+acpi-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  powercap / RAPL: fix BIOS lock check
  cpufreq: intel_pstate: Minor cleanup for FRAC_BITS
  cpufreq: tegra: add regulator dependency for T124
  PM / Domains: Allow runtime PM callbacks to be re-used during system PM
2015-12-18 21:01:35 -08:00
Herbert Xu
179ccc0a73 rhashtable: Kill harmless RCU warning in rhashtable_walk_init
The commit c6ff526829 ("rhashtable:
Fix walker list corruption") causes a suspicious RCU usage warning
because we no longer hold ht->mutex when we dereference ht->tbl.

However, this is a false positive because we now hold ht->lock
which also guarantees that ht->tbl won't disppear from under us.

This patch kills the warning by using rcu_dereference_protected.

Reported-by: kernel test robot <ying.huang@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-18 23:44:18 -05:00
Linus Torvalds
4fee35a3c9 SCSI fixes on 20151218
Three fixes this time, two in SES picked up by KASAN for various types of
 buffer overrun.  The first is a USB array which returns page 8 whatever is
 asked for and causes us to overrun with incorrect data format assumptions and
 the second is an invalid iteration of page 10 (the additional information
 page).  The final one is a reversion of a NULL deref fix which caused
 suspend/resume not to be called in pairs leading to incorrect device operation
 (Jens has queued a more proper fix for the problem in block).
 
 Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQEcBAABAgAGBQJWdLxTAAoJEDeqqVYsXL0MwOYH+wYb27NxfyA7+q7z/dFz+LhQ
 B9RlUfnEw57vVz7KEwleqJ9uA2jprCQndMqRoelmWtxeu5CVUBbq/1ONDWvPX2ha
 Prr3wVp+SbqbtzmvGQrQ8If7o4iS47fXtwUe5RRDBdfKMUfXs7LeVBgQrpZsqlkE
 va6LNKVqzYW4sneC+CfWcwwyedLGeaphNBYygKtCm7SfEkbnfH5+zhWH9JWwtYXf
 r8VCCUnmF69ocx4a7MZLnSAJuXfzaJl45c0nhRiHTiokW7KYuylJm0Zd1PYkhwhV
 rQr53otJsdPTyZUjmeCdS6PBlGp/HVdYIOyKt5b4Ti2S71ij9R52YPY6BdtIWeQ=
 =6New
 -----END PGP SIGNATURE-----

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

Pull SCSI fixes from James Bottomley:
 "Three fixes this time, two in SES picked up by KASAN for various types
  of buffer overrun.  The first is a USB array which returns page 8
  whatever is asked for and causes us to overrun with incorrect data
  format assumptions and the second is an invalid iteration of page 10
  (the additional information page).

  The final fix is a reversion of a NULL deref fix which caused
  suspend/resume not to be called in pairs leading to incorrect device
  operation (Jens has queued a more proper fix for the problem in
  block)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  ses: fix additional element traversal bug
  Revert "SCSI: Fix NULL pointer dereference in runtime PM"
  ses: Fix problems with simple enclosures
2015-12-18 20:35:35 -08:00
Dave Airlie
6545f31897 Merge branch 'linux-4.4' of git://github.com/skeggsb/linux into drm-fixes
single nouveau fix.

* 'linux-4.4' of git://github.com/skeggsb/linux:
  drm/nouveau/bios/fan: hardcode the fan mode to linear
2015-12-19 13:25:42 +10:00
Dave Airlie
8e73a108ac Merge branch 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Just one important fix for amdgpu to avoid possible memory corruption.

* 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux:
  drm/amdgpu: fix user fence handling
2015-12-19 12:42:28 +10:00
David Howells
b4a1b4f504 KEYS: Fix race between read and revoke
This fixes CVE-2015-7550.

There's a race between keyctl_read() and keyctl_revoke().  If the revoke
happens between keyctl_read() checking the validity of a key and the key's
semaphore being taken, then the key type read method will see a revoked key.

This causes a problem for the user-defined key type because it assumes in
its read method that there will always be a payload in a non-revoked key
and doesn't check for a NULL pointer.

Fix this by making keyctl_read() check the validity of a key after taking
semaphore instead of before.

I think the bug was introduced with the original keyrings code.

This was discovered by a multithreaded test program generated by syzkaller
(http://github.com/google/syzkaller).  Here's a cleaned up version:

	#include <sys/types.h>
	#include <keyutils.h>
	#include <pthread.h>
	void *thr0(void *arg)
	{
		key_serial_t key = (unsigned long)arg;
		keyctl_revoke(key);
		return 0;
	}
	void *thr1(void *arg)
	{
		key_serial_t key = (unsigned long)arg;
		char buffer[16];
		keyctl_read(key, buffer, 16);
		return 0;
	}
	int main()
	{
		key_serial_t key = add_key("user", "%", "foo", 3, KEY_SPEC_USER_KEYRING);
		pthread_t th[5];
		pthread_create(&th[0], 0, thr0, (void *)(unsigned long)key);
		pthread_create(&th[1], 0, thr1, (void *)(unsigned long)key);
		pthread_create(&th[2], 0, thr0, (void *)(unsigned long)key);
		pthread_create(&th[3], 0, thr1, (void *)(unsigned long)key);
		pthread_join(th[0], 0);
		pthread_join(th[1], 0);
		pthread_join(th[2], 0);
		pthread_join(th[3], 0);
		return 0;
	}

Build as:

	cc -o keyctl-race keyctl-race.c -lkeyutils -lpthread

Run as:

	while keyctl-race; do :; done

as it may need several iterations to crash the kernel.  The crash can be
summarised as:

	BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
	IP: [<ffffffff81279b08>] user_read+0x56/0xa3
	...
	Call Trace:
	 [<ffffffff81276aa9>] keyctl_read_key+0xb6/0xd7
	 [<ffffffff81277815>] SyS_keyctl+0x83/0xe0
	 [<ffffffff815dbb97>] entry_SYSCALL_64_fastpath+0x12/0x6f

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
2015-12-19 12:34:43 +11:00
Tony Lindgren
0b4d6972d7 ARM: dts: Fix UART wakeirq for omap4 duovero parlor
Looks like we're missing the wakeirq for the console uart for
duovero parlor. Let's add that as without it console acess just
hangs with PM enabled.

Cc: Arun Bharadwaj <arun@gumstix.com>
Cc: Ash Charles <ash@gumstix.com>
Cc: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-12-18 16:43:22 -08:00
James Chen
478e5ed1c3 Input: elants_i2c - fix wake-on-touch
When sending "SLEEP" command to the controller it ceases scanning
completely and is unable to wake the system up from sleep, so if it is
configured as a wakeup source we should simply configure interrupt for
wakeup and rely on idle logic within the controller to reduce power
consumption while it is not used.

Signed-off-by: James Chen <james.chen@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-18 16:21:43 -08:00
Linus Torvalds
76b8ebdc4c media fixes for v4.4-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWdEIhAAoJEAhfPr2O5OEV+AMP/16Z0z2CTNf+75XmyZpJQyg6
 z+K2gfziU/LdRfxN40cDtpBkQf6eSH4MHFhPq0bHUg7yQJinRxJZBJsYZlh6w1K0
 714oj5A6QIxdWBUOKMvdHv8j033XB7BYCAOL8eUCebbQ3fvGXPp5bCZZHV/Cxc0c
 veEhVIMD1EMaJHIWSIAZvQ0ixY5d3c5YrWhJItlsHkwvl8R6vLlSnVTUYGeORN5h
 P40fS0X2v2w7rhOlGE8pN/3GAYfY3fRy94SBaG6xnOgdvKV/mbw424xkpB+vJ3IQ
 qHKrVuZVT0dysNXMpOkdfjy1SpJ3iF/scmqSr+OeB/hENrzMs5bgOynmc/ldGkR4
 FD3HFZ/3FkpIjtQ0ec9kexFdGF86YzEf6ujr3aX2l8/l75I8APHjt7P80lv6sabr
 jiPSil0d4g1zd/3UGAeUr+HbiWIP+tDSaJkGUFo5wZz8Q0oHXbTBou4BI11cO2wn
 CFnPG8PWHE/YVLhkUAz/gkkUnRAqLCi6fWOTwz7oSdxr8Hp85TtG9v47WlZrVM66
 StTn8Y7U6FcBC5EU2RL4WWMavOfJOWi7GLp6c+OKcYpL0XI6BG0ViM48pgqgo4I/
 Z3p/uN8frZ/VFy628DZUpHs0kZNkvuwPfW9GSrkX1EGGIn/2CpFzJLCt4r5Bi3NY
 5GyJisSX1SSaj/25uPtk
 =81gm
 -----END PGP SIGNATURE-----

Merge tag 'media/v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab.

* tag 'media/v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] airspy: increase USB control message buffer size
  [media] hackrf: move RF gain ctrl enable behind module parameter
  [media] hackrf: fix possible null ptr on debug printing
  [media] Revert "[media] ivtv: avoid going past input/audio array"
2015-12-18 15:41:35 -08:00
Linus Torvalds
fc315e3e5c Merge branch 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
 "A couple of small fixes"

* 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: check prepare_uptodate_page() error code earlier
  Btrfs: check for empty bitmap list in setup_cluster_bitmaps
  btrfs: fix misleading warning when space cache failed to load
  Btrfs: fix transaction handle leak in balance
  Btrfs: fix unprotected list move from unused_bgs to deleted_bgs list
2015-12-18 15:35:08 -08:00
Linus Torvalds
8b4414f51d Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
 "Three patches"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  include/linux/mmdebug.h: should include linux/bug.h
  mm/zswap: change incorrect strncmp use to strcmp
  proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter
2015-12-18 14:25:57 -08:00
James Morse
1d5cda4076 include/linux/mmdebug.h: should include linux/bug.h
mmdebug.h uses BUILD_BUG_ON_INVALID(), assuming someone else included
linux/bug.h.  Include it ourselves.

This saves build-failures such as:

  arch/arm64/include/asm/pgtable.h: In function 'set_pte_at':
  arch/arm64/include/asm/pgtable.h:281:3: error: implicit declaration of function 'BUILD_BUG_ON_INVALID' [-Werror=implicit-function-declaration]
   VM_WARN_ONCE(!pte_young(pte),

Fixes: 02602a18c3 ("bug: completely remove code generated by disabled VM_BUG_ON()")
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-12-18 14:25:40 -08:00
Dan Streetman
8bc8b228d0 mm/zswap: change incorrect strncmp use to strcmp
Change the use of strncmp in zswap_pool_find_get() to strcmp.

The use of strncmp is no longer correct, now that zswap_zpool_type is
not an array; sizeof() will return the size of a pointer, which isn't
the right length to compare.  We don't need to use strncmp anyway,
because the existing params and the passed in params are all guaranteed
to be null terminated, so strcmp should be used.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Reported-by: Weijie Yang <weijie.yang@samsung.com>
Cc: Seth Jennings <sjennings@variantweb.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-12-18 14:25:40 -08:00
Colin Ian King
41a0c249cb proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter
Writing to /proc/$pid/coredump_filter always returns -ESRCH because commit
774636e19e ("proc: convert to kstrto*()/kstrto*_from_user()") removed
the setting of ret after the get_proc_task call and incorrectly left it as
-ESRCH.  Instead, return 0 when successful.

Example breakage:

  echo 0 > /proc/self/coredump_filter
  bash: echo: write error: No such process

Fixes: 774636e19e ("proc: convert to kstrto*()/kstrto*_from_user()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: <stable@vger.kernel.org> [4.3+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-12-18 14:25:40 -08:00
Simon Horman
e905eabc90 openvswitch: correct encoding of set tunnel action attributes
In a set action tunnel attributes should be encoded in a
nested action.

I noticed this because ovs-dpctl was reporting an error
when dumping flows due to the incorrect encoding of tunnel attributes
in a set action.

Fixes: fc4099f172 ("openvswitch: Fix egress tunnel info.")
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-18 16:35:35 -05:00
Yuval Mintz
ea2465af3b bnx2x: Prevent FW assertion when using Vxlan
FW has a rare corner case in which a fragmented packet using lots
of frags would not be linearized, causing the FW to assert while trying
to transmit the packet.

To prevent this, we need to make sure the window of fragements containing
MSS worth of data contains 1 BD less than for regular packets due to
the additional parsing BD.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-18 16:34:32 -05:00
Pravin B Shelar
6d3c348a63 ipip: ioctl: Remove superfluous IP-TTL handling.
IP-TTL case is already handled in ip_tunnel_ioctl() API.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-18 16:07:59 -05:00
David Miller
d79f16c046 mkiss: Fix use after free in mkiss_close().
Need to do the unregister_device() after all references to the driver
private have been done.

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-18 16:03:03 -05:00
David Miller
acf673a318 6pack: Fix use after free in sixpack_close().
Need to do the unregister_device() after all references to the driver
private have been done.

Also we need to use del_timer_sync() for the timers so that we don't
have any asynchronous references after the unregister.

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-18 15:57:33 -05:00
Linus Torvalds
65d70e79cd hwmon fixes for v4.4-rc6
- Select CONFIG_BITREVERSE for sht15 driver to avoid build failure
   if it is not configured.
 - Force wait for conversion time for the first valid data in tmp102
   driver to avoid reporting erroneous data to the thermal subsystem.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWdGPZAAoJEMsfJm/On5mB8cMP/3G7+GElyMhUtNfXszliz66n
 1pVi+Y/+YumGzLxzi1QMyw+4edQGGDLUZarciuQ4ADtpJ0FCFPwLrv3SyVMW4Cxf
 /4OpKQo/2677xfh8Y2ZrTbVBgN3y5/6LNCdy4qNKOw4GVYjF7+7oL4owgSzyUmG/
 vHZs9u0TQo78opTfdC1lUr+DjzkfFNvaEtRHywSQjdzylMjpgeTSU/Cr5pzcWeoh
 wL8/mpS8KmIwiCYz12dohlqF8i7a7TV5HE5QKbDQqFXEoWSt5lUiaSkUrqVZUXlW
 heXxM9CG01bicHkZJ4AOjMoqtEcZyfiU1MlumvTUAtVtzWkyHOWHQgGjIJFE6o6f
 caXYjGUpTEhe5TSmMQW3Wlp6AEKegse5VLTR2Y4UzHkR28GoyR543MGtkR6w1Ux8
 sea9JWwyYdvIcwmol9ivdG7V/ymCpJhT3yZxBIJSCrKbCfQuBszfnSmAUqMbFRBj
 YD2FBVMAyt2rVjzPwUA9CKK/ERmgUZXftdiPCbcnHHPeT4tzx+KKzTE2cOpHYl3t
 IeID+95pXoAukPF6F1kq6y2zR2Uzdqn5f5VeekGn9Bo+aZmL3zwAZFUgF4u9Tqzy
 cO7Cn1b5fb6W5pdFEImK57irZSSSb6GZLlZXsHq9RRezdFQvJdyX0bPsX1Z7Fn+b
 zuz5e1GhF+l5LpUUIKz8
 =h83R
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus-v4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

 - Select CONFIG_BITREVERSE for sht15 driver to avoid build failure if
   it is not configured.

 - Force wait for conversion time for the first valid data in tmp102
   driver to avoid reporting erroneous data to the thermal subsystem.

* tag 'hwmon-for-linus-v4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (sht15) Select CONFIG_BITREVERSE
  hwmon: (tmp102) Force wait for conversion time for the first valid data
2015-12-18 12:51:52 -08:00
Venkat Duvvuru
6e3cd5fa65 be2net: Avoid accessing eq object in be_msix_register routine, when i < 0.
When the first request_irq fails in be_msix_register, i value
would be zero. The current code decrements the i value and
accesses the eq object without validating the decremented
"i" value. This can cause an "invalid memory address access"
violation.

This patch fixes the problem by accessing the eq object after
validating the "i" value.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-18 15:50:52 -05:00
Linus Torvalds
ccdd96be43 IOMMU Fixes for Linux v4.4-rc5
* Two similar fixes for the Intel and AMD IOMMU drivers to add
 	  proper access checks before calling handle_mm_fault.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJWdCp7AAoJECvwRC2XARrjjAIP/0ihW2zF4R622RgY1C1Cm62j
 0eb/R4UqjI3PG0KsURgDHcIm9JP5Z//dgKTOtNX9KOkHlXLcO9MMSD5chVBd4HKG
 +Mgx7RM+Mr7f6ElRUa6s1GY1tcJlGf43fW5cMQ44BJIqVXlE47go4U09D86DVgXy
 KgyBxQldeOrkXZvAG82WLjGgkdGALQjbDlI8ktmfYWXAvIRWNGJqWY16BwAYOWfb
 9d3+1JPekSSBWHC6H+qbkDb8ueO69/Ux0HL5z2Q0zchqGjBb1gnfwLcz865KZpOB
 qUwsKFSXTl+jPCrAaLYJnVqAnH4qqKaF6WKAJSIHObTSVqXKHpFHrQrlGVzOvYNn
 s3216KIMsxG2nnvSgXCOFGqM/810MH2MSo8YcF5A3celrka3j2Gj08mxInrZXN7D
 3p51HSwq8ePo4i5jppT5ldOBSjNV9N3wKWcjDb4OL+OfkJc/u2VbSHNQtpvTclsV
 V6VSfWLDC8BCmUveMH2TrawQWkKOz0LqgqfQPX+VvSCIM7tgkrgVsTJrijPtGOs1
 zid/A/cfqMdBezSVALrZfB4OVBaM2UL2LJmmLJgApYV+N55Oxmx+nxnMr0aT5KlY
 crjcnVaypkq3rG1Wjpt+nTTwtllB0yXNEywQcu2edeswmaQCqsEgQRsDqi6S2/+S
 c8l9JKoTrB4+vToYjXyW
 =qrAB
 -----END PGP SIGNATURE-----

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

Pull IOMMU fixes from Joerg Roedel:
 "Two similar fixes for the Intel and AMD IOMMU drivers to add proper
  access checks before calling handle_mm_fault"

* tag 'iommu-fixes-v4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/vt-d: Do access checks before calling handle_mm_fault()
  iommu/amd: Do proper access checking before calling handle_mm_fault()
2015-12-18 12:38:35 -08:00
Linus Torvalds
3273cba195 xen: bug fixes for 4.4-rc5
- XSA-155 security fixes to backend drivers.
 - XSA-157 security fixes to pciback.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWdDrXAAoJEFxbo/MsZsTR3N0H/0Lvz6MWBARCje7livbz7nqE
 PS0Bea+2yAfNhCDDiDlpV0lor8qlyfWDF6lGhLjItldAzahag3ZDKDf1Z/lcQvhf
 3MwFOcOVZE8lLtvLT6LGnPuehi1Mfdi1Qk1/zQhPhsq6+FLPLT2y+whmBihp8mMh
 C12f7KRg5r3U7eZXNB6MEtGA0RFrOp0lBdvsiZx3qyVLpezj9mIe0NueQqwY3QCS
 xQ0fILp/x2EnZNZuzgghFTPRxMAx5ReOezgn9Rzvq4aThD+irz1y6ghkYN4rG2s2
 tyYOTqBnjJEJEQ+wmYMhnfCwVvDffztG+uI9hqN31QFJiNB0xsjSWFCkDAWchiU=
 =Argz
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-4.4-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen bug fixes from David Vrabel:
 - XSA-155 security fixes to backend drivers.
 - XSA-157 security fixes to pciback.

* tag 'for-linus-4.4-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen-pciback: fix up cleanup path when alloc fails
  xen/pciback: Don't allow MSI-X ops if PCI_COMMAND_MEMORY is not set.
  xen/pciback: For XEN_PCI_OP_disable_msi[|x] only disable if device has MSI(X) enabled.
  xen/pciback: Do not install an IRQ handler for MSI interrupts.
  xen/pciback: Return error on XEN_PCI_OP_enable_msix when device has MSI or MSI-X enabled
  xen/pciback: Return error on XEN_PCI_OP_enable_msi when device has MSI or MSI-X enabled
  xen/pciback: Save xen_pci_op commands before processing it
  xen-scsiback: safely copy requests
  xen-blkback: read from indirect descriptors only once
  xen-blkback: only read request operation from shared ring once
  xen-netback: use RING_COPY_REQUEST() throughout
  xen-netback: don't use last request to determine minimum Tx credit
  xen: Add RING_COPY_REQUEST()
  xen/x86/pvh: Use HVM's flush_tlb_others op
  xen: Resume PMU from non-atomic context
  xen/events/fifo: Consume unprocessed events when a CPU dies
2015-12-18 12:24:52 -08:00
Linus Torvalds
83ad283f6b ARC Fixes
- perf interrupts on SMP: Not enabled (at boot) and disabled (at runtime)
  - stack unwinder regression (for modules, ignoring dwarf3)
  - nsim hosed for non default kernel link base builds
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWc/ceAAoJEGnX8d3iisJeenQP/jdQPxtDU5CYURuqpS1Xb7hN
 vEBCdj/2g8aNxF5/KSsUzSnnH5DJkm4I6fqo+/dqr9J32NrsU9skvO20BMSckMYV
 cLhrmsVLqo9DLGj23Gjl1427o0cLIloQwrE0hfgYGz2ceMl8CwTjt89+ZHPNZ2WB
 2m0q4pFtwHY5ZZBSh+kmN0OCZIVLB3Jydp0+V18DQtRFop22tkypYtiQ1DP3NysU
 /1w5EJopjGSqRbtQSzahFtXEwAzhM2UfrIYSZs0iXSGDTkggH4ouJs817g0kHqqL
 MOSvwlEk0Yz2jTr+PwHX1PSvIRfrJHi2x9U2nfrB9Q2flXV/XU3ZX1/k3lDV1mh2
 hQjwXsCDyQEhAvVqVtLZqxHbrFumlOW1rd8tfl49MYCqRJy/TOYXyxYzk1M0zUMy
 pgUHjEBrK0hnpnycxOLQV6XrZaYEDWFH88Ke+vxI4lI5pGwarQLPgCfd2kCX/0jG
 miACD2EK97fdvr7b9UATJ++UUqhwOwYZ+OCw4vJhiDwBAOVgPtLKnrTETPqqqPBt
 72uwGxCjjHI6a9foDDcf41BbgktqInUvyf/bHOJOnEiXT+U1SN/4+1E5sbgL+W6q
 5kDGhaWxc81EEmrwI4kFtPa3JdwWiJc2R1JU5Gkng/DHrVUFEHsEpcYqVgciqNqm
 c+84ML+VzkxIKnVgQvqM
 =+aYb
 -----END PGP SIGNATURE-----

Merge tag 'arc-fixes-for-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC architecture fixes from Vineet Gupta:
 "Fixes for:

 - perf interrupts on SMP: Not enabled (at boot) and disabled (at runtime)
 - stack unwinder regression (for modules, ignoring dwarf3)
 - nsim hosed for non default kernel link base builds"

* tag 'arc-fixes-for-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: smp: Rename platform hook @init_cpu_smp -> @init_per_cpu
  ARC: rename smp operation init_irq_cpu() to init_per_cpu()
  ARC: dw2 unwind: Ignore CIE version !=1 gracefully instead of bailing
  ARC: dw2 unwind: Reinstante unwinding out of modules
  ARC: [plat-sim] unbork non default CONFIG_LINUX_LINK_BASE
  ARC: intc: Document arc_request_percpu_irq() better
  ARCv2: perf: Ensure perf intr gets enabled on all cores
  ARC: intc: No need to clear IRQ_NOAUTOEN
  ARCv2: intc: Fix random perf irq disabling in SMP setup
  ARC: [axs10x] cap ethernet phy to 100 Mbit/sec
2015-12-18 12:19:01 -08:00
David S. Miller
6be842f7cc Merge branch 'mlx4-time-stamping-fixes'
Or Gerlitz says:

====================
Mellanox mlx4 driver fixes

Two small fixes from Jenny for code flows that deal with time-stamping.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-18 14:48:04 -05:00