25 Feb, 2011

40 commits

  • Greg Kroah-Hartman
     
  • This is a revert of commit 9b29050f8f75916f974a2d231ae5d3cd59792296
    upstream which has been found to prevent suspend from working on a
    number of systems.

    Thanks to Jiri Slaby for tracing this down.

    Cc: Jiri Slaby
    Cc: Rafael Wysocki
    Cc: Stefan Berger
    Cc: Guillaume Chazarain
    Cc: Rajiv Andrade
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • commit 8a6a142c1286797978e4db266d22875a5f424897 upstream.

    Don't allow everybody to change WMI settings.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: Matthew Garrett
    Signed-off-by: Greg Kroah-Hartman

    Vasiliy Kulikov
     
  • commit 8040835760adf0ef66876c063d47f79f015fb55d upstream.

    Don't allow everybody to change ACPI settings. The comment says that it
    is done deliberatelly, however, the comment before disp_proc_write()
    says that at least one of these setting is experimental.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: Matthew Garrett
    Signed-off-by: Greg Kroah-Hartman

    Vasiliy Kulikov
     
  • commit b80b168f918bba4b847e884492415546b340e19d upstream.

    Don't allow everybody to write to hardware registers.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: Matthew Garrett
    Signed-off-by: Greg Kroah-Hartman

    Vasiliy Kulikov
     
  • commit 1e6d93e45b231b3ae87c01902ede2315aacfe976 upstream.

    Don't allow everybody to set terminator via sysfs.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Vasiliy Kulikov
     
  • commit 3088e3b4963d26d6f6f54987f595b974ed6d48d8 upstream.

    The mic detection HW should be enabled when either mic or short detection
    is required, not when only both are required.

    Signed-off-by: Stephen Warren
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Stephen Warren
     
  • commit 4fe757dd48a9e95e1a071291f15dda5421dacb66 upstream.

    It was possible to call pmu::start() on an already running event. In
    particular this lead so some wreckage as the hrtimer events would
    re-initialize active timers.

    This was due to throttled events being activated again by scheduling.
    Scheduling in a context would add and force start events, resulting in
    running events with a possible throttle status. The next tick to hit
    that task will then try to unthrottle the event and call ->start() on
    an already running event.

    Reported-by: Jeff Moyer
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Peter Zijlstra
     
  • commit 6d83f94db95cfe65d2a6359cccdf61cf087c2598 upstream.

    With CONFIG_SHIRQ_DEBUG=y we call a newly installed interrupt handler
    in request_threaded_irq().

    The original implementation (commit a304e1b8) called the handler
    _BEFORE_ it was installed, but that caused problems with handlers
    calling disable_irq_nosync(). See commit 377bf1e4.

    It's braindead in the first place to call disable_irq_nosync in shared
    handlers, but ....

    Moving this call after we installed the handler looks innocent, but it
    is very subtle broken on SMP.

    Interrupt handlers rely on the fact, that the irq core prevents
    reentrancy.

    Now this debug call violates that promise because we run the handler
    w/o the IRQ_INPROGRESS protection - which we cannot apply here because
    that would result in a possibly forever masked interrupt line.

    A concurrent real hardware interrupt on a different CPU results in
    handler reentrancy and can lead to complete wreckage, which was
    unfortunately observed in reality and took a fricking long time to
    debug.

    Leave the code here for now. We want this debug feature, but that's
    not easy to fix. We really should get rid of those
    disable_irq_nosync() abusers and remove that function completely.

    Signed-off-by: Thomas Gleixner
    Cc: Anton Vorontsov
    Cc: David Woodhouse
    Cc: Arjan van de Ven
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • commit c1ee6264280e740a9d3ff3feef38642cf0a57013 upstream.

    Lars-Peter Clausen pointed out:

    I stumbled upon this while looking through the existing archs using
    SPARSE_IRQ. Even with SPARSE_IRQ the NR_IRQS is still the upper
    limit for the number of IRQs.

    Both PXA and MMP set NR_IRQS to IRQ_BOARD_START, with
    IRQ_BOARD_START being the number of IRQs used by the core.

    In various machine files the nr_irqs field of the ARM machine
    defintion struct is then set to "IRQ_BOARD_START + NR_BOARD_IRQS".

    As a result "nr_irqs" will greater then NR_IRQS which then again
    causes the "allocated_irqs" bitmap in the core irq code to be
    accessed beyond its size overwriting unrelated data.

    The core code really misses a sanity check there.

    This went unnoticed so far as by chance the compiler/linker places
    data behind that bitmap which gets initialized later on those affected
    platforms.

    So the obvious fix would be to add a sanity check in early_irq_init()
    and break all affected platforms. Though that check wants to be
    backported to stable as well, which will require to fix all known
    problematic platforms and probably some more yet not known ones as
    well. Lots of churn.

    A way simpler solution is to allocate a slightly larger bitmap and
    avoid the whole churn w/o breaking anything. Add a few warnings when
    an arch returns utter crap.

    Reported-by: Lars-Peter Clausen
    Signed-off-by: Thomas Gleixner
    Cc: Haojian Zhuang
    Cc: Eric Miao
    Cc: Peter Zijlstra
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • commit 55f9cf6bbaa682958a7dd2755f883b768270c3ce upstream.

    The lower filesystem may do some type of inode revalidation during a
    getattr call. eCryptfs should take advantage of that by copying the
    lower inode attributes to the eCryptfs inode after a call to
    vfs_getattr() on the lower inode.

    I originally wrote this fix while working on eCryptfs on nfsv3 support,
    but discovered it also fixed an eCryptfs on ext4 nanosecond timestamp
    bug that was reported.

    https://bugs.launchpad.net/bugs/613873

    Signed-off-by: Tyler Hicks
    Signed-off-by: Greg Kroah-Hartman

    Tyler Hicks
     
  • commit 33619f0d3ff715a2a5499520967d526ad931d70d upstream.

    Allow drivers to enable Zoomed Video support. Currently, this is only
    used by out-of-tree drivers (L64020 DVB driver in particular).

    Signed-off-by: Dominik Brodowski
    Signed-off-by: Greg Kroah-Hartman

    Dominik Brodowski
     
  • commit bbb706079abe955a9e3f208f541de97d99449236 upstream.

    6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3 needs to be
    6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3 to match the hardware alias.

    Signed-off-by: Matthew Garrett
    Acked-by: Carlos Corbacho
    Signed-off-by: Greg Kroah-Hartman

    Matthew Garrett
     
  • commit 5e640927a597a7c3e72b61e8bce74c22e906de65 upstream.

    LANMAN response length was changed to 16 bytes instead of 24 bytes.
    Revert it back to 24 bytes.

    Signed-off-by: Shirish Pargaonkar
    Signed-off-by: Steve French
    Signed-off-by: Greg Kroah-Hartman

    Shirish Pargaonkar
     
  • commit 9616125611ee47693186533d76e403856a36b3c8 upstream.

    The code finds, the '%' sign in an ipv6 address and copies that to a
    buffer allocated on the stack. It then ignores that buffer, and passes
    'pct' to simple_strtoul(), which doesn't work right because we're
    comparing 'endp' against a completely different string.

    Fix it by passing the correct pointer. While we're at it, this is a
    good candidate for conversion to strict_strtoul as well.

    Cc: David Howells
    Reported-by: Björn JACKE
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French
    Signed-off-by: Greg Kroah-Hartman

    Jeff Layton
     
  • commit a9ad21fed09cb95d34af9474be0831525b30c4c6 upstream.

    When SMP_ON_UP is used and the spinlocks are inlined, we end up with
    inline spinlocks in the exit code, with references from the SMP
    alternatives section to the exit sections. This causes link time
    errors. Avoid this by placing the exit sections in the init-discarded
    region.

    Tested-by: Dave Martin
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit 53399053eb505cf541b2405bd9d9bca5ecfb96fb upstream.

    Ensure a predictable endian state when entering signal handlers. This
    avoids programs which use SETEND to momentarily switch their endian
    state from having their signal handlers entered with an unpredictable
    endian state.

    Acked-by: Dave Martin
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit 2400982a2e8a8e4e95f0a0e1517bbe63cc88038f upstream.

    Commit e3c92215198cb6aa00ad38db2780faa6b72e0a3f ("[media] radio-aimslab.c: Fix
    gcc 4.5+ bug") removed the include, but introduced new callers of msleep():

    | drivers/media/radio/radio-aimslab.c: In function ‘rt_decvol’:
    | drivers/media/radio/radio-aimslab.c:76: error: implicit declaration of function ‘msleep’

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Mauro Carvalho Chehab
    Cc: dann frazier
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     
  • commit c71caf4114a0e1da3451cc92fba6a152929cd4c2 upstream.

    In 13ee6ac netfilter: fix race in conntrack between dump_table and
    destroy, we recovered spinlocks to protect the dump of the conntrack
    table according to reports from Stephen and acknowledgments on the
    issue from Eric.

    In that patch, the refcount bump that allows to keep a reference
    to the current ct object was removed. However, we still decrement
    the refcount for that object in the output path of
    ctnetlink_dump_table():

    if (last)
    nf_ct_put(last)

    Cc: Stephen Hemminger
    Signed-off-by: Pablo Neira Ayuso
    Acked-by: Eric Dumazet
    Signed-off-by: Patrick McHardy
    Signed-off-by: Greg Kroah-Hartman

    Pablo Neira Ayuso
     
  • commit 13ee6ac579574a2a95e982b19920fd2495dce8cd upstream.

    The netlink interface to dump the connection tracking table has a race
    when entries are deleted at the same time. A customer reported a crash
    and the backtrace showed thatctnetlink_dump_table was running while a
    conntrack entry was being destroyed.
    (see https://bugzilla.vyatta.com/show_bug.cgi?id=6402).

    According to RCU documentation, when using hlist_nulls the reader
    must handle the case of seeing a deleted entry and not proceed
    further down the linked list. The old code would continue
    which caused the scan to walk into the free list.

    This patch uses locking (rather than RCU) for this operation which
    is guaranteed safe, and no longer requires getting reference while
    doing dump operation.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: Greg Kroah-Hartman

    Stephen Hemminger
     
  • commit 2c6315da6a1657a49e03970a4084dc3d1958ad70 upstream.

    On systems where the temperature sensor is actually used, the BIOS is
    likely to have locked the alarm registers. In that case, all writes
    through the corresponding sysfs files would be silently ignored.

    To prevent this, detect the locks and make the affected sysfs files
    read-only.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Clemens Ladisch
     
  • commit d5622f5b6c4671d1588ccc9056705366d4eb312a upstream.

    The documentation lists standard numbers and chip names in excruciating
    detail, but that's all it does. To help mere mortals in deciding
    whether to enable this driver, mention what this sensor is for and in
    which systems it might be found.

    Also add a link to the actual JC 42.4 specification.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Clemens Ladisch
     
  • commit e866729605a43a739fc56023a8530b07a93d3458 upstream.

    In set_temp_crit_hyst(), make the variable 'val' have the correct
    type for strict_strtoul().

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Clemens Ladisch
     
  • commit aa4790a6287818078ca968164a5f0d0870326602 upstream.

    Add the PCI ID to support the internal temperature sensor of the
    AMD "Llano" and "Brazos" processor families.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Clemens Ladisch
     
  • commit ca86828ccd3128513f6d4e200b437deac95408db upstream.

    This patch adds the PCI northbridge device id for AMD CPU
    families 12h and 14h. Both families have implemented the same
    PCI northbridge device.

    There are some future use cases that use this PCI device and
    we would like to clarify its naming.

    Signed-off-by: Robert Richter
    Cc: xen-devel@lists.xensource.com
    Cc: Keir Fraser
    Cc: Jan Beulich
    LKML-Reference:
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Robert Richter
     
  • commit f065a93e168299569078bc6f52128b57f602fff3 upstream.

    The interface is identical EMC6D102, so all that needs to be added are
    some definitions and their uses.

    Registers apparently missing in EMC6D103S/EMC6D103:A2 compared to EMC6D103:A0,
    EMC6D103:A1, and EMC6D102 (according to the data sheets), but used
    unconditionally in the driver: 62[5:7], 6D[0:7], and 6E[0:7]. For that
    reason, EMC6D103S chips don't get enabled for the time being.

    Signed-off-by: Jan Beulich
    (Guenter Roeck: Replaced EMC6D103_A2 with EMC6D103S per EMC6D103S datasheet)
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Jan Beulich
     
  • commit 89724958e5d596bb91328644c97dd80399443e87 upstream.

    Without this patch, one line-out and one speaker and
    Conexant's auto parser would announce (non-working) surround
    capabilities.

    BugLink: http://bugs.launchpad.net/bugs/721126
    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    David Henningsson
     
  • commit eaae55dac6b64c0616046436b294e69fc5311581 upstream.

    Use strlcpy() to assure not to overflow the string array sizes by
    too long USB device name string.

    Reported-by: Rafa
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit b540afc2b3d6e4cd1d1f137ef6d9e9c78d67fecd upstream.

    The bug reporter claims that position_fix=1 is needed for his
    microphone to work. The controller PCI vendor-id is [1002:4383] (rev 40).

    Reported-by: Kjell L.
    BugLink: http://bugs.launchpad.net/bugs/718402
    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    David Henningsson
     
  • commit c91d01556f52255a31575be0cb1981c92a2a5028 upstream.

    Patch fixes:
    https://bugzilla.redhat.com/show_bug.cgi?id=654599

    Many users report very low speed problem on 3945 devices,
    this patch fixes problem, but only for some of them.

    For unknown reason, sometimes after hw scanning, device is not able
    to receive frames at high rate. Since plcp health check may request
    hw scan to "reset radio", performance problem start to be observable
    after update kernel to .35, where plcp check was introduced.

    Bug reporter confirmed that removing plcp check fixed problem for him.

    Reported-and-tested-by: SilvioTO
    Signed-off-by: Stanislaw Gruszka
    Acked-by: Wey-Yi Guy
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Stanislaw Gruszka
     
  • commit ceaaec98ad99859ac90ac6863ad0a6cd075d8e0e upstream.

    commit 9b5e383c11b08784 (net: Introduce
    unregister_netdevice_many()) left an active LIST_HEAD() in
    rollback_registered(), with possible memory corruption.

    Even if device is freed without touching its unreg_list (and therefore
    touching the previous memory location holding LISTE_HEAD(single), better
    close the bug for good, since its really subtle.

    (Same fix for default_device_exit_batch() for completeness)

    Reported-by: Michal Hocko
    Tested-by: Michal Hocko
    Reported-by: Eric W. Biderman
    Tested-by: Eric W. Biderman
    Signed-off-by: Linus Torvalds
    Signed-off-by: Eric Dumazet
    CC: Ingo Molnar
    CC: Octavian Purdila
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Eric Dumazet
     
  • commit 3233cdbd9fa347a6d6897a94cc6ed0302ae83c4f upstream.

    MAYDAY_INITIAL_TIMEOUT is defined as HZ / 100 and depending on
    configuration may end up 0 or 1. Even when it's 1, depending on when
    the mayday timer is added in the current jiffy interval, it may expire
    way before a jiffy has passed.

    Make sure MAYDAY_INITIAL_TIMEOUT is at least two to guarantee that at
    least a full jiffy has passed before calling rescuers.

    Signed-off-by: Tejun Heo
    Reported-by: Ray Jui
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     
  • commit 7576958a9d5a4a677ad7dd40901cdbb6c1110c98 upstream.

    After executing the matching works, a rescuer leaves the gcwq whether
    there are more pending works or not. This may decrease the
    concurrency level to zero and stall execution until a new work item is
    queued on the gcwq.

    Make rescuer wake up a regular worker when it leaves a gcwq if there
    are more works to execute, so that execution isn't stalled.

    Signed-off-by: Tejun Heo
    Reported-by: Ray Jui
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     
  • commit fa7ea87a057958a8b7926c1a60a3ca6d696328ed upstream.

    Validate number of blocks in map and remove redundant variable.

    Signed-off-by: Timo Warns
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Timo Warns
     
  • commit 9f4283f49f0a96a64c5a45fe56f0f8c942885eef upstream.

    The fixed ref/post dividers are set by the AdjustPll table
    rather than the ss info table on dce4+. Make sure we enable
    the fractional feedback dividers when using a fixed post
    or ref divider on them as well.

    Fixes:
    https://bugzilla.kernel.org/show_bug.cgi?id=29272

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie
    Signed-off-by: Greg Kroah-Hartman

    Alex Deucher
     
  • commit 2e725a065b0153f0c449318da1923a120477633d upstream.

    Currently we return 0 in swsusp_alloc() when alloc_image_page() fails.
    Fix that. Also remove unneeded "error" variable since the only
    useful value of error is -ENOMEM.

    [rjw: Fixed up the changelog and changed subject.]

    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Stanislaw Gruszka
     
  • This is a backport for 2.6.37 stable. The original commit ID is
    6550904ddbc3c286798a87edf95eeebcc62bc58a

    Offlining the secondary CPU causes the timer irq affinity to be set to
    CPU 0. When the secondary CPU is back online again, the wrong irq
    affinity will be used.

    This patch ensures secondary per CPU timer always has the correct
    IRQ affinity when enabled.

    Signed-off-by: Jacob Pan
    LKML-Reference:
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Greg Kroah-Hartman

    Jacob Pan
     
  • commit 261cd298a8c363d7985e3482946edb4bfedacf98 upstream.

    task_show_regs used to be a debugging aid in the early bringup days
    of Linux on s390. /proc//status is a world readable file, it
    is not a good idea to show the registers of a process. The only
    correct fix is to remove task_show_regs.

    Reported-by: Al Viro
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Martin Schwidefsky
     
  • Upstream commits: 93789b32dbf355e70f18b17a82e8661677a7f7fb,
    1c9d16e35911090dee3f9313e6af13af623d66ee

    ea53069231f9317062910d6e772cca4ce93de8c8 made a CPU use monitor/mwait
    when offline. This is not the optimal choice for AMD wrt to powersavings
    and we'd prefer our cores to halt (i.e. enter C1) instead. For this, the
    same selection whether to use monitor/mwait has to be used as when we
    select the idle routine for the machine.

    With this patch, offlining cores 1-5 on a X6 machine allows core0 to
    boost again.

    [ hpa: putting this in urgent since it is a (power) regression fix ]

    Reported-by: Andreas Herrmann
    Cc: H. Peter Anvin
    Cc: Arjan van de Ven
    Cc: Len Brown
    Cc: Venkatesh Pallipadi
    Cc: Peter Zijlstra
    Signed-off-by: Borislav Petkov
    LKML-Reference:
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Greg Kroah-Hartman

    Borislav Petkov
     
  • commit 47c85291d3dd1a51501555000b90f8e281a0458e upstream.

    These functions return an nfs status, not a host_err. So don't
    try to convert before returning.

    This is a regression introduced by
    3c726023402a2f3b28f49b9d90ebf9e71151157d; I fixed up two of the callers,
    but missed these two.

    Reported-by: Herbert Poetzl
    Signed-off-by: NeilBrown
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    NeilBrown