1. 01 Dec, 2014 5 commits
    • David Howells's avatar
      KEYS: request_key() should reget expired keys rather than give EKEYEXPIRED · 0b0a8415
      David Howells authored
      Since the keyring facility can be viewed as a cache (at least in some
      applications), the local expiration time on the key should probably be viewed
      as a 'needs updating after this time' property rather than an absolute 'anyone
      now wanting to use this object is out of luck' property.
      
      Since request_key() is the main interface for the usage of keys, this should
      update or replace an expired key rather than issuing EKEYEXPIRED if the local
      expiration has been reached (ie. it should refresh the cache).
      
      For absolute conditions where refreshing the cache probably doesn't help, the
      key can be negatively instantiated using KEYCTL_REJECT_KEY with EKEYEXPIRED
      given as the error to issue.  This will still cause request_key() to return
      EKEYEXPIRED as that was explicitly set.
      
      In the future, if the key type has an update op available, we might want to
      upcall with the expired key and allow the upcall to update it.  We would pass
      a different operation name (the first column in /etc/request-key.conf) to the
      request-key program.
      
      request_key() returning EKEYEXPIRED is causing an NFS problem which Chuck
      Lever describes thusly:
      
      	After about 10 minutes, my NFSv4 functional tests fail because the
      	ownership of the test files goes to "-2". Looking at /proc/keys
      	shows that the id_resolv keys that map to my test user ID have
      	expired. The ownership problem persists until the expired keys are
      	purged from the keyring, and fresh keys are obtained.
      
      	I bisected the problem to 3.13 commit b2a4df20 ("KEYS: Expand
      	the capacity of a keyring"). This commit inadvertantly changes the
      	API contract of the internal function keyring_search_aux().
      
      	The root cause appears to be that b2a4df20 made "no state check"
      	the default behavior. "No state check" means the keyring search
      	iterator function skips checking the key's expiry timeout, and
      	returns expired keys.  request_key_and_link() depends on getting
      	an -EAGAIN result code to know when to perform an upcall to refresh
      	an expired key.
      
      This patch can be tested directly by:
      
      	keyctl request2 user debug:fred a @s
      	keyctl timeout %user:debug:fred 3
      	sleep 4
      	keyctl request2 user debug:fred a @s
      
      Without the patch, the last command gives error EKEYEXPIRED, but with the
      command it gives a new key.
      Reported-by: default avatarCarl Hetherington <cth@carlh.net>
      Reported-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Tested-by: default avatarChuck Lever <chuck.lever@oracle.com>
      0b0a8415
    • David Howells's avatar
      KEYS: Simplify KEYRING_SEARCH_{NO,DO}_STATE_CHECK flags · 054f6180
      David Howells authored
      Simplify KEYRING_SEARCH_{NO,DO}_STATE_CHECK flags to be two variations of the
      same flag.  They are effectively mutually exclusive and one or the other
      should be provided, but not both.
      
      Keyring cycle detection and key possession determination are the only things
      that set NO_STATE_CHECK, except that neither flag really does anything there
      because neither purpose makes use of the keyring_search_iterator() function,
      but rather provides their own.
      
      For cycle detection we definitely want to check inside of expired keyrings,
      just so that we don't create a cycle we can't get rid of.  Revoked keyrings
      are cleared at revocation time and can't then be reused, so shouldn't be a
      problem either way.
      
      For possession determination, we *might* want to validate each keyring before
      searching it: do you possess a key that's hidden behind an expired or just
      plain inaccessible keyring?  Currently, the answer is yes.  Note that you
      cannot, however, possess a key behind a revoked keyring because they are
      cleared on revocation.
      
      keyring_search() sets DO_STATE_CHECK, which is correct.
      
      request_key_and_link() currently doesn't specify whether to check the key
      state or not - but it should set DO_STATE_CHECK.
      
      key_get_instantiation_authkey() also currently doesn't specify whether to
      check the key state or not - but it probably should also set DO_STATE_CHECK.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Tested-by: default avatarChuck Lever <chuck.lever@oracle.com>
      054f6180
    • David Howells's avatar
      KEYS: Fix the size of the key description passed to/from userspace · aa9d4437
      David Howells authored
      When a key description argument is imported into the kernel from userspace, as
      happens in add_key(), request_key(), KEYCTL_JOIN_SESSION_KEYRING,
      KEYCTL_SEARCH, the description is copied into a buffer up to PAGE_SIZE in size.
      PAGE_SIZE, however, is a variable quantity, depending on the arch.  Fix this at
      4096 instead (ie. 4095 plus a NUL termination) and define a constant
      (KEY_MAX_DESC_SIZE) to this end.
      
      When reading the description back with KEYCTL_DESCRIBE, a PAGE_SIZE internal
      buffer is allocated into which the information and description will be
      rendered.  This means that the description will get truncated if an extremely
      long description it has to be crammed into the buffer with the stringified
      information.  There is no particular need to copy the description into the
      buffer, so just copy it directly to userspace in a separate operation.
      Reported-by: default avatarChristian Kastner <debian@kvr.at>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Tested-by: default avatarChristian Kastner <debian@kvr.at>
      aa9d4437
    • Linus Torvalds's avatar
      Linux 3.18-rc7 · 009d0431
      Linus Torvalds authored
      009d0431
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · df20ce5a
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Two i915 regressions and one dual-gpu laptop radeon fix"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon: report disconnected for LVDS/eDP with PX if ddc fails
        drm/i915: Cancel vdd off work before suspend
        drm/i915: Ignore SURFLIVE and flip counter when the GPU gets reset
      df20ce5a
  2. 30 Nov, 2014 1 commit
  3. 29 Nov, 2014 4 commits
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7a5a4f97
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "Three fixlets from the ARM SoC camp:
         - correct irqdomain initialization for atmel-aic
         - correct error handling for device tree parsing in bcm controllers"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip: brcmstb-l2: Fix error handling of irq_of_parse_and_map
        irqchip: bcm7120-l2: Fix error handling of irq_of_parse_and_map
        irqchip: atmel-aic: Fix irqdomain initialization
      7a5a4f97
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · ed02bfa4
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of ten fixes: 8 for UFS including four static checker
        warnings, a potential null deref in the voltage regulator code, a race
        on module unload, a ref counting fix on the well known LUNs which made
        it impossible to remove the ufs module and fix to correct the
        information in pwr_info.
      
        In addition to UFS, there's a blacklist for the Intel Multi-Flex array
        which chokes on report supported operation codes and a fix to an oops
        in bnx2fc caused by shared skbs"
      
      [ For us non-SCSI people: "UFS" here is "Universal Flash Storage" not
        the filesystem.  - Linus ]
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        ufs: fix NULL dereference when no regulators are defined
        ufs: ensure clk gating work is finished before module unloading
        scsi: ufs: fix static checker warning in ufshcd_parse_clock_info
        scsi: ufs: fix static checker warning in __ufshcd_setup_clocks
        scsi: ufs: fix static checker warning in ufshcd_populate_vreg
        scsi: ufs: fix static checker errors in ufshcd_system_suspend
        ufs: fix power info after link start-up
        ufs: fix reference counting of W-LUs
        scsi: add Intel Multi-Flex to scsi scan blacklist
        bnx2fc: do not add shared skbs to the fcoe_rx_list
      ed02bfa4
    • Linus Torvalds's avatar
      Merge tag 'staging-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 88910638
      Linus Torvalds authored
      Pull staging/IIO driver fixes from Greg KH:
       "Here are some staging and IIO driver fixes for 3.18-rc7 that resolve a
        number of reported issues, and a new device id for a staging wireless
        driver.
      
        All of these have been in linux-next"
      
      * tag 'staging-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: r8188eu: Add new device ID for DLink GO-USB-N150
        staging: r8188eu: Fix scheduling while atomic error introduced in commit fadbe0cd
        iio: accel: bmc150: set low default thresholds
        iio: accel: bmc150: Fix iio_event_spec direction
        iio: accel: bmc150: Send x, y and z motion separately
        iio: accel: bmc150: Error handling when mode set fails
        iio: gyro: bmg160: Fix iio_event_spec direction
        iio: gyro: bmg160: Send x, y and z motion separately
        iio: gyro: bmg160: Don't let interrupt mode to be open drain
        iio: gyro: bmg160: Error handling when mode set fails
        iio: adc: men_z188_adc: Add terminating entry for men_z188_ids
        iio: accel: kxcjk-1013: Fix kxcjk10013_set_range
        iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask
      88910638
    • Linus Torvalds's avatar
      Merge tag 'tty-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 6f93840d
      Linus Torvalds authored
      Pull tty/serial fix from Greg KH:
       "Here is a single revert for the of-serial driver that resolves a
        reported issue.
      
        This revert has been in linux-next for a while"
      
      * tag 'tty-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        Revert "serial: of-serial: add PM suspend/resume support"
      6f93840d
  4. 28 Nov, 2014 12 commits
    • Linus Torvalds's avatar
      Merge tag 'usb-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 4742eb3d
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some USB driver fixes and new device ids for 3.18-rc7.
      
        Full details are in the shortlog, and all of these have been in the
        linux-next tree for a while"
      
      * tag 'usb-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb-quirks: Add reset-resume quirk for MS Wireless Laser Mouse 6000
        usb: xhci: rework root port wake bits if controller isn't allowed to wakeup
        USB: xhci: Reset a halted endpoint immediately when we encounter a stall.
        Revert "xhci: clear root port wake on bits if controller isn't wake-up capable"
        USB: xhci: don't start a halted endpoint before its new dequeue is set
        USB: uas: Add no-uas quirk for Hitachi usb-3 enclosures 4971:1012
        USB: ssu100: fix overrun-error reporting
        USB: keyspan: fix overrun-error reporting
        USB: keyspan: fix tty line-status reporting
        usb: serial: ftdi_sio: add PIDs for Matrix Orbital products
        usb: dwc3: ep0: fix for dead code
        USB: serial: cp210x: add IDs for CEL MeshConnect USB Stick
      4742eb3d
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal · cba3b00d
      Linus Torvalds authored
      Pull thermal fixes from Eduardo Valentin:
       "In this -rc still very minor changes:
      
         - Lee Jones fixes compilation warning in sti thermal driver
         - Marjus Elfring removes unnecessary checks in exynos thermal driver
           (as per coccinelle)
         - Now we always update cpufreq policies, and thus get (hopefully)
           always in sync with cpufreq, thanks to Yadwinder"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
        thermal: Exynos: Deletion of unnecessary checks before two function calls
        thermal: sti: Ignore suspend/resume functions when !PM_SLEEP
        thermal: cpu_cooling: Update always cpufreq policy with thermal constraints
      cba3b00d
    • Linus Torvalds's avatar
      Merge tag 'sound-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 16cf45c0
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "No excitement, here are only minor fixes: an endian fix for the new
        DSD format we added in 3.18, a fix for HP mute LED, and a fix for
        Native Instrument quirk"
      
      * tag 'sound-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: pcm: Add big-endian DSD sample formats and fix XMOS DSD sample format
        ALSA: hda - One more HP machine needs to change mute led quirk
        ALSA: usb-audio: Use snd_usb_ctl_msg() for Native Instruments quirk
      16cf45c0
    • Linus Torvalds's avatar
      Merge tag 'armsoc-for-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 615b994e
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Not much interesting going on fixes-wise for us this week, as it
        should be for an -rc7.  I'm not expecting Olof to work much over
        Thanksgiving weekend, so I decided to take over again and push these
        out to you.
      
        Just four simple fixes this week:
      
         - one missing of_node_put() on armv7 based mvebu
         - forcing the USB host into the right mode on Chromebook
           (exynos5-snow)
         - enabling two important drivers for exynos_defconfig
         - fixing a noncritical bug for tegra that would cause a regression
           with common code patches queued for 3.19"
      
      * tag 'armsoc-for-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: tegra: irq: fix buggy usage of irq_data irq field
        ARM: exynos_defconfig: Enable max77802 rtc and clock drivers
        ARM: dts: Explicitly set dr_mode on exynos5250-snow
        ARM: mvebu: add missing of_node_put() call in coherency.c
      615b994e
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · e818d5ed
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Another round of relatively small ARM fixes.
      
        Thomas spotted that the strex backoff delay bit was a disable bit, so
        it needed to be clear for this to work.  Vladimir spotted that using a
        restart block for the cache flush operation would return -EINTR, which
        userspace was not expecting.  Dmitry spotted that the auxiliary
        control register accesses for Xscale were not correct"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8226/1: cacheflush: get rid of restarting block
        ARM: 8222/1: mvebu: enable strex backoff delay
        ARM: 8216/1: xscale: correct auxiliary register in suspend/resume
      e818d5ed
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2014-11-27' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 21124e5c
      Dave Airlie authored
      Two regression fixes from Ville.
      
      * tag 'drm-intel-fixes-2014-11-27' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Cancel vdd off work before suspend
        drm/i915: Ignore SURFLIVE and flip counter when the GPU gets reset
      21124e5c
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 98e8d2e0
      Linus Torvalds authored
      Pull mips fixes from Ralf Baechle:
       "The hopefully final round of fixes for 3.18:
      
         - Fix a number of build errors affecting particular configurations.
         - Handle EVA correctly when flushing a signal trampoline and dcache
           lines.
         - Fix printks printing jibberish.
         - Handle 64 bit memory addresses correctly when adding memory chunk
           on 32 bit kernels.
         - Fix a race condition in the hardware tablewalker code"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: tlbex: Fix potential HTW race on TLBL/M/S handlers
        MIPS: Fix address type used for early memory detection.
        MIPS: Kconfig: Don't allow both microMIPS and SmartMIPS to be selected.
        MIPS: kernel: cps-vec: Set ISA level to mips32r2 for the MIPS MT ASE
        MIPS: Netlogic: handle modular AHCI builds
        MIPS: Netlogic: handle modular USB case
        MIPS: Loongson: Make platform serial setup always built-in.
        MIPS: fix EVA & non-SMP non-FPU FP context signal handling
        MIPS: cpu-probe: Set the FTLB probability bit on supported cores
        MIPS: BMIPS: Fix ".previous without corresponding .section" warnings
        MIPS: uaccess.h: Fix strnlen_user comment.
        MIPS: r4kcache: Add EVA case for protected_writeback_dcache_line
        MIPS: Fix info about plat_setup in arch_mem_init comment
        MIPS: rtlx: Remove KERN_DEBUG from pr_debug() arguments in rtlx.c
        MIPS: SEAD3: Fix LED device registration.
        MIPS: Fix a copy & paste error in unistd.h
      98e8d2e0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux · 21f122f4
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Here are five fixes for you to pull please.
      
        They're all CC'ed to stable except the "Fix PE state format" one which
        went in this release"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
        powerpc: 32 bit getcpu VDSO function uses 64 bit instructions
        powerpc/powernv: Replace OPAL_DEASSERT_RESET with EEH_RESET_DEACTIVATE
        powerpc/eeh: Fix PE state format
        powerpc/pseries: Fix endiannes issue in RTAS call from xmon
        powerpc/powernv: Fix the hmi event version check.
      21f122f4
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · ae979430
      Linus Torvalds authored
      Pull sparc fixlet from David Miller:
       "Aparc fix to add dma_cache_sync(), even if a nop it should be provided
        if dma_{alloc,free}_noncoherent() is provided too"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: Add NOP dma_cache_sync() implementation.
      ae979430
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 8e845971
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Several small fixes here:
      
         1) Don't crash in tg3 driver when the number of tx queues has been
            configured to be different from the number of rx queues.  From
            Thadeu Lima de Souza Cascardo.
      
         2) VLAN filter not disabled properly in promisc mode in ixgbe driver,
            from Vlad Yasevich.
      
         3) Fix OOPS on dellink op in VTI tunnel driver, from Xin Long.
      
         4) IPV6 GRE driver WCCP code checks skb->protocol for ETH_P_IP
            instead of ETH_P_IPV6, whoops.  From Yuri Chislov.
      
         5) Socket matching in ping driver is buggy when packet AF does not
            match socket's AF.  Fix from Jane Zhou.
      
         6) Fix checksum calculation errors in VXLAN due to where the
            udp_tunnel6_xmit_skb() helper gets it's saddr/daddr from.  From
            Alexander Duyck.
      
         7) Fix 5G detection problem in rtlwifi driver, from Larry Finger.
      
         8) Fix NULL deref in tcp_v{4,6}_send_reset, from Eric Dumazet.
      
         9) Various missing netlink attribute verifications in bridging code,
            from Thomas Graf.
      
        10) tcp_recvmsg() unconditionally calls ipv4 ip_recv_error even for
            ipv6 sockets, whoops.  Fix from Willem de Bruijn"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (29 commits)
        net-timestamp: make tcp_recvmsg call ipv6_recv_error for AF_INET6 socks
        bridge: Sanitize IFLA_EXT_MASK for AF_BRIDGE:RTM_GETLINK
        bridge: Add missing policy entry for IFLA_BRPORT_FAST_LEAVE
        net: Check for presence of IFLA_AF_SPEC
        net: Validate IFLA_BRIDGE_MODE attribute length
        bridge: Validate IFLA_BRIDGE_FLAGS attribute length
        stmmac: platform: fix default values of the filter bins setting
        net/mlx4_core: Limit count field to 24 bits in qp_alloc_res
        net: dsa: bcm_sf2: reset switch prior to initialization
        net: dsa: bcm_sf2: fix unmapping registers in case of errors
        tg3: fix ring init when there are more TX than RX channels
        tcp: fix possible NULL dereference in tcp_vX_send_reset()
        rtlwifi: Change order in device startup
        rtlwifi: rtl8821ae: Fix 5G detection problem
        Revert "netfilter: conntrack: fix race in __nf_conntrack_confirm against get_next_corpse"
        vxlan: Fix boolean flip in VXLAN_F_UDP_ZERO_CSUM6_[TX|RX]
        ip6_udp_tunnel: Fix checksum calculation
        net-timestamp: Fix a documentation typo
        net/ping: handle protocol mismatching scenario
        af_packet: fix sparse warning
        ...
      8e845971
    • Linus Torvalds's avatar
      Merge tag 'spi-v3.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 190fc9d9
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "There's a couple of driver fixes here, plus one core fix for the DMA
        mapping which wasn't doing the right thing for vmalloc()ed addresses
        that hadn't been through kmap().  It's fairly rare to use vmalloc()
        with SPI and it's a subset of those users who might fail so it's
        unsurprising that this wasn't noticed sooner"
      
      * tag 'spi-v3.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: sirf: fix word width configuration
        spi: Fix mapping from vmalloc-ed buffer to scatter list
        spi: dw: Fix dynamic speed change.
      190fc9d9
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 0210bb60
      Linus Torvalds authored
      Pull input layer fixes from Dmitry Torokhov:
       "The main change is to fix breakage in Elantech driver introduced by
        the recent commit adding trackpoint reporting to protocol v4.  Now we
        are trusting the hardware to advertise the trackpoint properly and do
        not try to decode the data as trackpoint if firmware told us it is not
        present"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: xpad - use proper endpoint type
        Input: elantech - trust firmware about trackpoint presence
        Input: synaptics - adjust min/max on Thinkpad E540
      0210bb60
  5. 27 Nov, 2014 10 commits
  6. 26 Nov, 2014 8 commits
    • Anton Blanchard's avatar
      powerpc: 32 bit getcpu VDSO function uses 64 bit instructions · 152d44a8
      Anton Blanchard authored
      I used some 64 bit instructions when adding the 32 bit getcpu VDSO
      function. Fix it.
      
      Fixes: 18ad51dd ("powerpc: Add VDSO version of getcpu")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      152d44a8
    • Gavin Shan's avatar
      powerpc/powernv: Replace OPAL_DEASSERT_RESET with EEH_RESET_DEACTIVATE · 360d88a9
      Gavin Shan authored
      The flag passed to ioda_eeh_phb_reset() should be EEH_RESET_DEACTIVATE,
      which is translated to OPAL_DEASSERT_RESET or something else by the
      EEH backend accordingly.
      
      The patch replaces OPAL_DEASSERT_RESET with EEH_RESET_DEACTIVATE for
      ioda_eeh_phb_reset().
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      360d88a9
    • Gavin Shan's avatar
      powerpc/eeh: Fix PE state format · 7531473c
      Gavin Shan authored
      Obviously I had wrong format given to the PE state output from
      /sys/bus/pci/devices/xxxx/eeh_pe_state with some typoes, which
      was introduced by commit 2013add4. The patch fixes it up.
      
      Fixes: 2013add4 ("powerpc/eeh: Show hex prefix for PE state sysfs")
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      7531473c
    • Laurent Dufour's avatar
      powerpc/pseries: Fix endiannes issue in RTAS call from xmon · 3b8a3c01
      Laurent Dufour authored
      On pseries system (LPAR) xmon failed to enter when running in LE mode,
      system is hunging. Inititating xmon will lead to such an output on the
      console:
      
      SysRq : Entering xmon
      cpu 0x15: Vector: 0  at [c0000003f39ffb10]
          pc: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
          lr: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
          sp: c0000003f39ffc70
         msr: 8000000000009033
        current = 0xc0000003fafa7180
        paca    = 0xc000000007d75e80	 softe: 0	 irq_happened: 0x01
          pid   = 14617, comm = bash
      Bad kernel stack pointer fafb4b0 at eca7cc4
      cpu 0x15: Vector: 300 (Data Access) at [c000000007f07d40]
          pc: 000000000eca7cc4
          lr: 000000000eca7c44
          sp: fafb4b0
         msr: 8000000000001000
         dar: 10000000
       dsisr: 42000000
        current = 0xc0000003fafa7180
        paca    = 0xc000000007d75e80	 softe: 0	 irq_happened: 0x01
          pid   = 14617, comm = bash
      cpu 0x15: Exception 300 (Data Access) in xmon, returning to main loop
      xmon: WARNING: bad recursive fault on cpu 0x15
      
      The root cause is that xmon is calling RTAS to turn off the surveillance
      when entering xmon, and RTAS is requiring big endian parameters.
      
      This patch is byte swapping the RTAS arguments when running in LE mode.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      3b8a3c01
    • Mahesh Salgaonkar's avatar
      powerpc/powernv: Fix the hmi event version check. · 6acbc5a1
      Mahesh Salgaonkar authored
      The current HMI event structure is an ABI and carries a version field to
      accommodate future changes without affecting/rearranging current structure
      members that are valid for previous versions.
      
      The current version check "if (hmi_evt->version != OpalHMIEvt_V1)"
      doesn't accomodate the fact that the version number may change in
      future.
      
      If firmware starts returning an HMI event with version > 1, this check
      will fail and no HMI information will be printed on older kernels.
      
      This patch fixes this issue.
      
      Cc: stable@vger.kernel.org # 3.17+
      Signed-off-by: default avatarMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
      [mpe: Reword changelog]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      6acbc5a1
    • Larry Finger's avatar
      staging: r8188eu: Fix scheduling while atomic error introduced in commit fadbe0cd · 33dc85c3
      Larry Finger authored
      In commit fadbe0cd entitled "staging:
      rtl8188eu:Remove rtw_zmalloc(), wrapper for kzalloc()", the author failed
      to note that the original code in the wrapper tested whether the caller
      could sleep, and set the flags argument to kzalloc() appropriately.
      After the patch, GFP_KERNEL is used unconditionally. Unfortunately, several
      of the routines may be entered from an interrupt routine and generate
      a BUG splat for every such call. Routine rtw_sitesurvey_cmd() is used in the
      example below:
      
      BUG: sleeping function called from invalid context at mm/slub.c:1240
      in_atomic(): 1, irqs_disabled(): 0, pid: 756, name: wpa_supplicant
      INFO: lockdep is turned off.
      CPU: 2 PID: 756 Comm: wpa_supplicant Tainted: G        WC O   3.18.0-rc4+ #34
      Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.20   04/17/2014
      ffffc90005557000 ffff880216fafaa8 ffffffff816b0bbf 0000000000000000
      ffff8800c3b58000 ffff880216fafac8 ffffffff8107af77 0000000000000001
      0000000000000010 ffff880216fafb18 ffffffff811b06ce 0000000000000000
      Call Trace:
       [<ffffffff816b0bbf>] dump_stack+0x4e/0x71
       [<ffffffff8107af77>] __might_sleep+0xf7/0x120
       [<ffffffff811b06ce>] kmem_cache_alloc_trace+0x4e/0x1f0
       [<ffffffffa0888226>] ? rtw_sitesurvey_cmd+0x56/0x2a0 [r8188eu]
       [<ffffffffa0888226>] rtw_sitesurvey_cmd+0x56/0x2a0 [r8188eu]
       [<ffffffffa088f00d>] rtw_do_join+0x22d/0x370 [r8188eu]
       [<ffffffffa088f6e8>] rtw_set_802_11_ssid+0x218/0x3d0 [r8188eu]
       [<ffffffffa08c3ca5>] rtw_wx_set_essid+0x1e5/0x410 [r8188eu]
       [<ffffffffa08c3ac0>] ? rtw_wx_get_rate+0x50/0x50 [r8188eu]
       [<ffffffff816938f1>] ioctl_standard_iw_point+0x151/0x3f0
       [<ffffffff81693d52>] ioctl_standard_call+0xb2/0xe0
       [<ffffffff81597df7>] ? rtnl_lock+0x17/0x20
       [<ffffffff816945a0>] ? iw_handler_get_private+0x70/0x70
       [<ffffffff81693ca0>] ? call_commit_handler+0x40/0x40
       [<ffffffff81693256>] wireless_process_ioctl+0x176/0x1c0
       [<ffffffff81693e79>] wext_handle_ioctl+0x69/0xc0
       [<ffffffff8159fe79>] dev_ioctl+0x309/0x5e0
       [<ffffffff810be9c7>] ? call_rcu+0x17/0x20
       [<ffffffff8156a472>] sock_ioctl+0x142/0x2e0
       [<ffffffff811e0c70>] do_vfs_ioctl+0x300/0x520
       [<ffffffff81101514>] ? __audit_syscall_entry+0xb4/0x110
       [<ffffffff81101514>] ? __audit_syscall_entry+0xb4/0x110
       [<ffffffff810102bc>] ? do_audit_syscall_entry+0x6c/0x70
       [<ffffffff811e0f11>] SyS_ioctl+0x81/0xa0
       [<ffffffff816ba1d2>] system_call_fastpath+0x12/0x17
      
      Additional routines that generate this BUG are rtw_joinbss_cmd(),
      rtw_dynamic_chk_wk_cmd(), rtw_lps_ctrl_wk_cmd(), rtw_rpt_timer_cfg_cmd(),
      rtw_ps_cmd(), report_survey_event(), report_join_res(), survey_timer_hdl(),
      and rtw_check_bcn_info().
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: navin patidar <navin.patidar@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      33dc85c3
    • David S. Miller's avatar
      Merge tag 'master-2014-11-25' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless · d1c637c5
      David S. Miller authored
      John W. Linville says:
      
      ====================
      pull request: wireless 2014-11-26
      
      Please pull this little batch of fixes intended for the 3.18 stream...
      
      For the iwlwifi one, Emmanuel says:
      
      "Not all the firmware know how to handle the HOT_SPOT_CMD.
      Make sure that the firmware will know this command before
      sending it. This avoids a firmware crash."
      
      Along with that, Larry sends a pair of rtlwifi fixes to address some
      discrepancies from moving drivers out of staging.  Larry says:
      
      "These two patches are needed to fix a regression introduced when
      driver rtl8821ae was moved from staging to the regular wireless tree."
      
      Please let me know if there are problems!
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1c637c5
    • David S. Miller's avatar
      sparc: Add NOP dma_cache_sync() implementation. · 0d1d9092
      David S. Miller authored
      This can be a NOP because we forward dma_{alloc,free}_noncoherent to
      dma_{alloc,free}_coherent.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d1d9092