15 Apr, 2016

13 commits

  • Pull mm gup cleanup from Ingo Molnar:
    "This removes the ugly get-user-pages API hack, now that all upstream
    code has been migrated to it"

    ("ugly" is putting it mildly. But it worked.. - Linus)

    * 'mm-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    mm/gup: Remove the macro overload API migration helpers from the get_user*() APIs

    Linus Torvalds
     
  • Pull device mapper fixes from Mike Snitzer:

    - fix a 4.6-rc1 bio-based DM 'struct dm_target_io' leak in an error
    path

    - stable@ fix for DM cache metadata's READ_LOCK macros that were
    incorrectly returning error if the block manager was in read-only
    mode; also cleanup multi-statement macros to use do {} while(0)

    * tag 'dm-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros
    dm: fix dm_target_io leak if clone_bio() returns an error

    Linus Torvalds
     
  • …erry.reding/linux-pwm

    Pull pwm fix from Thierry Reding:
    "A single one-line fix to turn the regmap cache from an RB-tree to a
    flat cache to avoid lockdep and abort issues"

    * tag 'pwm/for-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
    pwm: fsl-ftm: Use flat regmap cache

    Linus Torvalds
     
  • Pull sound fixes from Takashi Iwai:
    "We've had a very calm development cycle, so far. Here are the few
    fixes for HD-audio and USB-audio, all of which are small and easy"

    * tag 'sound-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Fix inconsistent monitor_present state until repoll
    ALSA: hda - Fix regression of monitor_present flag in eld proc file
    ALSA: usb-audio: Skip volume controls triggers hangup on Dell USB Dock
    ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T460s
    ALSA: sscape: Use correct format identifier for size_t
    ALSA: usb-audio: Add a quirk for Plantronics BT300
    ALSA: usb-audio: Add a sample rate quirk for Phoenix Audio TMX320
    ALSA: hda - Bind with i915 only when Intel graphics is present

    Linus Torvalds
     
  • Pull mailbox fixes from Jussi Brar:
    "Misc fixes:

    mailbox-test driver:
    - prevent memory leak and another cosmetic change

    mailbox:
    - change the returned error code

    Xgene driver:
    - return -ENOMEM instead of PTR_ERR for failed devm_kzalloc"

    * 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
    mailbox: Stop using ENOSYS for anything other than unimplemented syscalls
    mailbox: mailbox-test: Prevent memory leak
    mailbox: mailbox-test: Use more consistent format for calling copy_from_user()
    mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

    Linus Torvalds
     
  • Pull f2fs/fscrypto fixes from Jaegeuk Kim:
    "In addition to f2fs/fscrypto fixes, I've added one patch which
    prevents RCU mode lookup in d_revalidate, as Al mentioned.

    These patches fix f2fs and fscrypto based on -rc3 bug fixes in ext4
    crypto, which have not yet been fully propagated as follows.

    - use of dget_parent and file_dentry to avoid crashes
    - disallow RCU-mode lookup in d_invalidate
    - disallow -ENOMEM in the core data encryption path"

    * tag 'for-linus-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
    ext4/fscrypto: avoid RCU lookup in d_revalidate
    fscrypto: don't let data integrity writebacks fail with ENOMEM
    f2fs: use dget_parent and file_dentry in f2fs_file_open
    fscrypto: use dget_parent() in fscrypt_d_revalidate()

    Linus Torvalds
     
  • Pull crypto fixes from Herbert Xu:
    "This fixes an NFS regression caused by the skcipher/hash conversion in
    sunrpc. It also fixes a build problem in certain configurations with
    bcm63xx"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    hwrng: bcm63xx - fix device tree compilation
    sunrpc: Fix skcipher/shash conversion

    Linus Torvalds
     
  • Pull keys bugfixes from James Morris:
    "Two bugfixes for Keys related code"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    ASN.1: fix open failure check on headername
    assoc_array: don't call compare_object() on a node

    Linus Torvalds
     
  • The READ_LOCK macro was incorrectly returning -EINVAL if
    dm_bm_is_read_only() was true -- it will always be true once the cache
    metadata transitions to read-only by dm_cache_metadata_set_read_only().

    Wrap READ_LOCK and WRITE_LOCK multi-statement macros in do {} while(0).
    Also, all accesses of the 'cmd' argument passed to these related macros
    are now encapsulated in parenthesis.

    A follow-up patch can be developed to eliminate the use of macros in
    favor of pure C code. Avoiding that now given that this needs to apply
    to stable@.

    Reported-by: Ben Hutchings
    Signed-off-by: Mike Snitzer
    Fixes: d14fcf3dd79 ("dm cache: make sure every metadata function checks fail_io")
    Cc: stable@vger.kernel.org

    Mike Snitzer
     
  • In commit c4004b02f8e5b ("x86: remove the kernel code/data/bss resources
    from /proc/iomem") I was hoping to remove the phyiscal kernel address
    data from /proc/iomem entirely, but that had to be reverted because some
    system programs actually use it.

    This limits all the detailed resource information to properly
    credentialed users instead.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The PCI config access checked the file capabilities correctly, but used
    the itnernal security capability check rather than the helper function
    that is actually meant for that.

    The security_capable() has unusual return values and is not meant to be
    used elsewhere (the only other use is in the capability checking
    functions that we actually intend people to use, and this odd PCI usage
    really stood out when looking around the capability code.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • A lot of seqfile users seem to be using things like %pK that uses the
    credentials of the current process, but that is actually completely
    wrong for filesystem interfaces.

    The unix semantics for permission checking files is to check permissions
    at _open_ time, not at read or write time, and that is not just a small
    detail: passing off stdin/stdout/stderr to a suid application and making
    the actual IO happen in privileged context is a classic exploit
    technique.

    So if we want to be able to look at permissions at read time, we need to
    use the file open credentials, not the current ones. Normal file
    accesses can just use "f_cred" (or any of the helper functions that do
    that, like file_ns_capable()), but the seqfile interfaces do not have
    any such options.

    It turns out that seq_file _does_ save away the user_ns information of
    the file, though. Since user_ns is just part of the full credential
    information, replace that special case with saving off the cred pointer
    instead, and suddenly seq_file has all the permission information it
    needs.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • This reverts commit c4004b02f8e5b9ce357a0bb1641756cc86962664.

    Sadly, my hope that nobody would actually use the special kernel entries
    in /proc/iomem were dashed by kexec. Which reads /proc/iomem explicitly
    to find the kernel base address. Nasty.

    Anyway, that means we can't do the sane and simple thing and just remove
    the entries, and we'll instead have to mask them out based on permissions.

    Reported-by: Zhengyu Zhang
    Reported-by: Dave Young
    Reported-by: Freeman Zhang
    Reported-by: Emrah Demir
    Reported-by: Baoquan He
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

14 Apr, 2016

2 commits

  • Use flat regmap cache to avoid lockdep warning at probe:

    [ 0.697285] WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2755 lockdep_trace_alloc+0x15c/0x160()
    [ 0.697449] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))

    The RB-tree regmap cache needs to allocate new space on first writes.
    However, allocations in an atomic context (e.g. when a spinlock is held)
    are not allowed. The function regmap_write calls map->lock, which
    acquires a spinlock in the fast_io case. Since the pwm-fsl-ftm driver
    uses MMIO, the regmap bus of type regmap_mmio is being used which has
    fast_io set to true.

    The MMIO space of the pwm-fsl-ftm driver is reasonable condense, hence
    using the much faster flat regmap cache is anyway the better choice.

    Signed-off-by: Stefan Agner
    Cc: Mark Brown
    Signed-off-by: Thierry Reding

    Stefan Agner
     
  • Pull arch/sh fixes from Rich Felker:
    "Fixes for two arch/sh build regressions that appeared in 4.6-rc1, one
    introduced by me, and one caused by changes elsewhere"

    * tag 'sh-fixes-4.6-rc1' of git://git.libc.org/linux-sh:
    sh: fix function signature of cpu_coregroup_mask to match pointer type
    sh: fix smp-shx3 build regression from removal of arch localtimer

    Linus Torvalds
     

13 Apr, 2016

16 commits

  • Pull m68knommu/coldfire fix from Greg Ungerer:
    "Only a single change that removes a local arch specific gpio bus sysfs
    device that now clashes with the generic gpio bus sysfs device
    interface"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68k/gpio: remove arch specific sysfs bus device

    Linus Torvalds
     
  • Pull ARM SoC fixes from Olof Johansson:
    "A batch of fixes for -rc4, for various platforms.

    Nothing really substantial and worth pointing out in particular; small
    fixes for various bugs, see shortlog for details"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: sa1100: remove references to the defunct handhelds.org
    bus: uniphier-system-bus: fix condition of overlap check
    ARM: uniphier: drop weird sizeof()
    ARM: dts: am335x-baltos-ir5221: fix cpsw_emac0 link type
    ARM: OMAP: Correct interrupt type for ARM TWD
    ARM: DRA722: Add ID detect for Silicon Rev 2.0
    ARM: dts: am43xx: fix edma memcpy channel allocation
    ARM: dts: AM43x-epos: Fix clk parent for synctimer
    ARM: OMAP2: Fix up interconnect barrier initialization for DRA7
    documentation: Fix pinctrl documentation for Meson8 / Meson8b
    ARM: dts: amlogic: Split pinctrl device for Meson8 / Meson8b
    ARM: mvebu: Correct unit address for linksys
    bus: mvebu-mbus: use %pa to print phys_addr_t
    arm64: dts: vulcan: Update PCI ranges
    ARM: u8500_defconfig: turn on the Synaptics RMI4 driver
    ARM: pxa: fix the number of DMA requestor lines
    ARM: OMAP2+: hwmod: Fix updating of sysconfig register
    ARM: OMAP2+: Use srst_udelay for USB on dm814x

    Linus Torvalds
     
  • Pull KVM fixes from Radim Krčmář:
    "ARM fixes:
    - Wrong indentation in the PMU code from the merge window
    - A long-time bug occuring with running ntpd on the host, candidate
    for stable
    - Properly handle (and warn about) the unsupported configuration of
    running on systems with less than 40 bits of PA space
    - More fixes to the PM and hotplug notifier stuff from the merge
    window

    x86:
    - leak of guest xcr0 (typically shows up as SIGILL)
    - new maintainer (who is sending the pull request too)
    - fix for merge window regression
    - fix for guest CPUID"

    Paolo Bonzini points out:
    "For the record, this tag is signed by me because I prepared the pull
    request. Further pull requests for 4.6 will be signed and sent out by
    Radim directly"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: x86: mask CPUID(0xD,0x1).EAX against host value
    kvm: x86: do not leak guest xcr0 into host interrupt handlers
    KVM: MMU: fix permission_fault()
    KVM: new maintainer on the block
    arm64: KVM: unregister notifiers in hyp mode teardown path
    arm64: KVM: Warn when PARange is less than 40 bits
    KVM: arm/arm64: Handle forward time correction gracefully
    arm64: KVM: Add braces to multi-line if statement in virtual PMU code

    Linus Torvalds
     
  • While the previous commit fixed the missing monitor_present flag
    update, it may be still in an inconsistent state while the driver
    repolls: the flag itself is updated, but the eld_valid flag and the
    contents don't follow until the repoll finishes (and may be repeated
    for a few times).

    The basic problem is that pin_eld->monitor_present is updated in the
    caller side. This should have been updated only in update_eld(). So,
    the proper fix is to avoid accessing pin_eld but only spec->temp_eld.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The commit [bd48128539ab: ALSA: hda - Fix forgotten HDMI
    monitor_present update] covered the missing update of monitor_present
    flag, but this caused a regression for devices without the i915 eld
    notifier. Since the old code supposed that pin_eld->monitor_present
    was updated by the caller side, the hdmi_present_sense_via_verbs()
    doesn't update the temporary eld->monitor_present but only
    pin_eld->monitor_present, which is now overridden in update_eld().

    The fix is to update pin_eld->monitor_present as well before calling
    update_eld().

    Note that this may still leave monitor_present flag in an inconsistent
    state when the driver repolls, but this is at least the old behavior.
    More proper fix will follow in the later patch.

    Fixes: bd48128539ab ('ALSA: hda - Fix forgotten HDMI monitor_present update')
    Signed-off-by: Hyungwon Hwang
    Cc:
    Signed-off-by: Takashi Iwai

    Hyungwon Hwang
     
  • As Al pointed, d_revalidate should return RCU lookup before using d_inode.
    This was originally introduced by:
    commit 34286d666230 ("fs: rcu-walk aware d_revalidate method").

    Reported-by: Al Viro
    Signed-off-by: Jaegeuk Kim
    Cc: Theodore Ts'o
    Cc: stable

    Jaegeuk Kim
     
  • …/dhowells/linux-fs into for-linus

    James Morris
     
  • mvebu fixes for 4.6 (part 1)

    - fix USB adress register for Linksys Armada 388 based boards
    - fix build warning in mvebu-mbus

    * tag 'mvebu-fixes-4.6-1' of git://git.infradead.org/linux-mvebu:
    ARM: mvebu: Correct unit address for linksys
    bus: mvebu-mbus: use %pa to print phys_addr_t

    Signed-off-by: Olof Johansson

    Olof Johansson
     
  • The website handhelds.org has been down for a long time and is
    likely never coming back online.

    Signed-off-by: Linus Walleij
    Signed-off-by: Olof Johansson

    Linus Walleij
     
  • ARM: pxa: fixes for v4.6

    There is only a single fix for dma requestor lines initial
    setup, triggered by dmaengine previous fix.

    * tag 'pxa-fixes-v4.6' of https://github.com/rjarzmik/linux:
    ARM: pxa: fix the number of DMA requestor lines

    Signed-off-by: Olof Johansson

    Olof Johansson
     
  • …/git/tmlind/linux-omap into fixes

    Fixes for omaps against v4.6-rc1. Mostly minor fixes for the newer
    SoCs with few board fixes and a fix for a long time hwmod bug:

    - Fix cpsw_emac0 link type for baltos-ir5221
    - Fix interrupt type for TWD
    - Fix edma memcpy channel allocation for am43x
    - Fix am43x-epos sycntimer32k by using the correct assigned clock
    - Fix interconnect barrier for dra7
    - Fix a long time hwmod bug for updating sysconfig register properly
    - Fix flakey booting on dm814x where USB reset needs a delay

    And there is one minor change that is not strictly a fix, but is
    good to have for proper hardware detection:

    - Detect dra7 silicon revision 2.0 properly

    * tag 'omap-for-v4.6/fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: dts: am335x-baltos-ir5221: fix cpsw_emac0 link type
    ARM: OMAP: Correct interrupt type for ARM TWD
    ARM: DRA722: Add ID detect for Silicon Rev 2.0
    ARM: dts: am43xx: fix edma memcpy channel allocation
    ARM: dts: AM43x-epos: Fix clk parent for synctimer
    ARM: OMAP2: Fix up interconnect barrier initialization for DRA7
    ARM: OMAP2+: hwmod: Fix updating of sysconfig register
    ARM: OMAP2+: Use srst_udelay for USB on dm814x

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     
  • This patch fixes condition whether the specified address ranges
    overlap each other.

    Fixes: 4b7f48d395a7 ("bus: uniphier-system-bus: add UniPhier System Bus driver")
    Signed-off-by: Kunihiko Hayashi
    Acked-by: Masahiro Yamada
    Signed-off-by: Olof Johansson

    Kunihiko Hayashi
     
  • My intention was to ioremap a 4-byte register. Coincidentally enough,
    sizeof(SZ_4) equals to SZ_4, but this code is weird anyway.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Olof Johansson

    Masahiro Yamada
     
  • This patch fixes the issue introduced by the ext4 crypto fix in a same manner.
    For F2FS, however, we flush the pending IOs and wait for a while to acquire free
    memory.

    Fixes: c9af28fdd4492 ("ext4 crypto: don't let data integrity writebacks fail with ENOMEM")
    Cc: Theodore Ts'o
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • This patch synced with the below two ext4 crypto fixes together.

    In 4.6-rc1, f2fs newly introduced accessing f_path.dentry which crashes
    overlayfs. To fix, now we need to use file_dentry() to access that field.

    Fixes: c0a37d487884 ("ext4: use file_dentry()")
    Fixes: 9dd78d8c9a7b ("ext4: use dget_parent() in ext4_file_open()")
    Cc: Miklos Szeredi
    Cc: Theodore Ts'o
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • This patch updates fscrypto along with the below ext4 crypto change.

    Fixes: 3d43bcfef5f0 ("ext4 crypto: use dget_parent() in ext4_d_revalidate()")
    Cc: Theodore Ts'o
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     

12 Apr, 2016

7 commits

  • This is Dell usb dock audio workaround.
    It was fixed the master volume keep lower.

    [Some background: the patch essentially skips the controls of a couple
    of FU volumes. Although the firmware exposes the dB and the value
    information via the usb descriptor, changing the values (we set the
    min volume as default) screws up the device. Although this has been
    fixed in the newer firmware, the devices are shipped with the old
    firmware, thus we need the workaround in the driver side. -- tiwai]

    Signed-off-by: Kailang Yang
    Cc:
    Signed-off-by: Takashi Iwai

    Kailang Yang
     
  • In accordance with e15f431fe2d5 ("errno.h: Improve ENOSYS's comment") and
    91c9afaf97ee ("checkpatch.pl: new instances of ENOSYS are errors") we're
    converting from the old meaning of: ENOSYS "Function not implemented" to
    a more standard EINVAL.

    Reported-by: Seraphin Bonnaffe
    Signed-off-by: Lee Jones
    Signed-off-by: Jassi Brar

    Lee Jones
     
  • If we set the Signal twice or more, without using it as part of a message,
    memory will be re-allocated and the pointer over-written. Prevent this
    potential leak by only allocating memory when there isn't any already.

    Reported-by: Dan Carpenter
    Signed-off-by: Lee Jones
    Signed-off-by: Jassi Brar

    Lee Jones
     
  • While we're at it, ensure copy-to location is NULL'ed in the error path.

    Suggested-by: Dan Carpenter
    Signed-off-by: Lee Jones
    Signed-off-by: Jassi Brar

    Lee Jones
     
  • Pull HID fixes from Jiri Kosina:

    - fix for how scaling linearization is computed in wiimote driver, by
    Cyan Ogilvie

    - endless retry loop fix in generic USB HID core reset-resume handling,
    by Alan Stern

    - two functional fixes affecting particular devices, and oops fix for
    wacom driver, by Jason Gerecke

    - multitouch slot numbering fix from Gabriele Mazzotta

    - a couple more small fixes on top

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: wacom: Support switching from vendor-defined device mode on G9 and G11
    HID: wacom: Initialize hid_data.inputmode to -1
    HID: microsoft: add support for 3 more devices
    HID: multitouch: Synchronize MT frame on reset_resume
    HID: wacom: fix Bamboo ONE oops
    HID: lenovo: Don't use stack variables for DMA buffers
    HID: usbhid: fix inconsistent reset/resume/reset-resume behavior
    HID: wiimote: Fix wiimote mp scale linearization

    Linus Torvalds
     
  • Pull m68k update from Geert Uytterhoeven.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k/defconfig: Update defconfigs for v4.6-rc2
    m68k: Wire up preadv2 and pwritev2

    Linus Torvalds
     
  • Pull ARC fixes from Vineet Gupta:
    - fix Kconfig splat due to pcie rework
    - make ethernet work again on axs103
    - provide fb_pgprotect() for future video driver integration

    * tag 'arc-4.6-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
    ARC: [plat-axs103] Enable loop block devices
    Revert "ARC: [plat-axs10x] add Ethernet PHY description in .dts"
    arc: Add our own implementation of fb_pgprotect()
    ARC: Don't source drivers/pci/pcie/Kconfig ourselves

    Linus Torvalds
     

11 Apr, 2016

2 commits

  • Commit c80914e81ec5b08 ("dm: return error if bio_integrity_clone() fails
    in clone_bio()") changed clone_bio() such that if it does return error
    then the alloc_tio() created resources (both the bio that was allocated
    to be a clone and the containing dm_target_io struct) will leak.

    Fix this by calling free_tio() in __clone_and_map_data_bio()'s
    clone_bio() error path.

    Fixes: c80914e81ec5b08 ("dm: return error if bio_integrity_clone() fails in clone_bio()")
    Signed-off-by: Mikulas Patocka
    Signed-off-by: Mike Snitzer

    Mikulas Patocka
     
  • The Lenovo Thinkpad T460s requires the alc_fixup_tpt440_dock as well in
    order to get working sound output on the docking stations headphone jack.

    Patch tested on a Thinkpad T460s (20F9CT01WW) using a ThinkPad Ultradock
    on kernel 4.4.6.

    Signed-off-by: Sven Eckelmann
    Tested-by: Simon Wunderlich
    Cc:
    Signed-off-by: Takashi Iwai

    Sven Eckelmann