Skip to content
  1. Oct 06, 2013
    • Linus Torvalds's avatar
      Merge tag 'tty-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · e3757a1f
      Linus Torvalds authored
      Pull tty fixes from Greg KH:
       "Here are two tty driver fixes for 3.12-rc4.
      
        One fixes the reported regression in the n_tty code that a number of
        people found recently, and the other one fixes an issue with xen
        consoles that broke in 3.10"
      
      * tag 'tty-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        xen/hvc: allow xenboot console to be used again
        tty: Fix pty master read() after slave closes
      e3757a1f
    • Linus Torvalds's avatar
      Merge tag 'staging-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 20fa7867
      Linus Torvalds authored
      Pull staging fixes from Greg KH:
       "Here are 4 tiny staging and iio driver fixes for 3.12-rc4.  Nothing
        major, just some small fixes for reported issues"
      
      * tag 'staging-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: ni_65xx: (bug fix) confine insn_bits to one subdevice
        iio:magnetometer: Bugfix magnetometer default output registers
        iio: Remove debugfs entries in iio_device_unregister()
        iio: amplifiers: ad8366: Remove regulator_put
      20fa7867
  2. Oct 05, 2013
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6 · a5c984cc
      Linus Torvalds authored
      Pull CIFS fixes from Steve French:
       "Small set of cifs fixes.  Most important is Jeff's fix that works
        around disconnection problems which can be caused by simultaneous use
        of user space tools (starting a long running smbclient backup then
        doing a cifs kernel mount) or multiple cifs mounts through a NAT, and
        Jim's fix to deal with reexport of cifs share.
      
        I expect to send two more cifs fixes next week (being tested now) -
        fixes to address an SMB2 unmount hang when server dies and a fix for
        cifs symlink handling of Windows "NFS" symlinks"
      
      * 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
        [CIFS] update cifs.ko version
        [CIFS] Remove ext2 flags that have been moved to fs.h
        [CIFS] Provide sane values for nlink
        cifs: stop trying to use virtual circuits
        CIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them
      a5c984cc
    • Linus Torvalds's avatar
      Merge tag 'pci-v3.12-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 95167aad
      Linus Torvalds authored
      Pull PCI fix from Bjorn Helgaas:
       "We merged what was intended to be an MMCONFIG cleanup, but in fact,
        for systems without _CBA (which is almost everything), it broke
        extended config space for domain 0 and it broke all config space for
        other domains.
      
        This reverts the change"
      
      * tag 'pci-v3.12-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        Revert "x86/PCI: MMCONFIG: Check earlier for MMCONFIG region at address zero"
      95167aad
    • Bjorn Helgaas's avatar
      Revert "x86/PCI: MMCONFIG: Check earlier for MMCONFIG region at address zero" · 67d470e0
      Bjorn Helgaas authored
      This reverts commit 07f9b61c.
      
      07f9b61c
      
       was intended to be a cleanup that didn't change anything, but in
      fact, for systems without _CBA (which is almost everything), it broke
      extended config space for domain 0 and all config space for other domains.
      
      Reference: http://lkml.kernel.org/r/20131004011806.GE20450@dangermouse.emea.sgi.com
      Reported-by: default avatarHedi Berriche <hedi@sgi.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      67d470e0
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 7dee8dff
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
      
       - The resume part of user space driven hibernation (s2disk) is now
         broken after the change that moved the creation of memory bitmaps to
         after the freezing of tasks, because I forgot that the resume utility
         loaded the image before freezing tasks and needed the bitmaps for
         that.  The fix adds special handling for that case.
      
       - One of recent commits changed the export of acpi_bus_get_device() to
         EXPORT_SYMBOL_GPL(), which was technically correct but broke existing
         binary modules using that function including one in particularly
         widespread use.  Change it back to EXPORT_SYMBOL().
      
       - The intel_pstate driver sometimes fails to disable turbo if its
         no_turbo sysfs attribute is set.  Fix from Srinivas Pandruvada.
      
       - One of recent cpufreq fixes forgot to update a check in cpufreq-cpu0
         which still (incorrectly) treats non-NULL as non-error.  Fix from
         Philipp Zabel.
      
       - The SPEAr cpufreq driver uses a wrong variable type in one place
         preventing it from catching errors returned by one of the functions
         called by it.  Fix from Sachin Kamat.
      
      * tag 'pm+acpi-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: Use EXPORT_SYMBOL() for acpi_bus_get_device()
        intel_pstate: fix no_turbo
        cpufreq: cpufreq-cpu0: NULL is a valid regulator, part 2
        cpufreq: SPEAr: Fix incorrect variable type
        PM / hibernate: Fix user space driven resume regression
      7dee8dff
    • Linus Torvalds's avatar
      Merge tag 'xfs-for-linus-v3.12-rc4' of git://oss.sgi.com/xfs/xfs · 3dbecf0a
      Linus Torvalds authored
      Pull xfs bugfixes from Ben Myers:
       "There are lockdep annotations for project quotas, a fix for dirent
        dtype support on v4 filesystems, a fix for a memory leak in recovery,
        and a fix for the build error that resulted from it.  D'oh"
      
      * tag 'xfs-for-linus-v3.12-rc4' of git://oss.sgi.com/xfs/xfs:
        xfs: Use kmem_free() instead of free()
        xfs: fix memory leak in xlog_recover_add_to_trans
        xfs: dirent dtype presence is dependent on directory magic numbers
        xfs: lockdep needs to know about 3 dquot-deep nesting
      3dbecf0a
    • Linus Torvalds's avatar
      selinux: remove 'flags' parameter from avc_audit() · ab354062
      Linus Torvalds authored
      
      
      Now avc_audit() has no more users with that parameter. Remove it.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ab354062
    • Linus Torvalds's avatar
      selinux: avc_has_perm_flags has no more users · cb4fbe57
      Linus Torvalds authored
      
      
      .. so get rid of it.  The only indirect users were all the
      avc_has_perm() callers which just expanded to have a zero flags
      argument.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cb4fbe57
    • Linus Torvalds's avatar
      selinux: remove 'flags' parameter from inode_has_perm · 19e49834
      Linus Torvalds authored
      Every single user passes in '0'.  I think we had non-zero users back in
      some stone age when selinux_inode_permission() was implemented in terms
      of inode_has_perm(), but that complicated case got split up into a
      totally separate code-path so that we could optimize the much simpler
      special cases.
      
      See commit 2e334057
      
       ("SELinux: delay initialization of audit data in
      selinux_inode_permission") for example.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      19e49834
    • Thierry Reding's avatar
      xfs: Use kmem_free() instead of free() · b2a42f78
      Thierry Reding authored
      
      
      This fixes a build failure caused by calling the free() function which
      does not exist in the Linux kernel.
      
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit aaaae980)
      b2a42f78
    • tinguely@sgi.com's avatar
      xfs: fix memory leak in xlog_recover_add_to_trans · 9b3b77fe
      tinguely@sgi.com authored
      
      
      Free the memory in error path of xlog_recover_add_to_trans().
      Normally this memory is freed in recovery pass2, but is leaked
      in the error path.
      
      Signed-off-by: default avatarMark Tinguely <tinguely@sgi.com>
      Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit 519ccb81)
      9b3b77fe
    • Dave Chinner's avatar
      xfs: dirent dtype presence is dependent on directory magic numbers · 6d313498
      Dave Chinner authored
      
      
      The determination of whether a directory entry contains a dtype
      field originally was dependent on the filesystem having CRCs
      enabled. This meant that the format for dtype beign enabled could be
      determined by checking the directory block magic number rather than
      doing a feature bit check. This was useful in that it meant that we
      didn't need to pass a struct xfs_mount around to functions that
      were already supplied with a directory block header.
      
      Unfortunately, the introduction of dtype fields into the v4
      structure via a feature bit meant this "use the directory block
      magic number" method of discriminating the dirent entry sizes is
      broken. Hence we need to convert the places that use magic number
      checks to use feature bit checks so that they work correctly and not
      by chance.
      
      The current code works on v4 filesystems only because the dirent
      size roundup covers the extra byte needed by the dtype field in the
      places where this problem occurs.
      
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarBen Myers <bpm@sgi.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit 367993e7)
      6d313498
    • Dave Chinner's avatar
      xfs: lockdep needs to know about 3 dquot-deep nesting · 89c6c89a
      Dave Chinner authored
      
      
      Michael Semon reported that xfs/299 generated this lockdep warning:
      
      =============================================
      [ INFO: possible recursive locking detected ]
      3.12.0-rc2+ #2 Not tainted
      ---------------------------------------------
      touch/21072 is trying to acquire lock:
       (&xfs_dquot_other_class){+.+...}, at: [<c12902fb>] xfs_trans_dqlockedjoin+0x57/0x64
      
      but task is already holding lock:
       (&xfs_dquot_other_class){+.+...}, at: [<c12902fb>] xfs_trans_dqlockedjoin+0x57/0x64
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&xfs_dquot_other_class);
        lock(&xfs_dquot_other_class);
      
       *** DEADLOCK ***
      
       May be due to missing lock nesting notation
      
      7 locks held by touch/21072:
       #0:  (sb_writers#10){++++.+}, at: [<c11185b6>] mnt_want_write+0x1e/0x3e
       #1:  (&type->i_mutex_dir_key#4){+.+.+.}, at: [<c11078ee>] do_last+0x245/0xe40
       #2:  (sb_internal#2){++++.+}, at: [<c122c9e0>] xfs_trans_alloc+0x1f/0x35
       #3:  (&(&ip->i_lock)->mr_lock/1){+.+...}, at: [<c126cd1b>] xfs_ilock+0x100/0x1f1
       #4:  (&(&ip->i_lock)->mr_lock){++++-.}, at: [<c126cf52>] xfs_ilock_nowait+0x105/0x22f
       #5:  (&dqp->q_qlock){+.+...}, at: [<c12902fb>] xfs_trans_dqlockedjoin+0x57/0x64
       #6:  (&xfs_dquot_other_class){+.+...}, at: [<c12902fb>] xfs_trans_dqlockedjoin+0x57/0x64
      
      The lockdep annotation for dquot lock nesting only understands
      locking for user and "other" dquots, not user, group and quota
      dquots. Fix the annotations to match the locking heirarchy we now
      have.
      
      Reported-by: default avatarMichael L. Semon <mlsemon35@gmail.com>
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarBen Myers <bpm@sgi.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit f112a049)
      89c6c89a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 15c83d26
      Linus Torvalds authored
      Pull fuse bugfixes from Miklos Szeredi:
       "This contains two more fixes by Maxim for writeback/truncate races and
        fixes for RCU walk in fuse_dentry_revalidate()"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: no RCU mode in fuse_access()
        fuse: readdirplus: fix RCU walk
        fuse: don't check_submounts_and_drop() in RCU walk
        fuse: fix fallocate vs. ftruncate race
        fuse: wait for writeback in fuse_file_fallocate()
      15c83d26
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 8e1a2540
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
       "A couple of fixes from the IOMMU side:
      
         - some small fixes for the new ARM-SMMU driver
         - a register offset correction for VT-d
         - add MAINTAINERS entry for drivers/iommu
      
        Overall no really big or intrusive changes"
      
      * tag 'iommu-fixes-v3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        x86/iommu: correct ICS register offset
        MAINTAINERS: add overall IOMMU section
        iommu/arm-smmu: don't enable SMMU device until probing has completed
        iommu/arm-smmu: fix iommu_present() test in init
        iommu/arm-smmu: fix a signedness bug
      8e1a2540
    • Linus Torvalds's avatar
      Merge tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 · 0d45dab6
      Linus Torvalds authored
      Pull ARM64 fixes/updates from Catalin Marinas:
       - Bug-fixes (get_user/put_user, incorrect register width for ASID,
         FPSIMD initialisation)
       - Kconfig clean-up
       - defconfig update
      
      * tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
        arm64: Remove duplicate DEBUG_STACK_USAGE config
        arm64: include VIRTIO_{MMIO,BLK} in defconfig
        arm64: include EXT4 in defconfig
        arm64: fix possible invalid FPSIMD initialization state
        arm64: use correct register width when retrieving ASID
        arm64: avoid multiple evaluation of ptr in get_user/put_user()
      0d45dab6
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 0bfdbf0e
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "Two small fixes for 3.12 only this week.  I have a few more fixes
        pending but those are conceptually more complex so will have to wait
        for a bit longer"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Fix forgotten preempt_enable() when CPU has inclusive pcaches
        MIPS: Alchemy: MTX-1: fix incorrect placement of __initdata tag
      0bfdbf0e
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 413df1cb
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Two simplefb fixes"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/simplefb: Mark framebuffer mem-resources as IORESOURCE_BUSY to avoid bootup warning
        x86/simplefb: Fix overflow causing bogus fall-back
      413df1cb
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7f467cbf
      Linus Torvalds authored
      Pull irq fix from Ingo Molnar:
       "Frederic's minimal fix for hardirq/softirq nesting crashes"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irq: Force hardirq exit's softirq processing on its own stack
      7f467cbf
  3. Oct 04, 2013
    • David Vrabel's avatar
      xen/hvc: allow xenboot console to be used again · a9fbf4d5
      David Vrabel authored
      Commit d0380e6c
      
       (early_printk:
      consolidate random copies of identical code) added in 3.10 introduced
      a check for con->index == -1 in early_console_register().
      
      Initialize index to -1 for the xenboot console so earlyprintk=xen
      works again.
      
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a9fbf4d5
    • Ian Abbott's avatar
      staging: comedi: ni_65xx: (bug fix) confine insn_bits to one subdevice · 677a3156
      Ian Abbott authored
      
      
      The `insn_bits` handler `ni_65xx_dio_insn_bits()` has a `for` loop that
      currently writes (optionally) and reads back up to 5 "ports" consisting
      of 8 channels each.  It reads up to 32 1-bit channels but can only read
      and write a whole port at once - it needs to handle up to 5 ports as the
      first channel it reads might not be aligned on a port boundary.  It
      breaks out of the loop early if the next port it handles is beyond the
      final port on the card.  It also breaks out early on the 5th port in the
      loop if the first channel was aligned.  Unfortunately, it doesn't check
      that the current port it is dealing with belongs to the comedi subdevice
      the `insn_bits` handler is acting on.  That's a bug.
      
      Redo the `for` loop to terminate after the final port belonging to the
      subdevice, changing the loop variable in the process to simplify things
      a bit.  The `for` loop could now try and handle more than 5 ports if the
      subdevice has more than 40 channels, but the test `if (bitshift >= 32)`
      ensures it will break out early after 4 or 5 ports (depending on whether
      the first channel is aligned on a port boundary).  (`bitshift` will be
      between -7 and 7 inclusive on the first iteration, increasing by 8 for
      each subsequent operation.)
      
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Cc: <stable@vger.kernel.org> # 3.10.y 3.11.y 3.12.y
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      677a3156
  4. Oct 03, 2013
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 6d15ee49
      Linus Torvalds authored
      Pull kvm NULL deref fix from Gleb Natapov.
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        Fix NULL dereference in gfn_to_hva_prot()
      6d15ee49
    • Linus Torvalds's avatar
      Merge branch 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · afe05d41
      Linus Torvalds authored
      Pull ARC fix from Vineet Gupta:
       "Chrisitian found/fixed issue with SA_SIGINFO based signal handler
        corrupting the user space registers post after signal handling"
      
      * 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: Fix signal frame management for SA_SIGINFO
      afe05d41
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · c15f5bbc
      Linus Torvalds authored
      Pull powerpc fixes from Ben Herrenschmidt:
       "Here are a few powerpc fixes, all aimed at -stable, found in part
        thanks to the ramping up of a major distro testing and in part thanks
        to the LE guys hitting all sort interesting corner cases.
      
        The most scary are probably the register clobber issues in
        csum_partial_copy_generic(), especially since Anton even had a test
        case for that thing, which didn't manage to hit the bugs :-)
      
        Another highlight is that memory hotplug should work again with these
        fixes.
      
        Oh and the vio modalias one is worse than the cset implies as it
        upsets distro installers, so I've been told at least, which is why I'm
        shooting it to stable"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/tm: Switch out userspace PPR and DSCR sooner
        powerpc/tm: Turn interrupts hard off in tm_reclaim()
        powerpc/perf: Fix handling of FAB events
        powerpc/vio: Fix modalias_show return values
        powerpc/iommu: Use GFP_KERNEL instead of GFP_ATOMIC in iommu_init_table()
        powerpc/sysfs: Disable writing to PURR in guest mode
        powerpc: Restore registers on error exit from csum_partial_copy_generic()
        powerpc: Fix parameter clobber in csum_partial_copy_generic()
        powerpc: Fix memory hotplug with sparse vmemmap
      c15f5bbc
    • Michael Neuling's avatar
      powerpc/tm: Switch out userspace PPR and DSCR sooner · e9bdc3d6
      Michael Neuling authored
      
      
      When we do a treclaim or trecheckpoint we end up running with userspace
      PPR and DSCR values.  Currently we don't do anything special to avoid
      running with user values which could cause a severe performance
      degradation.
      
      This patch moves the PPR and DSCR save and restore around treclaim and
      trecheckpoint so that we run with user values for a much shorter period.
      More care is taken with the PPR as it's impact is greater than the DSCR.
      
      This is similar to user exceptions, where we run HTM_MEDIUM early to
      ensure that we don't run with a userspace PPR values in the kernel.
      
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Cc: <stable@vger.kernel.org> # 3.9+
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e9bdc3d6
    • Michael Neuling's avatar
      powerpc/tm: Turn interrupts hard off in tm_reclaim() · c69e63b0
      Michael Neuling authored
      
      
      We can't take IRQs in tm_reclaim as we might have a bogus r13 and r1.
      
      This turns IRQs hard off in this function.
      
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Cc: <stable@vger.kernel.org> # 3.9+
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c69e63b0
    • Michael Ellerman's avatar
      powerpc/perf: Fix handling of FAB events · a53b27b3
      Michael Ellerman authored
      Commit 4df48999
      
       "Add power8 EBB support" included a bug in the handling
      of the FAB_CRESP_MATCH and FAB_TYPE_MATCH fields.
      
      These values are pulled out of the event code using EVENT_THR_CTL_SHIFT,
      however we were then or'ing that value directly into MMCR1.
      
      This meant we were failing to set the FAB fields correctly, and also
      potentially corrupting the value for PMC4SEL. Leading to no counts for
      the FAB events and incorrect counts for PMC4.
      
      The fix is simply to shift left the FAB value correctly before or'ing it
      with MMCR1.
      
      Reported-by: default avatarSooraj Ravindran Nair <soonair3@in.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Cc: <stable@vger.kernel.org> # 3.10+
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a53b27b3
    • Prarit Bhargava's avatar
      powerpc/vio: Fix modalias_show return values · e82b89a6
      Prarit Bhargava authored
      
      
      modalias_show() should return an empty string on error, not -ENODEV.
      
      This causes the following false and annoying error:
      
      > find /sys/devices -name modalias -print0 | xargs -0 cat >/dev/null
      cat: /sys/devices/vio/4000/modalias: No such device
      cat: /sys/devices/vio/4001/modalias: No such device
      cat: /sys/devices/vio/4002/modalias: No such device
      cat: /sys/devices/vio/4004/modalias: No such device
      cat: /sys/devices/vio/modalias: No such device
      
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org>
      e82b89a6
    • Nishanth Aravamudan's avatar
      powerpc/iommu: Use GFP_KERNEL instead of GFP_ATOMIC in iommu_init_table() · 1cf389df
      Nishanth Aravamudan authored
      
      
      Under heavy (DLPAR?) stress, we tripped this panic() in
      arch/powerpc/kernel/iommu.c::iommu_init_table():
      
      	page = alloc_pages_node(nid, GFP_ATOMIC, get_order(sz));
      	if (!page)
      		panic("iommu_init_table: Can't allocate %ld bytes\n", sz);
      
      Before the panic() we got a page allocation failure for an order-2
      allocation. There appears to be memory free, but perhaps not in the
      ATOMIC context. I looked through all the call-sites of
      iommu_init_table() and didn't see any obvious reason to need an ATOMIC
      allocation. Most call-sites in fact have an explicit GFP_KERNEL
      allocation shortly before the call to iommu_init_table(), indicating we
      are not in an atomic context. There is some indirection for some paths,
      but I didn't see any locks indicating that GFP_KERNEL is inappropriate.
      
      With this change under the same conditions, we have not been able to
      reproduce the panic.
      
      Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org>
      1cf389df
    • Madhavan Srinivasan's avatar
      powerpc/sysfs: Disable writing to PURR in guest mode · d1211af3
      Madhavan Srinivasan authored
      
      
      arch/powerpc/kernel/sysfs.c exports PURR with write permission.
      This may be valid for kernel in phyp mode. But writing to
      the file in guest mode causes crash due to a priviledge violation
      
      Signed-off-by: default avatarMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org>
      d1211af3
    • Paul E. McKenney's avatar
      powerpc: Restore registers on error exit from csum_partial_copy_generic() · 8f21bd00
      Paul E. McKenney authored
      
      
      The csum_partial_copy_generic() function saves the PowerPC non-volatile
      r14, r15, and r16 registers for the main checksum-and-copy loop.
      Unfortunately, it fails to restore them upon error exit from this loop,
      which results in silent corruption of these registers in the presumably
      rare event of an access exception within that loop.
      
      This commit therefore restores these register on error exit from the loop.
      
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8f21bd00
    • Paul E. McKenney's avatar
      powerpc: Fix parameter clobber in csum_partial_copy_generic() · d9813c36
      Paul E. McKenney authored
      
      
      The csum_partial_copy_generic() uses register r7 to adjust the remaining
      bytes to process.  Unfortunately, r7 also holds a parameter, namely the
      address of the flag to set in case of access exceptions while reading
      the source buffer.  Lacking a quantum implementation of PowerPC, this
      commit instead uses register r9 to do the adjusting, leaving r7's
      pointer uncorrupted.
      
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d9813c36
    • Nathan Fontenot's avatar
      powerpc: Fix memory hotplug with sparse vmemmap · f7e3334a
      Nathan Fontenot authored
      Previous commit 46723bfa
      
      ... introduced a new config option
      HAVE_BOOTMEM_INFO_NODE that ended up breaking memory hot-remove for ppc
      when sparse vmemmap is not defined.
      
      This patch defines HAVE_BOOTMEM_INFO_NODE for ppc and adds the call to
      register_page_bootmem_info_node. Without this we get a BUG_ON for memory
      hot remove in put_page_bootmem().
      
      This also adds a stub for register_page_bootmem_memmap to allow ppc to build
      with sparse vmemmap defined. Leaving this as a stub is fine since the same
      vmemmap addresses are also handled in vmemmap_populate and as such are
      properly mapped.
      
      Signed-off-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org> [v3.9+]
      f7e3334a
    • Gleb Natapov's avatar
      Fix NULL dereference in gfn_to_hva_prot() · a2ac07fe
      Gleb Natapov authored
      
      
      gfn_to_memslot() can return NULL or invalid slot. We need to check slot
      validity before accessing it.
      
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
      a2ac07fe
    • David Rheinsberg's avatar
      x86/simplefb: Mark framebuffer mem-resources as IORESOURCE_BUSY to avoid bootup warning · 29d274b8
      David Rheinsberg authored
      
      
      IORESOURCE_BUSY is used to mark temporary driver mem-resources
      instead of global regions. This suppresses warnings if regions
      overlap with a region marked as BUSY.
      
      This was always the case for VESA/VGA/EFI framebuffer regions so
      do the same for simplefb regions. The reason we do this is to
      allow device handover to real GPU drivers like
      i915/radeon/nouveau which get the same regions via PCI BARs.
      
      Maybe at some point we will be able to unregister platform
      devices properly during the handover. In this case the simplefb
      region would get removed before the new region is created.
      However, this is currently not the case and would require rather
      huge changes in remove_conflicting_framebuffers(). Add the BUSY
      marker now and try to eventually rewrite the handover for a next release.
      
      Also see kernel/resource.c for more information:
      
        /*
         * if a resource is "BUSY", it's not a hardware resource
         * but a driver mapping of such a resource; we don't want
         * to warn for those; some drivers legitimately map only
         * partial hardware resources. (example: vesafb)
         */
      
      This suppresses warnings like:
      
        ------------[ cut here ]------------
        WARNING: CPU: 2 PID: 199 at arch/x86/mm/ioremap.c:171 __ioremap_caller+0x2e3/0x390()
        Info: mapping multiple BARs. Your kernel is fine.
        Call Trace:
          dump_stack+0x54/0x8d
          warn_slowpath_common+0x7d/0xa0
          warn_slowpath_fmt+0x4c/0x50
          iomem_map_sanity_check+0xac/0xe0
          __ioremap_caller+0x2e3/0x390
          ioremap_wc+0x32/0x40
          i915_driver_load+0x670/0xf50 [i915]
          ...
      
      Reported-by: default avatarTom Gundersen <teg@jklm.no>
      Tested-by: default avatarTom Gundersen <teg@jklm.no>
      Tested-by: default avatarPavel Roskin <proski@gnu.org>
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Link: http://lkml.kernel.org/r/1380724864-1757-1-git-send-email-dh.herrmann@gmail.com
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      29d274b8
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · e6e7fb1f
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "We have a fairly large batch of fixes this time around, mostly just
        due to various platforms all having a fix or two more than usual.
      
        Worth pointing out are:
      
         - A fix for EDMA on Davinci/OMAP where channel allocation broke with
           the DT conversion.  Due to some miscommunication we didn't
           understand the impact of the breakage, so we were pushing back on
           it for 3.12, but it sounds like it's actually breaking quite a few
           people out there.
      
         - A bunch of fixes for Marvell platforms, some straggling fixes for
           merge window fallout and some fixes for a couple of the platforms
           (Netgear RN102 in particular).
      
         - A fix for a race between multi-cluster power management and cpu
           hotplug on Versatile Express.
      
        And a bunch of other smaller fixes that all add up.
      
        We'll be switching over into stricter regressions-only mode from here
        on out"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
        ARM: multi_v7_defconfig: add SDHCI for i.MX
        bus: mvebu-mbus: Fix optional pcie-mem/io-aperture properties
        ARM: mvebu: add missing DT Mbus ranges and relocate PCIe DT nodes for RN102
        ARM: at91: sam9g45: shutdown ddr1 too when rebooting
        MAINTAINERS: ARM: SIRF: use kernel.org mail box
        MAINTAINERS: ARM: SIRF: add missed drivers into maintain list
        ARM: edma: Fix clearing of unused list for DT DMA resources
        ARM: vexpress: tc2: fix hotplug/idle/kexec race on cluster power down
        ARM: dts: sirf: fix interrupt and dma prop of VIP for prima2 and atlas6
        ARM: dts: sirf: fix the ranges of peri-iobrg of prima2
        ARM: dts: makefile: build atlas6-evb.dtb for ARCH_ATLAS6
        ARM: dts: sirf: fix fifosize, clks, dma channels for UART
        ARM: mvebu: Add DT entry for ReadyNAS 102 to use gpio-poweroff driver
        ARM: mvebu: fix ReadyNAS 102 Power button GPIO to make it active high
        ARM: mach-integrator: Add stub for pci_v3_early_init() for !CONFIG_PCI
        ARM: shmobile: Remove #gpio-ranges-cells DT property
        gpio: rcar: Remove #gpio-range-cells DT property usage
        ARM: shmobile: armadillo: fixup ether pinctrl naming
        ARM: shmobile: Lager: add Micrel KSZ8041 PHY fixup
        ARM: shmobile: update SDHI DT compatibility string to the <unit>-<soc> format
        ...
      e6e7fb1f
    • Christian Ruppert's avatar
      ARC: Fix signal frame management for SA_SIGINFO · 10469350
      Christian Ruppert authored
      
      
      Previously, when a signal was registered with SA_SIGINFO, parameters 2
      and 3 of the signal handler were written to registers r1 and r2 before
      the register set was saved. This led to corruption of these two
      registers after returning from the signal handler (the wrong values were
      restored).
      With this patch, registers are now saved before any parameters are
      passed, thus maintaining the processor state from before signal entry.
      
      Signed-off-by: default avatarChristian Ruppert <christian.ruppert@abilis.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      10469350
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 164a2c58
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
       "Couple of small bug fixes:
      
         1) strlcpy in ldom_reboot() is still not quite right, use sprintf
            instead from Kees Cook.
      
         2) Generic hugetlb interface pte checks should use the widest return
            type, otherwise high bits can get chopped off.
      
         3) Fix build with PCI MSI enabled on 32-bit sparc"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: fix MSI build failure on Sparc32
        sparc: remove deprecated IRQF_DISABLED
        mm: Fix generic hugetlb pte check return type.
        sparc: fix ldom_reboot buffer overflow harder
      164a2c58
    • Olof Johansson's avatar
      Merge tag 'fixes-3.12-2' of git://git.infradead.org/linux-mvebu into fixes · 6a98b2ff
      Olof Johansson authored
      
      
      From Jason Cooper:
      mvebu fixes for v3.12 (round 2)
      
       - mvebu
          - fix ReadyNAS 102 power button (needs to be active high)
          - fix ReadyNAS 102 automated rebooting (prevent hang) by add gpio-poweroff
            node
          - fix booting ReadyNAS 102 by adding MBus ranges and PCIe DT nodes
          - mvebu-mbus: prevent PCIe driver from continuing with corrupted resource
      
      * tag 'fixes-3.12-2' of git://git.infradead.org/linux-mvebu:
        bus: mvebu-mbus: Fix optional pcie-mem/io-aperture properties
        ARM: mvebu: add missing DT Mbus ranges and relocate PCIe DT nodes for RN102
        ARM: mvebu: Add DT entry for ReadyNAS 102 to use gpio-poweroff driver
        ARM: mvebu: fix ReadyNAS 102 Power button GPIO to make it active high
      
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      6a98b2ff