1. 28 Apr, 2012 8 commits
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · a882a4d0
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "For your Friday pull request stack, nothing astounding or shattering
        this week some exynos, some intel, some radeon fixes.  One intel fix
        for a regression somwehere back in 2.6.35 land."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon/kms: use frac fb div on APUs
        drm/radeon: add a missing entry to encoder_names
        drm/i915: handle input/output sdvo timings separately in mode_set
        drm/i915: fix integer overflow in i915_gem_do_execbuffer()
        drm/i915: fix integer overflow in i915_gem_execbuffer2()
        drm/exynos: added missed vm area region mapping type.
        drm/exynos: fixed exynos_drm_gem_map_pages bug.
        drm/exynos: fixed duplicatd memory allocation bug.
        drm/i915: fixup load-detect on enabled, but not active pipe
      a882a4d0
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 78e97a47
      Linus Torvalds authored
      Pull RCU fix from Ingo Molnar.
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        rcu: Permit call_rcu() from CPU_DYING notifiers
      78e97a47
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c28c4851
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar.
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/apic: Use x2apic physical mode based on FADT setting
        x86/mrst: Quiet sparse noise about plain integer as NULL pointer
        x86, intel_cacheinfo: Fix error return code in amd_set_l3_disable_slot()
      c28c4851
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · daae677f
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar.
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched: Fix OOPS when build_sched_domains() percpu allocation fails
        sched: Fix more load-balancing fallout
      daae677f
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 06fc5d3d
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar.
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Fix perf_event_for_each() to use sibling
        perf symbols: Read plt symbols from proper symtab_type binary
        tracing: Fix stacktrace of latency tracers (irqsoff and friends)
        perf tools: Add 'G' and 'H' modifiers to event parsing
        tracing: Fix regression with tracing_on
        perf tools: Drop CROSS_COMPILE from flex and bison calls
        perf report: Fix crash showing warning related to kernel maps
        tracing: Fix build breakage without CONFIG_PERF_EVENTS (again)
      06fc5d3d
    • Linus Torvalds's avatar
      Merge branch 'for-v3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux · f6072452
      Linus Torvalds authored
      Pull build fixes for less mainstream architectures from Paul Gortmaker:
       "These are fixes for frv(1), blackfin(2), powerpc(1) and xtensa(4).
      
        Fortunately the touches are nearly all specific to files just used by
        the arch in question.  The two touches to shared/common files
        [kernel/irq/debug.h and drivers/pci/Makefile] are trivial to assess as
        no risk to anyone.
      
        Half of them relate to xtensa directly.  It was only when I fixed the
        last xtensa issue that I realized that the arch has been broken for a
        significant time, and isn't a specific v3.4 regression.  So if you
        wanted, we could leave xtensa lying bleeding in the street for a
        couple more weeks and queue those for 3.5.  But given they are no risk
        to anyone outside of xtensa, I figured to just leave them in.
      
        If you are OK with taking the xtensa fixes, then please pull to get:
      
         - one last implicit include uncovered by system.h that is in a file
           specific to just one powerpc defconfig.  (I'd sync'd with BenH).
      
         - fix an oversight in the PCI makefile where shared code wasn't being
           compiled for ARCH=frv
      
         - fix a missing include for GPIO in blackfin framebuffer.
      
         - audit and tag endif in blackfin ezkit board file, in order to find
           and fix the misplaced endif masking a block of code.
      
         - fix irq/debug.h choice of temporary macro names to be more internal
           so they don't conflict with names used by xtensa.
      
         - fix a reference to an undeclared local var in xtensa's signal.c
      
         - fix an implicit bug.h usage in xtensa's asm/io.h uncovered by my
           removing bug.h from kernel.h
      
         - fix xtensa to properly indicate it is using asm-generic/hardirq.h
           in order to resolve the link error - undefined ack_bad_irq
      
        The xtensa still fails final link as my latest binutils does something
        evil when ld forward-relocates unlikely() blocks, but in theory people
        who have older/valid toolchains could now use the thing."
      
      * 'for-v3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
        xtensa: fix build fail on undefined ack_bad_irq
        blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c
        blackfin: fix compile error in bfin-lq035q1-fb.c
        pci: frv architecture needs generic setup-bus infrastructure
        irq: hide debug macros so they don't collide with others.
        xtensa: fix build error in xtensa/include/asm/io.h
        xtensa: fix build failure in xtensa/kernel/signal.c
        powerpc: fix system.h fallout in sysdev/scom.c [chroma_defconfig]
      f6072452
    • Linus Torvalds's avatar
      Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh · d7e69bc7
      Linus Torvalds authored
      Pull SuperH fixes from Paul Mundt.
      
      * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
        sh: Fix up tracepoint build fallout from static key introduction.
        sh: Fix error synchronising kernel page tables
      d7e69bc7
    • Linus Torvalds's avatar
      Merge branch 'docs-3.4' of git://git.samba.org/jlayton/linux · 9c687702
      Linus Torvalds authored
      Pull security key doc update from Jeff Layton:
       "Ordinarily, I send my patches through others' trees, but David
        suggested I just send this one to you directly since it's just a
        Documentation/ update"
      
      * 'docs-3.4' of git://git.samba.org/jlayton/linux:
        keys: update the documentation with info about "logon" keys
      9c687702
  2. 27 Apr, 2012 6 commits
  3. 26 Apr, 2012 26 commits
    • Linus Torvalds's avatar
      Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 82b76906
      Linus Torvalds authored
      Pull arch/tile fixes from Chris Metcalf:
       "One change fixes a platform-independent bug about environment var
        handling in the boot command line.  The other is a trivial
        tile-specific bug fix to avoid a link-time warning."
      
      * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        arch/tile: fix a couple of functions that should be __init
        init: fix bug where environment vars can't be passed via boot args
      82b76906
    • Linus Torvalds's avatar
      Merge tag 'ib-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband · ebcf596d
      Linus Torvalds authored
      Pull infiniband fixes from Roland Dreier:
       "A few fixes for regressions introduced in 3.4-rc1:
         - fix memory leak in mlx4
         - fix two problems with new MAD response generation code"
      
      * tag 'ib-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
        IB/mlx4: Fix memory leaks in ib_link_query_port()
        IB/mad: Don't send response for failed MADs
        IB/mad: Set 'D' bit in response for unhandled MADs
      ebcf596d
    • Paul Gortmaker's avatar
      xtensa: fix build fail on undefined ack_bad_irq · 8e12a038
      Paul Gortmaker authored
      Commit e520c410
      
          "xtensa: convert to asm-generic/hardirq.h"
      
      converted over to using the asm-generic parts, but it also
      added the sentinel
      
      	#define ack_bad_irq ack_bad_irq
      
      which tells asm-generic to _not_ use the common ack_bad_irq.
      
      Since e520c410 deleted the duplicated code from the arch specific
      file, we _do_ want the asm-generic one in scope.  So delete
      the trigger define above which hides it.  In doing so we'll
      realize that we've got to delete the almost-duplicate prototype
      as well to avoid "static declaration ... follows non-static".
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      8e12a038
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma · acdf2fc8
      Linus Torvalds authored
      Pull [GIT PULL] slave-dmaengine fixes from Vinod Koul.
      
      * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine/amba-pl08x : reset phychan_hold on terminate all
        dma: pl330: fix a couple of compilation warnings
        dma/ste_dma40: fix erroneous comparison
        dma/ste_dma40: explicitly include regulator consumer header
        dma40: Improve the logic of stopping logical chan
        dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
        dma: mxs-dma: enable channel in device_issue_pending call
        dmaengine: imx-dma: dont complete descriptor for cyclic dma
      acdf2fc8
    • Linus Torvalds's avatar
      Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 2390c0fc
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A workaround for an ASUS laptop and a few ASoC changes; most of the
        commits are tagged for stable, too."
      
      * tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: wm8994: Improve sequencing of AIF channel enables
        ALSA: HDA: Add external mic quirk for Asus Zenbook UX31E
        ASoC: fsi: update for dmaengine prep_slave_sg fallout.
        ASoC: core: Fix card RTD count for deferred probe.
        ASoC: cs42l73: don't use negative array index
        ASoC: dapm: Ensure power gets managed for line widgets
      2390c0fc
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · 65dd4b91
      Linus Torvalds authored
      Pull a watchdog fix from Wim Van Sebroeck:
       "It will fix the size when reading or writing to WD Timer port 0x72 in
        the hpwdt driver."
      
      * git://www.linux-watchdog.org/linux-watchdog:
        hpwdt: Only BYTE reads/writes to WD Timer port 0x72
      65dd4b91
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · aaaf0698
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner.
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tick: Fix the spurious broadcast timer ticks after resume
        tick: Ensure that the broadcast device is initialized
        tick: Fix oneshot broadcast setup really
      aaaf0698
    • Linus Torvalds's avatar
      Merge branch 'akpm' (Andrew's patch-bomb) · 110a5c8b
      Linus Torvalds authored
      Merge fixes from Andrew Morton:
       "13 fixes.  The acerhdf patches aren't (really) fixes.  But they've
        been stuck in my tree for up to two years, sent to Matthew multiple
        times and the developers are unhappy."
      
      * emailed from Andrew Morton <akpm@linux-foundation.org>: (13 patches)
        mm: fix NULL ptr dereference in move_pages
        mm: fix NULL ptr dereference in migrate_pages
        revert "proc: clear_refs: do not clear reserved pages"
        drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled
        arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file
        hugetlbfs: lockdep annotate root inode properly
        acerhdf: lowered default temp fanon/fanoff values
        acerhdf: add support for new hardware
        acerhdf: add support for Aspire 1410 BIOS v1.3314
        fs/buffer.c: remove BUG() in possible but rare condition
        mm: fix up the vmscan stat in vmstat
        epoll: clear the tfile_check_list on -ELOOP
        mm/hugetlb: fix warning in alloc_huge_page/dequeue_huge_page_vma
      110a5c8b
    • Paul Gortmaker's avatar
      blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c · fa83af7e
      Paul Gortmaker authored
      This file has lots and lots of ifdef, around structure decls
      and structure usages.  The failure issue was that we would
      build the BF538-EZKIT_defconfig and get:
      
       arch/blackfin/mach-bf538/boards/ezkit.c:924:3: error: 'bfin_lq035q1_device'
       undeclared here (not in a function)
      
      even though the same ifdef _appeared_ to enable both the struct
      declaration and the code that used it.  Yet cpp was telling us we
      didn't have the struct, but we still had the usage of it.
      
      However, _appeared_ is the operative word.  After marking all the
      anonymous #endif with their parent #ifdef config options, it was
      _then_ clear that there was a misplaced #endif that was hiding
      the struct declaration.
      
      The real guts of the patch boils down to this:
      
      -#endif
      +#endif /* CONFIG_MTD_M25P80 */
      +#endif /* CONFIG_SPI_BFIN5XX */
       [...]
      -#endif  /* spi master and devices */
      
      but since I had to tag the #endif with their respective #ifdef
      options to find this misplaced SPI endif, it would be silly to
      then go and delete them all.  So they stay.
      
      Cc: Sonic Zhang <sonic.zhang@analog.com>
      Cc: Bob Liu <lliubbo@gmail.com>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      fa83af7e
    • Paul Gortmaker's avatar
      blackfin: fix compile error in bfin-lq035q1-fb.c · bc856a62
      Paul Gortmaker authored
      This file has an implicit dependency on GPIO stuff, showing
      up as the following build failure:
      
      drivers/video/bfin-lq035q1-fb.c:369:6: error: 'GPIOF_OUT_INIT_LOW' undeclared
      
      Other more global bfin build issues prevent an automated bisect, but
      it really doesn't matter - simply add in the appropriate header.
      
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      bc856a62
    • Paul Gortmaker's avatar
      pci: frv architecture needs generic setup-bus infrastructure · cd0a2bfb
      Paul Gortmaker authored
      Otherwise we get this link failure for frv's defconfig:
      
         LD      .tmp_vmlinux1
       drivers/built-in.o: In function `pci_assign_resource':
       (.text+0xbf0c): undefined reference to `pci_cardbus_resource_alignment'
       drivers/built-in.o: In function `pci_setup':
       pci.c:(.init.text+0x174): undefined reference to `pci_realloc_get_opt'
       pci.c:(.init.text+0x1a0): undefined reference to `pci_realloc_get_opt'
       make[1]: *** [.tmp_vmlinux1] Error 1
      
      Cc: David Howells <dhowells@redhat.com>
      Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      cd0a2bfb
    • Daniel Vetter's avatar
      drm/i915: handle input/output sdvo timings separately in mode_set · 6651819b
      Daniel Vetter authored
      We seem to have a decent confusion between the output timings and the
      input timings of the sdvo encoder. If I understand the code correctly,
      we use the original mode unchanged for the output timings, safe for
      the lvds case. And we should use the adjusted mode for input timings.
      
      Clarify the situation by adding an explicit output_dtd to the sdvo
      mode_set function and streamline the code-flow by moving the input and
      output mode setting in the sdvo encode together.
      
      Furthermore testing showed that the sdvo input timing needs the
      unadjusted dotclock, the sdvo chip will automatically compute the
      required pixel multiplier to get a dotclock above 100 MHz.
      
      Fix this up when converting a drm mode to an sdvo dtd.
      
      This regression was introduced in
      
      commit c74696b9
      Author: Pavel Roskin <proski@gnu.org>
      Date:   Thu Sep 2 14:46:34 2010 -0400
      
          i915: revert some checks added by commit 32aad86f
      
      particularly the following hunk:
      
      diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
      b/drivers/gpu/drm/i915/intel_sdvo.c
      index 093e914..62d22ae 100644
      --- a/drivers/gpu/drm/i915/intel_sdvo.c
      +++ b/drivers/gpu/drm/i915/intel_sdvo.c
      @@ -1122,11 +1123,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
      
           /* We have tried to get input timing in mode_fixup, and filled into
              adjusted_mode */
      -    if (intel_sdvo->is_tv || intel_sdvo->is_lvds) {
      -        intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
      +    intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
      +    if (intel_sdvo->is_tv || intel_sdvo->is_lvds)
               input_dtd.part2.sdvo_flags = intel_sdvo->sdvo_flags;
      -    } else
      -        intel_sdvo_get_dtd_from_mode(&input_dtd, mode);
      
           /* If it's a TV, we already set the output timing in mode_fixup.
            * Otherwise, the output timing is equal to the input timing.
      
      Due to questions raised in review, below a more elaborate analysis of
      the bug at hand:
      
      Sdvo seems to have two timings, one is the output timing which will be
      sent over whatever is connected on the other side of the sdvo chip (panel,
      hdmi screen, tv), the other is the input timing which will be generated by
      the gmch pipe. It looks like sdvo is expected to scale between the two.
      
      To make things slightly more complicated, we have a bunch of special
      cases:
      - For lvds panel we always use a fixed output timing, namely
        intel_sdvo->sdvo_lvds_fixed_mode, hence that special case.
      - Sdvo has an interface to generate a preferred input timing for a given
        output timing. This is the confusing thing that I've tried to clear up
        with the follow-on patches.
      - A special requirement is that the input pixel clock needs to be between
        100MHz and 200MHz (likely to keep it within the electromechanical design
        range of PCIe), 270MHz on later gen4+. Lower pixel clocks are
        doubled/quadrupled.
      
      The thing this patch tries to fix is that the pipe needs to be
      explicitly instructed to double/quadruple the pixels and needs the
      correspondingly higher pixel clock, whereas the sdvo adaptor seems to
      do that itself and needs the unadjusted pixel clock. For the sdvo
      encode side we already set the pixel mutliplier with a different
      command (0x21).
      
      This patch tries to fix this mess by:
      - Keeping the output mode timing in the unadjusted plain mode, safe
        for the lvds case.
      - Storing the input timing in the adjusted_mode with the adjusted
        pixel clock. This way we don't need to frob around with the core
        crtc mode set code.
      - Fixing up the pixelclock when constructing the sdvo dtd timing
        struct. This is why the first hunk of the patch is an integral part
        of the series.
      - Dropping the is_tv special case because input_dtd is equivalent to
        adjusted_mode after these changes. Follow-up patches clear this up
        further (by simply ripping out intel_sdvo->input_dtd because it's
        not needed).
      
      v2: Extend commit message with an in-depth bug analysis.
      Reported-and-Tested-by: default avatarBernard Blackham <b-linuxgit@largestprime.net>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48157Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      6651819b
    • Mingarelli, Thomas's avatar
      hpwdt: Only BYTE reads/writes to WD Timer port 0x72 · d08c9a33
      Mingarelli, Thomas authored
      This patch is to correct the use of the iLO port 0x72 usage.
      The port 0x72 is a byte size write/read and hpwdt is currently
      writing a WORD.
      
      Signed-off by: Thomas Mingarelli <thomas.mingarelli@hp.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      d08c9a33
    • Michael Ellerman's avatar
      perf: Fix perf_event_for_each() to use sibling · 724b6daa
      Michael Ellerman authored
      In perf_event_for_each() we call a function on an event, and then
      iterate over the siblings of the event.
      
      However we don't call the function on the siblings, we call it
      repeatedly on the original event - it seems "obvious" that we should
      be calling it with sibling as the argument.
      
      It looks like this broke in commit 75f937f2 ("Fix ctx->mutex
      vs counter->mutex inversion").
      
      The only effect of the bug is that the PERF_IOC_FLAG_GROUP parameter
      to the ioctls doesn't work.
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1334109253-31329-1-git-send-email-michael@ellerman.id.auSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      724b6daa
    • he, bo's avatar
      sched: Fix OOPS when build_sched_domains() percpu allocation fails · fb2cf2c6
      he, bo authored
      Under extreme memory used up situations, percpu allocation
      might fail. We hit it when system goes to suspend-to-ram,
      causing a kworker panic:
      
       EIP: [<c124411a>] build_sched_domains+0x23a/0xad0
       Kernel panic - not syncing: Fatal exception
       Pid: 3026, comm: kworker/u:3
       3.0.8-137473-gf42fbef #1
      
       Call Trace:
        [<c18cc4f2>] panic+0x66/0x16c
        [...]
        [<c1244c37>] partition_sched_domains+0x287/0x4b0
        [<c12a77be>] cpuset_update_active_cpus+0x1fe/0x210
        [<c123712d>] cpuset_cpu_inactive+0x1d/0x30
        [...]
      
      With this fix applied build_sched_domains() will return -ENOMEM and
      the suspend attempt fails.
      Signed-off-by: default avatarhe, bo <bo.he@intel.com>
      Reviewed-by: default avatarZhang, Yanmin <yanmin.zhang@intel.com>
      Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: <stable@kernel.org>
      Link: http://lkml.kernel.org/r/1335355161.5892.17.camel@hebo
      [ So, we fail to deallocate a CPU because we cannot allocate RAM :-/
        I don't like that kind of sad behavior but nevertheless it should
        not crash under high memory load. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      fb2cf2c6
    • Peter Zijlstra's avatar
      sched: Fix more load-balancing fallout · eb95308e
      Peter Zijlstra authored
      Commits 367456c7 ("sched: Ditch per cgroup task lists for
      load-balancing") and 5d6523eb ("sched: Fix load-balance wreckage")
      left some more wreckage.
      
      By setting loop_max unconditionally to ->nr_running load-balancing
      could take a lot of time on very long runqueues (hackbench!). So keep
      the sysctl as max limit of the amount of tasks we'll iterate.
      
      Furthermore, the min load filter for migration completely fails with
      cgroups since inequality in per-cpu state can easily lead to such
      small loads :/
      
      Furthermore the change to add new tasks to the tail of the queue
      instead of the head seems to have some effect.. not quite sure I
      understand why.
      
      Combined these fixes solve the huge hackbench regression reported by
      Tim when hackbench is ran in a cgroup.
      Reported-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
      Acked-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/1335365763.28150.267.camel@twins
      [ got rid of the CONFIG_PREEMPT tuning and made small readability edits ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      eb95308e
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.4-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 2300fd67
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       - Fix NFSv4 infinite loops on open(O_TRUNC)
       - Fix an Oops and an infinite loop in the NFSv4 flock code
       - Don't register the PipeFS filesystem until it has been set up
       - Fix an Oops in nfs_try_to_update_request
       - Don't reuse NFSv4 open owners: fixes a bad sequence id storm.
      
      * tag 'nfs-for-3.4-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4: Keep dropped state owners on the LRU list for a while
        NFSv4: Ensure that we don't drop a state owner more than once
        NFSv4: Ensure we do not reuse open owner names
        nfs: Enclose hostname in brackets when needed in nfs_do_root_mount
        NFS: put open context on error in nfs_flush_multi
        NFS: put open context on error in nfs_pagein_multi
        NFSv4: Fix open(O_TRUNC) and ftruncate() error handling
        NFSv4: Ensure that we check lock exclusive/shared type against open modes
        NFSv4: Ensure that the LOCK code sets exception->inode
        NFS: check for req==NULL in nfs_try_to_update_request cleanup
        SUNRPC: register PipeFS file system after pernet sybsystem
      2300fd67
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 86ec090e
      Linus Torvalds authored
      Pull x86 fixes from H. Peter Anvin.
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x32, siginfo: Provide proper overrides for x32 siginfo_t
        asm-generic: Allow overriding clock_t and add attributes to siginfo_t
        x32: Check __ILP32__ instead of __LP64__ for x32
        x86, acpi: Call acpi_enter_sleep_state via an asmlinkage C function from assembler
        ACPI: Convert wake_sleep_flags to a value instead of function
        x86, apic: APIC code touches invalid MSR on P5 class machines
        i387: ptrace breaks the lazy-fpu-restore logic
        x86/platform: Remove incorrect error message in x86_default_fixup_cpu_id()
        x86, efi: Add dedicated EFI stub entry point
        x86/amd: Remove broken links from comment and kernel message
        x86, microcode: Ensure that module is only loaded on supported AMD CPUs
        x86, microcode: Fix sysfs warning during module unload on unsupported CPUs
      86ec090e
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 · bdd4f709
      Linus Torvalds authored
      Pull x86 platform driver fixes from Matthew Garrett:
       "One annoyance fix (make intel_ips stop complaining unnecessarily) and
        one oops fix (unterminated list in dell-laptop).  Both have been in
        -next for a while with no complaints."
      
      * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
        dell-laptop: Terminate quirks list properly
        intel_ips: Hush the i915 symbols message
      bdd4f709
    • Sasha Levin's avatar
      mm: fix NULL ptr dereference in move_pages · 6e8b09ea
      Sasha Levin authored
      Commit 3268c63e ("mm: fix move/migrate_pages() race on task struct") has
      added an odd construct where 'mm' is checked for being NULL, and if it is,
      it would get dereferenced anyways by mput()ing it.
      Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
      Cc: Dave Hansen <dave@linux.vnet.ibm.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Hugh Dickins <hughd@google.com>
      Acked-by: default avatarChristoph Lameter <cl@linux.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6e8b09ea
    • Sasha Levin's avatar
      mm: fix NULL ptr dereference in migrate_pages · f2a9ef88
      Sasha Levin authored
      Commit 3268c63e ("mm: fix move/migrate_pages() race on task struct") has
      added an odd construct where 'mm' is checked for being NULL, and if it is,
      it would get dereferenced anyways by mput()ing it.
      
      This would lead to the following NULL ptr deref and BUG() when calling
      migrate_pages() with a pid that has no mm struct:
      
      [25904.193704] BUG: unable to handle kernel NULL pointer dereference at 0000000000000050
      [25904.194235] IP: [<ffffffff810b0de7>] mmput+0x27/0xf0
      [25904.194235] PGD 773e6067 PUD 77da0067 PMD 0
      [25904.194235] Oops: 0002 [#1] PREEMPT SMP
      [25904.194235] CPU 2
      [25904.194235] Pid: 31608, comm: trinity Tainted: G        W    3.4.0-rc2-next-20120412-sasha #69
      [25904.194235] RIP: 0010:[<ffffffff810b0de7>]  [<ffffffff810b0de7>] mmput+0x27/0xf0
      [25904.194235] RSP: 0018:ffff880077d49e08  EFLAGS: 00010202
      [25904.194235] RAX: 0000000000000286 RBX: 0000000000000000 RCX: 0000000000000000
      [25904.194235] RDX: ffff880075ef8000 RSI: 000000000000023d RDI: 0000000000000286
      [25904.194235] RBP: ffff880077d49e18 R08: 0000000000000001 R09: 0000000000000001
      [25904.194235] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
      [25904.194235] R13: 00000000ffffffea R14: ffff880034287740 R15: ffff8800218d3010
      [25904.194235] FS:  00007fc8b244c700(0000) GS:ffff880029800000(0000) knlGS:0000000000000000
      [25904.194235] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [25904.194235] CR2: 0000000000000050 CR3: 00000000767c6000 CR4: 00000000000406e0
      [25904.194235] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [25904.194235] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [25904.194235] Process trinity (pid: 31608, threadinfo ffff880077d48000, task ffff880075ef8000)
      [25904.194235] Stack:
      [25904.194235]  ffff8800342876c0 0000000000000000 ffff880077d49f78 ffffffff811b8020
      [25904.194235]  ffffffff811b7d91 ffff880075ef8000 ffff88002256d200 0000000000000000
      [25904.194235]  00000000000003ff 0000000000000000 0000000000000000 0000000000000000
      [25904.194235] Call Trace:
      [25904.194235]  [<ffffffff811b8020>] sys_migrate_pages+0x340/0x3a0
      [25904.194235]  [<ffffffff811b7d91>] ? sys_migrate_pages+0xb1/0x3a0
      [25904.194235]  [<ffffffff8266cbb9>] system_call_fastpath+0x16/0x1b
      [25904.194235] Code: c9 c3 66 90 55 31 d2 48 89 e5 be 3d 02 00 00 48 83 ec 10 48 89 1c 24 4c 89 64 24 08 48 89 fb 48 c7 c7 cf 0e e1 82 e8 69 18 03 00 <f0> ff 4b 50 0f 94 c0 84 c0 0f 84 aa 00 00 00 48 89 df e8 72 f1
      [25904.194235] RIP  [<ffffffff810b0de7>] mmput+0x27/0xf0
      [25904.194235]  RSP <ffff880077d49e08>
      [25904.194235] CR2: 0000000000000050
      [25904.348999] ---[ end trace a307b3ed40206b4b ]---
      Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
      Cc: Dave Hansen <dave@linux.vnet.ibm.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Christoph Lameter <cl@linux.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f2a9ef88
    • Will Deacon's avatar
      revert "proc: clear_refs: do not clear reserved pages" · 63f61a6f
      Will Deacon authored
      Revert commit 85e72aa5 ("proc: clear_refs: do not clear reserved
      pages"), which was a quick fix suitable for -stable until ARM had been
      moved over to the gate_vma mechanism:
      
      https://lkml.org/lkml/2012/1/14/55
      
      With commit f9d4861f ("ARM: 7294/1: vectors: use gate_vma for vectors user
      mapping"), ARM does now use the gate_vma, so the PageReserved check can be
      removed from the proc code.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Nicolas Pitre <nico@linaro.org>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      63f61a6f
    • Anatolij Gustschin's avatar
      drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled · 3f5ec5e0
      Anatolij Gustschin authored
      Add struct bin_attribute initialization to fix the following bug:
      
      rtc-ds1307 3-0068: rtc core: registered ds1307 as rtc0
      BUG: key cfb14fcc not in .data!
      ------------[ cut here ]------------
      WARNING: at kernel/lockdep.c:2986 sysfs_add_file_mode+0x84/0xdc()
      Modules linked in:
      [<c0018d94>] (unwind_backtrace+0x0/0xf8) from [<c0031f7c>] (warn_slowpath_common+0x4c/0x64)
      [<c0031f7c>] (warn_slowpath_common+0x4c/0x64) from [<c0031fb0>] (warn_slowpath_null+0x1c/0x24)
      [<c0031fb0>] (warn_slowpath_null+0x1c/0x24) from [<c012f7ac>] (sysfs_add_file_mode+0x84/0xdc)
      [<c012f7ac>] (sysfs_add_file_mode+0x84/0xdc) from [<c04b11e4>] (ds1307_probe+0x5e4/0x6ac)
      [<c04b11e4>] (ds1307_probe+0x5e4/0x6ac) from [<c036e600>] (i2c_device_probe+0xdc/0x108)
      [<c036e600>] (i2c_device_probe+0xdc/0x108) from [<c02cdf84>] (driver_probe_device+0x90/0x210)
      [<c02cdf84>] (driver_probe_device+0x90/0x210) from [<c02ce198>] (__driver_attach+0x94/0x98)
      [<c02ce198>] (__driver_attach+0x94/0x98) from [<c02cc824>] (bus_for_each_dev+0x50/0x7c)
      [<c02cc824>] (bus_for_each_dev+0x50/0x7c) from [<c02cd780>] (bus_add_driver+0x184/0x244)
      [<c02cd780>] (bus_add_driver+0x184/0x244) from [<c02ce43c>] (driver_register+0x78/0x12c)
      [<c02ce43c>] (driver_register+0x78/0x12c) from [<c03701ac>] (i2c_register_driver+0x2c/0xb4)
      [<c03701ac>] (i2c_register_driver+0x2c/0xb4) from [<c0008798>] (do_one_initcall+0x34/0x178)
      [<c0008798>] (do_one_initcall+0x34/0x178) from [<c0691860>] (kernel_init+0xdc/0x194)
      [<c0691860>] (kernel_init+0xdc/0x194) from [<c0013cf0>] (kernel_thread_exit+0x0/0x8)
      
      Since commit 6992f533 ("sysfs: Use one lockdep class per sysfs
      attribute") this initialization is required.
      Reported-by: default avatarStefano Babic <sbabic@denx.de>
      Tested-by: default avatarStefano Babic <sbabic@denx.de>
      Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3f5ec5e0
    • Vasiliy Kulikov's avatar
      arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file · db7b122c
      Vasiliy Kulikov authored
      Don't allow everybody to use a modem.
      Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
      Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      db7b122c
    • Aneesh Kumar K.V's avatar
      hugetlbfs: lockdep annotate root inode properly · 65ed7601
      Aneesh Kumar K.V authored
      This fixes the below reported false lockdep warning.  e096d0c7
      ("lockdep: Add helper function for dir vs file i_mutex annotation") added
      a similar annotation for every other inode in hugetlbfs but missed the
      root inode because it was allocated by a separate function.
      
      For HugeTLB fs we allow taking i_mutex in mmap.  HugeTLB fs doesn't
      support file write and its file read callback is modified in a05b0855
      ("hugetlbfs: avoid taking i_mutex from hugetlbfs_read()") to not take
      i_mutex.  Hence for HugeTLB fs with regular files we really don't take
      i_mutex with mmap_sem held.
      
       ======================================================
       [ INFO: possible circular locking dependency detected ]
       3.4.0-rc1+ #322 Not tainted
       -------------------------------------------------------
       bash/1572 is trying to acquire lock:
        (&mm->mmap_sem){++++++}, at: [<ffffffff810f1618>] might_fault+0x40/0x90
      
       but task is already holding lock:
        (&sb->s_type->i_mutex_key#12){+.+.+.}, at: [<ffffffff81125f88>] vfs_readdir+0x56/0xa8
      
       which lock already depends on the new lock.
      
       the existing dependency chain (in reverse order) is:
      
       -> #1 (&sb->s_type->i_mutex_key#12){+.+.+.}:
              [<ffffffff810a09e5>] lock_acquire+0xd5/0xfa
              [<ffffffff816a2f5e>] __mutex_lock_common+0x48/0x350
              [<ffffffff816a3325>] mutex_lock_nested+0x2a/0x31
              [<ffffffff811fb8e1>] hugetlbfs_file_mmap+0x7d/0x104
              [<ffffffff810f859a>] mmap_region+0x272/0x47d
              [<ffffffff810f8a39>] do_mmap_pgoff+0x294/0x2ee
              [<ffffffff810f8b65>] sys_mmap_pgoff+0xd2/0x10e
              [<ffffffff8103d19e>] sys_mmap+0x1d/0x1f
              [<ffffffff816a5922>] system_call_fastpath+0x16/0x1b
      
       -> #0 (&mm->mmap_sem){++++++}:
              [<ffffffff810a0256>] __lock_acquire+0xa81/0xd75
              [<ffffffff810a09e5>] lock_acquire+0xd5/0xfa
              [<ffffffff810f1645>] might_fault+0x6d/0x90
              [<ffffffff81125d62>] filldir+0x6a/0xc2
              [<ffffffff81133a83>] dcache_readdir+0x5c/0x222
              [<ffffffff81125fa8>] vfs_readdir+0x76/0xa8
              [<ffffffff811260b6>] sys_getdents+0x79/0xc9
              [<ffffffff816a5922>] system_call_fastpath+0x16/0x1b
      
       other info that might help us debug this:
      
        Possible unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(&sb->s_type->i_mutex_key#12);
                                      lock(&mm->mmap_sem);
                                      lock(&sb->s_type->i_mutex_key#12);
         lock(&mm->mmap_sem);
      
        *** DEADLOCK ***
      
       1 lock held by bash/1572:
        #0:  (&sb->s_type->i_mutex_key#12){+.+.+.}, at: [<ffffffff81125f88>] vfs_readdir+0x56/0xa8
      
       stack backtrace:
       Pid: 1572, comm: bash Not tainted 3.4.0-rc1+ #322
       Call Trace:
        [<ffffffff81699a3c>] print_circular_bug+0x1f8/0x209
        [<ffffffff810a0256>] __lock_acquire+0xa81/0xd75
        [<ffffffff810f38aa>] ? handle_pte_fault+0x5ff/0x614
        [<ffffffff8109e622>] ? mark_lock+0x2d/0x258
        [<ffffffff810f1618>] ? might_fault+0x40/0x90
        [<ffffffff810a09e5>] lock_acquire+0xd5/0xfa
        [<ffffffff810f1618>] ? might_fault+0x40/0x90
        [<ffffffff816a3249>] ? __mutex_lock_common+0x333/0x350
        [<ffffffff810f1645>] might_fault+0x6d/0x90
        [<ffffffff810f1618>] ? might_fault+0x40/0x90
        [<ffffffff81125d62>] filldir+0x6a/0xc2
        [<ffffffff81133a83>] dcache_readdir+0x5c/0x222
        [<ffffffff81125cf8>] ? sys_ioctl+0x74/0x74
        [<ffffffff81125cf8>] ? sys_ioctl+0x74/0x74
        [<ffffffff81125cf8>] ? sys_ioctl+0x74/0x74
        [<ffffffff81125fa8>] vfs_readdir+0x76/0xa8
        [<ffffffff811260b6>] sys_getdents+0x79/0xc9
        [<ffffffff816a5922>] system_call_fastpath+0x16/0x1b
      Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      65ed7601
    • Peter Feuerer's avatar
      acerhdf: lowered default temp fanon/fanoff values · 351963bb
      Peter Feuerer authored
      Due to new supported hardware, of which the actual temperature limits of
      processor, harddisk and other components are unknown, it feels safer with
      lower fanon / fanoff settings.
      
      It won't change much for most people, already using acerhdf, as they use
      their own fanon/fanoff variable settings when loading the module.
      
      Furthermore seems like kernel and userspace tools have been improved to
      work more efficient and netbooks don't get so hot anymore.
      Signed-off-by: default avatarPeter Feuerer <peter@piie.net>
      Acked-by: default avatarBorislav Petkov <petkovbb@gmail.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      351963bb