Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 18, 2011
  1. @torvalds

    Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

    torvalds authored
    * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
      block: don't delay blk_run_queue_async
      scsi: remove performance regression due to async queue run
      blk-throttle: Use task_subsys_state() to determine a task's blkio_cgroup
      block: rescan partitions on invalidated devices on -ENOMEDIA too
      cdrom: always check_disk_change() on open
      block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers
  2. block: don't delay blk_run_queue_async

    Shaohua Li authored Jens Axboe committed
    Let's check a scenario:
    1. blk_delay_queue(q, SCSI_QUEUE_DELAY);
    2. blk_run_queue_async();
    the second one will became a noop, because q->delay_work already has
    WORK_STRUCT_PENDING_BIT set, so the delayed work will still run after
    SCSI_QUEUE_DELAY. But blk_run_queue_async actually hopes the delayed
    work runs immediately.
    
    Fix this by doing a cancel on potentially pending delayed work
    before queuing an immediate run of the workqueue.
    
    Signed-off-by: Shaohua Li <shaohua.li@intel.com>
    Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  3. @torvalds

    Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/ke…

    torvalds authored
    …rnel/git/mchehab/linux-2.6
    
    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
      [media] V4L: soc-camera: regression fix: calculate .sizeimage in soc_camera.c
      [media] v4l2-subdev: fix broken subdev control enumeration
      [media] Fix cx88 remote control input
      [media] v4l: Release module if subdev registration fails
  4. @torvalds

    Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/li…

    torvalds authored
    …nux/kernel/git/tip/linux-2.6-tip
    
    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
      x86, AMD: Fix ARAT feature setting again
      Revert "x86, AMD: Fix APIC timer erratum 400 affecting K8 Rev.A-E processors"
      x86, apic: Fix spurious error interrupts triggering on all non-boot APs
      x86, mce, AMD: Fix leaving freed data in a list
      x86: Fix UV BAU for non-consecutive nasids
      x86, UV: Fix NMI handler for UV platforms
  5. @torvalds

    Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/l…

    torvalds authored
    …inux/kernel/git/tip/linux-2.6-tip
    
    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
      perf evlist: Fix per thread mmap setup
      perf tools: Honour the cpu list parameter when also monitoring a thread list
      kprobes, x86: Disable irqs during optimized callback
  6. @torvalds

    Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

    torvalds authored
    * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
      cifs: fix cifsConvertToUCS() for the mapchars case
      cifs: add fallback in is_path_accessible for old servers
  7. @torvalds

    procfs: add stub for proc_mkdir_mode()

    Randy Dunlap authored torvalds committed
    Provide a stub for proc_mkdir_mode() when CONFIG_PROC_FS is not
    enabled, just like the stub for proc_mkdir().
    
    Fixes this linux-next build error:
    
      drivers/net/wireless/airo.c:4504: error: implicit declaration of function 'proc_mkdir_mode'
    
    Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: "John W. Linville" <linville@tuxdriver.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  8. @richardweinberger @torvalds

    um: fix abort

    richardweinberger authored torvalds committed
    os_dump_core() uses abort() to terminate UML in case of an fatal error.
    
    glibc's abort() calls raise(SIGABRT) which makes use of tgkill().
    tgkill() has no effect within UML's kernel threads because they are not
    pthreads.  As fallback abort() executes an invalid instruction to
    terminate the process.  Therefore UML gets killed by SIGSEGV and leaves a
    ugly log entry in the host's kernel ring buffer.
    
    To get rid of this we use our own abort routine.
    
    Signed-off-by: Richard Weinberger <richard@nod.at>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  9. @torvalds

    memcg: fix zone congestion

    KAMEZAWA Hiroyuki authored torvalds committed
    ZONE_CONGESTED should be a state of global memory reclaim.  If not, a busy
    memcg sets this and give unnecessary throttoling in wait_iff_congested()
    against memory recalim in other contexts.  This makes system performance
    bad.
    
    I'll think about "memcg is congested!" flag is required or not, later.
    But this fix is required first.
    
    Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
    Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
    Acked-by: Ying Han <yinghan@google.com>
    Cc: Balbir Singh <balbir@in.ibm.com>
    Cc: Johannes Weiner <jweiner@redhat.com>
    Cc: Michal Hocko <mhocko@suse.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  10. @AxelLin @torvalds

    drivers/leds/leds-lm3530.c: add MODULE_DEVICE_TABLE

    AxelLin authored torvalds committed
    Adding the necessary MODULE_DEVICE_TABLE() information allows the driver
    to be automatically loaded by udev.
    
    Signed-off-by: Axel Lin <axel.lin@gmail.com>
    Cc: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
    Cc: Richard Purdie <rpurdie@rpsys.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  11. @abou9 @torvalds

    rapidio: fix default routing initialization

    abou9 authored torvalds committed
    Fix switch initialization to ensure that all switches have default routing
    disabled.  This guarantees that no unexpected RapidIO packets arrive to
    the default port set by reset and there is no default routing destination
    until it is properly configured by software.
    
    This update also unifies handling of unmapped destinations by tsi57x, IDT
    Gen1 and IDT Gen2 switches.
    
    Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
    Cc: Kumar Gala <galak@kernel.crashing.org>
    Cc: Matt Porter <mporter@kernel.crashing.org>
    Cc: Li Yang <leoli@freescale.com>
    Cc: Thomas Moll <thomas.moll@sysgo.com>
    Cc: <stable@kernel.org>		[2.6.37+]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Commits on May 17, 2011
  1. cifs: fix cifsConvertToUCS() for the mapchars case

    Jeff Layton authored Steve French committed
    As Metze pointed out, commit 84cdf74 broke mapchars option:
    
        Commit "cifs: fix unaligned accesses in cifsConvertToUCS"
        (84cdf74) does multiple steps
        in just one commit (moving the function and changing it without
        testing).
    
        put_unaligned_le16(temp, &target[j]); is never called for any
        codepoint the goes via the 'default' switch statement. As a result
        we put just zero (or maybe uninitialized) bytes into the target
        buffer.
    
    His proposed patch looks correct, but doesn't apply to the current head
    of the tree. This patch should also fix it.
    
    Cc: <stable@kernel.org> # .38.x: 581ade4: cifs: clean up various nits in unicode routines (try #2)
    Reported-by: Stefan Metzmacher <metze@samba.org>
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <sfrench@us.ibm.com>
  2. cifs: add fallback in is_path_accessible for old servers

    Jeff Layton authored Steve French committed
    The is_path_accessible check uses a QPathInfo call, which isn't
    supported by ancient win9x era servers. Fall back to an older
    SMBQueryInfo call if it fails with the magic error codes.
    
    Cc: stable@kernel.org
    Reported-and-Tested-by: Sandro Bonazzola <sandro.bonazzola@gmail.com>
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <sfrench@us.ibm.com>
  3. @torvalds

    Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm…

    torvalds authored
    …/linux/kernel/git/tip/linux-2.6-tip
    
    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
      tick: Clear broadcast active bit when switching to oneshot
      rtc: mc13xxx: Don't call rtc_device_register while holding lock
      rtc: rp5c01: Initialize drvdata before registering device
      rtc: pcap: Initialize drvdata before registering device
      rtc: msm6242: Initialize drvdata before registering device
      rtc: max8998: Initialize drvdata before registering device
      rtc: max8925: Initialize drvdata before registering device
      rtc: m41t80: Initialize clientdata before registering device
      rtc: ds1286: Initialize drvdata before registering device
      rtc: ep93xx: Initialize drvdata before registering device
      rtc: davinci: Initialize drvdata before registering device
      rtc: mxc: Initialize drvdata before registering device
      clocksource: Install completely before selecting
  4. x86, AMD: Fix ARAT feature setting again

    Borislav Petkov authored Ingo Molnar committed
    Trying to enable the local APIC timer on early K8 revisions
    uncovers a number of other issues with it, in conjunction with
    the C1E enter path on AMD. Fixing those causes much more churn
    and troubles than the benefit of using that timer brings so
    don't enable it on K8 at all, falling back to the original
    functionality the kernel had wrt to that.
    
    Reported-and-bisected-by: Nick Bowler <nbowler@elliptictech.com>
    Cc: Boris Ostrovsky <Boris.Ostrovsky@amd.com>
    Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
    Cc: Greg Kroah-Hartman <greg@kroah.com>
    Cc: Hans Rosenfeld <hans.rosenfeld@amd.com>
    Cc: Nick Bowler <nbowler@elliptictech.com>
    Cc: Joerg-Volker-Peetz <jvpeetz@web.de>
    Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
    Link: http://lkml.kernel.org/r/1305636919-31165-3-git-send-email-bp@amd64.org
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
  5. Revert "x86, AMD: Fix APIC timer erratum 400 affecting K8 Rev.A-E pro…

    Borislav Petkov authored Ingo Molnar committed
    …cessors"
    
    This reverts commit e20a2d2, as it crashes
    certain boxes with specific AMD CPU models.
    
    Moving the lower endpoint of the Erratum 400 check to accomodate
    earlier K8 revisions (A-E) opens a can of worms which is simply
    not worth to fix properly by tweaking the errata checking
    framework:
    
    * missing IntPenging MSR on revisions < CG cause #GP:
    
    http://marc.info/?l=linux-kernel&m=130541471818831
    
    * makes earlier revisions use the LAPIC timer instead of the C1E
    idle routine which switches to HPET, thus not waking up in
    deeper C-states:
    
    http://lkml.org/lkml/2011/4/24/20
    
    Therefore, leave the original boundary starting with K8-revF.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
  6. scsi: remove performance regression due to async queue run

    Jens Axboe authored
    Commit c21e6be removed our queue request_fn re-enter
    protection, and defaulted to always running the queues from
    kblockd to be safe. This was a known potential slow down,
    but should be safe.
    
    Unfortunately this is causing big performance regressions for
    some, so we need to improve this logic. Looking into the details
    of the re-enter, the real issue is on requeue of requests.
    
    Requeue of requests upon seeing a BUSY condition from the device
    ends up re-running the queue, causing traces like this:
    
    scsi_request_fn()
            scsi_dispatch_cmd()
                    scsi_queue_insert()
                            __scsi_queue_insert()
                                    scsi_run_queue()
    					scsi_request_fn()
    						...
    
    potentially causing the issue we want to avoid. So special
    case the requeue re-run of the queue, but improve it to offload
    the entire run of local queue and starved queue from a single
    workqueue callback. This is a lot better than potentially
    kicking off a workqueue run for each device seen.
    
    This also fixes the issue of the local device going into recursion,
    since the above mentioned commit never moved that queue run out
    of line.
    
    Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  7. @torvalds

    Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

    torvalds authored
    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
      net: Change netdev_fix_features messages loglevel
      vmxnet3: Fix inconsistent LRO state after initialization
      sfc: Fix oops in register dump after mapping change
      IPVS: fix netns if reading ip_vs_* procfs entries
      bridge: fix forwarding of IPv6
  8. @torvalds

    Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…

    torvalds authored
    …/git/cjb/mmc
    
    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
      Revert "mmc: fix a race between card-detect rescan and clock-gate work instances"
  9. @torvalds

    mm: fix kernel-doc warning in page_alloc.c

    Randy Dunlap authored torvalds committed
    Fix new kernel-doc warning in mm/page_alloc.c:
    
      Warning(mm/page_alloc.c:2370): No description found for parameter 'nid'
    
    Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  10. @torvalds

    PCI: Clear bridge resource flags if requested size is 0

    Yinghai Lu authored torvalds committed
    During pci remove/rescan testing found:
    
      pci 0000:c0:03.0: PCI bridge to [bus c4-c9]
      pci 0000:c0:03.0:   bridge window [io  0x1000-0x0fff]
      pci 0000:c0:03.0:   bridge window [mem 0xf0000000-0xf00fffff]
      pci 0000:c0:03.0:   bridge window [mem 0xfc180000000-0xfc197ffffff 64bit pref]
      pci 0000:c0:03.0: device not available (can't reserve [io  0x1000-0x0fff])
      pci 0000:c0:03.0: Error enabling bridge (-22), continuing
      pci 0000:c0:03.0: enabling bus mastering
      pci 0000:c0:03.0: setting latency timer to 64
      pcieport 0000:c0:03.0: device not available (can't reserve [io  0x1000-0x0fff])
      pcieport: probe of 0000:c0:03.0 failed with error -22
    
    This bug was caused by commit c8adf9a ("PCI: pre-allocate
    additional resources to devices only after successful allocation of
    essential resources.")
    
    After that commit, pci_hotplug_io_size is changed to additional_io_size
    from minium size.  So it will not go through resource_size(res) != 0
    path, and will not be reset.
    
    The root cause is: pci_bridge_check_ranges will set RESOURCE_IO flag for
    pci bridge, and later if children do not need IO resource.  those bridge
    resources will not need to be allocated.  but flags is still there.
    that will confuse the the pci_enable_bridges later.
    
    related code:
    
       static void assign_requested_resources_sorted(struct resource_list *head,
                                        struct resource_list_x *fail_head)
       {
               struct resource *res;
               struct resource_list *list;
               int idx;
    
               for (list = head->next; list; list = list->next) {
                       res = list->res;
                       idx = res - &list->dev->resource[0];
                       if (resource_size(res) && pci_assign_resource(list->dev, idx)) {
       ...
                               reset_resource(res);
                       }
               }
       }
    
    At last, We have to clear the flags in pbus_size_mem/io when requested
    size == 0 and !add_head.  becasue this case it will not go through
    adjust_resources_sorted().
    
    Just make size1 = size0 when !add_head. it will make flags get cleared.
    
    At the same time when requested size == 0, add_size != 0, will still
    have in head and add_list.  because we do not clear the flags for it.
    
    After this, we will get right result:
    
      pci 0000:c0:03.0: PCI bridge to [bus c4-c9]
      pci 0000:c0:03.0:   bridge window [io  disabled]
      pci 0000:c0:03.0:   bridge window [mem 0xf0000000-0xf00fffff]
      pci 0000:c0:03.0:   bridge window [mem 0xfc180000000-0xfc197ffffff 64bit pref]
      pci 0000:c0:03.0: enabling bus mastering
      pci 0000:c0:03.0: setting latency timer to 64
      pcieport 0000:c0:03.0: setting latency timer to 64
      pcieport 0000:c0:03.0: irq 160 for MSI/MSI-X
      pcieport 0000:c0:03.0: Signaling PME through PCIe PME interrupt
      pci 0000:c4:00.0: Signaling PME through PCIe PME interrupt
      pcie_pme 0000:c0:03.0:pcie01: service driver pcie_pme loaded
      aer 0000:c0:03.0:pcie02: service driver aer loaded
      pciehp 0000:c0:03.0:pcie04: Hotplug Controller:
    
    v3: more simple fix. also fix one typo in pbus_size_mem
    
    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    Reviewed-by: Ram Pai <linuxram@us.ibm.com>
    Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
    Cc: Bjorn Helgaas <bhelgaas@google.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Commits on May 16, 2011
  1. tick: Clear broadcast active bit when switching to oneshot

    Thomas Gleixner authored
    The first cpu which switches from periodic to oneshot mode switches
    also the broadcast device into oneshot mode. The broadcast device
    serves as a backup for per cpu timers which stop in deeper
    C-states. To avoid starvation of the cpus which might be in idle and
    depend on broadcast mode it marks the other cpus as broadcast active
    and sets the brodcast expiry value of those cpus to the next tick.
    
    The oneshot mode broadcast bit for the other cpus is sticky and gets
    only cleared when those cpus exit idle. If a cpu was not idle while
    the bit got set in consequence the bit prevents that the broadcast
    device is armed on behalf of that cpu when it enters idle for the
    first time after it switched to oneshot mode.
    
    In most cases that goes unnoticed as one of the other cpus has usually
    a timer pending which keeps the broadcast device armed with a short
    timeout. Now if the only cpu which has a short timer active has the
    bit set then the broadcast device will not be armed on behalf of that
    cpu and will fire way after the expected timer expiry. In the case of
    Christians bug report it took ~145 seconds which is about half of the
    wrap around time of HPET (the limit for that device) due to the fact
    that all other cpus had no timers armed which expired before the 145
    seconds timeframe.
    
    The solution is simply to clear the broadcast active bit
    unconditionally when a cpu switches to oneshot mode after the first
    cpu switched the broadcast device over. It's not idle at that point
    otherwise it would not be executing that code.
    
    [ I fundamentally hate that broadcast crap. Why the heck thought some
      folks that when going into deep idle it's a brilliant concept to
      switch off the last device which brings the cpu back from that
      state? ]
    
    Thanks to Christian for providing all the valuable debug information!
    
    Reported-and-tested-by: Christian Hoffmann <email@christianhoffmann.info>
    Cc: John Stultz <johnstul@us.ibm.com>
    Link: http://lkml.kernel.org/r/%3Calpine.LFD.2.02.1105161105170.3078%40ionos%3E
    Cc: stable@kernel.org
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  2. @davem330

    net: Change netdev_fix_features messages loglevel

    Michał Mirosław authored davem330 committed
    Those reduced to DEBUG can possibly be triggered by unprivileged processes
    and are nothing exceptional. Illegal checksum combinations can only be
    caused by driver bug, so promote those messages to WARN.
    
    Since GSO without SG will now only cause DEBUG message from
    netdev_fix_features(), remove the workaround from register_netdevice().
    
    Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
    Signed-off-by: David S. Miller <davem@davemloft.net>
  3. @thomasjfox @davem330

    vmxnet3: Fix inconsistent LRO state after initialization

    thomasjfox authored davem330 committed
    During initialization of vmxnet3, the state of LRO
    gets out of sync with netdev->features.
    
    This leads to very poor TCP performance in a IP forwarding
    setup and is hitting many VMware users.
    
    Simplified call sequence:
    1. vmxnet3_declare_features() initializes "adapter->lro" to true.
    
    2. The kernel automatically disables LRO if IP forwarding is enabled,
    so vmxnet3_set_flags() gets called. This also updates netdev->features.
    
    3. Now vmxnet3_setup_driver_shared() is called. "adapter->lro" is still
    set to true and LRO gets enabled again, even though
    netdev->features shows it's disabled.
    
    Fix it by updating "adapter->lro", too.
    
    The private vmxnet3 adapter flags are scheduled for removal
    in net-next, see commit a0d2730
    "net: vmxnet3: convert to hw_features".
    
    Patch applies to 2.6.37 / 2.6.38 and 2.6.39-rc6.
    
    Please CC: comments.
    
    Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
    Acked-by: Stephen Hemminger <shemminger@vyatta.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
  4. @davem330

    sfc: Fix oops in register dump after mapping change

    Ben Hutchings authored davem330 committed
    Commit 747df22 ('sfc: Always map MCDI
    shared memory as uncacheable') introduced a separate mapping for the
    MCDI shared memory (MC_TREG_SMEM).  This means we can no longer easily
    include it in the register dump.  Since it is not particularly useful
    in debugging, substitute a recognisable dummy value.
    
    Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
  5. @torvalds

    Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/l…

    torvalds authored
    …inux/kernel/git/tmlind/linux-omap-2.6
    
    * 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
      OMAP3: set the core dpll clk rate in its set_rate function
      omap: iommu: Return IRQ_HANDLED in fault handler when no fault occured
  6. @torvalds

    Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel…

    torvalds authored
    …/git/airlied/drm-2.6
    
    * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
      drm: Take lock around probes for drm_fb_helper_hotplug_event
      drm/i915: Revert i915.semaphore=1 default from 47ae63e
      vga_switcheroo: don't toggle-switch devices
      drm/radeon/kms: add some evergreen/ni safe regs
      drm/radeon/kms: fix extended lvds info parsing
      drm/radeon/kms: fix tiling reg on fusion
  7. @cjb

    Revert "mmc: fix a race between card-detect rescan and clock-gate wor…

    cjb authored
    …k instances"
    
    This reverts commit 26fc877, which has
    been reported to cause boot/resume-time crashes for some users:
    
    https://bbs.archlinux.org/viewtopic.php?id=118751.
    
    Signed-off-by: Chris Ball <cjb@laptop.org>
    Cc: <stable@kernel.org>
  8. @rhvgoyal

    blk-throttle: Use task_subsys_state() to determine a task's blkio_cgroup

    rhvgoyal authored Jens Axboe committed
    Currentlly we first map the task to cgroup and then cgroup to
    blkio_cgroup. There is a more direct way to get to blkio_cgroup
    from task using task_subsys_state(). Use that.
    
    The real reason for the fix is that it also avoids a race in generic
    cgroup code. During remount/umount rebind_subsystems() is called and
    it can do following with and rcu protection.
    
    cgrp->subsys[i] = NULL;
    
    That means if somebody got hold of cgroup under rcu and then it tried
    to do cgroup->subsys[] to get to blkio_cgroup, it would get NULL which
    is wrong. I was running into this race condition with ltp running on a
    upstream derived kernel and that lead to crash.
    
    So ideally we should also fix cgroup generic code to wait for rcu
    grace period before setting pointer to NULL. Li Zefan is not very keen
    on introducing synchronize_wait() as he thinks it will slow
    down moun/remount/umount operations.
    
    So for the time being atleast fix the kernel crash by taking a more
    direct route to blkio_cgroup.
    
    One tester had reported a crash while running LTP on a derived kernel
    and with this fix crash is no more seen while the test has been
    running for over 6 days.
    
    Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
    Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
    Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  9. x86, apic: Fix spurious error interrupts triggering on all non-boot APs

    Youquan Song authored Ingo Molnar committed
    This patch fixes a bug reported by a customer, who found
    that many unreasonable error interrupts reported on all
    non-boot CPUs (APs) during the system boot stage.
    
    According to Chapter 10 of Intel Software Developer Manual
    Volume 3A, Local APIC may signal an illegal vector error when
    an LVT entry is set as an illegal vector value (0~15) under
    FIXED delivery mode (bits 8-11 is 0), regardless of whether
    the mask bit is set or an interrupt actually happen. These
    errors are seen as error interrupts.
    
    The initial value of thermal LVT entries on all APs always reads
    0x10000 because APs are woken up by BSP issuing INIT-SIPI-SIPI
    sequence to them and LVT registers are reset to 0s except for
    the mask bits which are set to 1s when APs receive INIT IPI.
    
    When the BIOS takes over the thermal throttling interrupt,
    the LVT thermal deliver mode should be SMI and it is required
    from the kernel to keep AP's LVT thermal monitoring register
    programmed as such as well.
    
    This issue happens when BIOS does not take over thermal throttling
    interrupt, AP's LVT thermal monitor register will be restored to
    0x10000 which means vector 0 and fixed deliver mode, so all APs will
    signal illegal vector error interrupts.
    
    This patch check if interrupt delivery mode is not fixed mode before
    restoring AP's LVT thermal monitor register.
    
    Signed-off-by: Youquan Song <youquan.song@intel.com>
    Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
    Acked-by: Yong Wang <yong.y.wang@intel.com>
    Cc: hpa@linux.intel.com
    Cc: joe@perches.com
    Cc: jbaron@redhat.com
    Cc: trenn@suse.de
    Cc: kent.liu@intel.com
    Cc: chaohong.guo@intel.com
    Cc: <stable@kernel.org> # As far back as possible
    Link: http://lkml.kernel.org/r/1303402963-17738-1-git-send-email-youquan.song@intel.com
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
  10. @ickle

    drm: Take lock around probes for drm_fb_helper_hotplug_event

    ickle authored Dave Airlie committed
    We need to hold the dev->mode_config.mutex whilst detecting the output
    status. But we also need to drop it for the call into
    drm_fb_helper_single_fb_probe(), which indirectly acquires the lock when
    attaching the fbcon.
    
    Failure to do so exposes a race with normal output probing. Detected by
    adding some warnings that the mutex is held to the backend detect routines:
    
    [   17.772456] WARNING: at drivers/gpu/drm/i915/intel_crt.c:471 intel_crt_detect+0x3e/0x373 [i915]()
    [   17.772458] Hardware name: Latitude E6400
    [   17.772460] Modules linked in: ....
    [   17.772582] Pid: 11, comm: kworker/0:1 Tainted: G        W 2.6.38.4-custom.2 #8
    [   17.772584] Call Trace:
    [   17.772591]  [<ffffffff81046af5>] ? warn_slowpath_common+0x78/0x8c
    [   17.772603]  [<ffffffffa03f3e5c>] ? intel_crt_detect+0x3e/0x373 [i915]
    [   17.772612]  [<ffffffffa0355d49>] ?  drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper]
    [   17.772619]  [<ffffffffa03534d5>] ?  drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper]
    [   17.772625]  [<ffffffffa0354760>] ?  drm_fb_helper_hotplug_event+0xa5/0xc3 [drm_kms_helper]
    [   17.772633]  [<ffffffffa035577f>] ? output_poll_execute+0x146/0x17c [drm_kms_helper]
    [   17.772638]  [<ffffffff81193c01>] ? cfq_init_queue+0x247/0x345
    [   17.772644]  [<ffffffffa0355639>] ? output_poll_execute+0x0/0x17c [drm_kms_helper]
    [   17.772648]  [<ffffffff8105b540>] ? process_one_work+0x193/0x28e
    [   17.772652]  [<ffffffff8105c6bc>] ? worker_thread+0xef/0x172
    [   17.772655]  [<ffffffff8105c5cd>] ? worker_thread+0x0/0x172
    [   17.772658]  [<ffffffff8105c5cd>] ? worker_thread+0x0/0x172
    [   17.772663]  [<ffffffff8105f767>] ? kthread+0x7a/0x82
    [   17.772668]  [<ffffffff8100a724>] ? kernel_thread_helper+0x4/0x10
    [   17.772671]  [<ffffffff8105f6ed>] ? kthread+0x0/0x82
    [   17.772674]  [<ffffffff8100a720>] ? kernel_thread_helper+0x0/0x10
    
    Reported-by:  Frederik Himpe <fhimpe@telenet.be>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=36394
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
Commits on May 15, 2011
  1. @amluto

    drm/i915: Revert i915.semaphore=1 default from 47ae63e

    amluto authored Dave Airlie committed
    My Q67 / i7-2600 box has rev09 Sandy Bridge graphics.  It hangs
    instantly when GNOME loads and it hangs so hard the reset button
    doesn't work.  Setting i915.semaphore=0 fixes it.
    
    Semaphores were disabled in a1656b9
    in 2.6.38 and were re-enabled by
    
    commit 47ae63e
    Merge: c59a333 467cffb
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Mon Mar 7 12:32:44 2011 +0000
    
        Merge branch 'drm-intel-fixes' into drm-intel-next
    
        Apply the trivial conflicting regression fixes, but keep GPU semaphores
        enabled.
    
        Conflicts:
            drivers/gpu/drm/i915/i915_drv.h
            drivers/gpu/drm/i915/i915_gem_execbuffer.c
    
    (It's worth noting that the offending change is i915_drv.c,
     which is not a conflict.)
    
    Signed-off-by: Andy Lutomirski <luto@mit.edu>
    Acked-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
  2. @FlorianMickler

    vga_switcheroo: don't toggle-switch devices

    FlorianMickler authored Dave Airlie committed
    If the requested device is already active, ignore the request.
    
    This restores the original behaviour of the interface. The change was
    probably an unintended side effect of
    
    commit 66b37c6 vga_switcheroo: split switching into two stages
    
    which did not take into account to duplicate the !active check in the split-off
    stage2.
    
    Fix this by factoring that check out of stage1 into the debugfs_write routine.
    
    References: https://bugzilla.kernel.org/show_bug.cgi?id=34252
    Reported-by: Igor Murzov <e-mail@date.by>
    Tested-by: Igor Murzov <e-mail@date.by>
    Signed-off-by: Florian Mickler <florian@mickler.org>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
  3. @davem330
  4. Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kern…

    Ingo Molnar authored
    …el/git/acme/linux-2.6 into perf/urgent
Something went wrong with that request. Please try again.