1. 05 Jul, 2010 16 commits
    • Daniel T Chen's avatar
      ALSA: hda: Fix model quirk for Dell M1730 · 7f459eca
      Daniel T Chen authored
      commit 66668b6f upstream.
      
      BugLink: https://launchpad.net/bugs/576160
      
      Symptom: Currently (2.6.32.12) the Dell M1730 uses the 3stack model
      quirk. Unfortunately this means that capture is not functional out-
      of-the-box despite ensuring that capture settings are unmuted and
      raised fully.
      
      Test case: boot from Ubuntu 10.04 LTS live cd; capture does not
      work.
      
      Resolution: Correct the model quirk for Dell M1730 to rely on the
      BIOS configuration.
      
      This patch also trivially sorts the quirk into the correct section
      based on the comments.
      
      Reported-and-Tested-By: <picdragon99@msn.com>
      Tested-By: Daren Hayward
      Tested-By: Tobias Krais
      Signed-off-by: default avatarDaniel T Chen <crimsun@ubuntu.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7f459eca
    • Tony Breeds's avatar
      mutex: Fix optimistic spinning vs. BKL · 3aff03b2
      Tony Breeds authored
      commit fd6be105 upstream.
      
      Currently, we can hit a nasty case with optimistic
      spinning on mutexes:
      
          CPU A tries to take a mutex, while holding the BKL
      
          CPU B tried to take the BLK while holding the mutex
      
      This looks like a AB-BA scenario but in practice, is
      allowed and happens due to the auto-release on
      schedule() nature of the BKL.
      
      In that case, the optimistic spinning code can get us
      into a situation where instead of going to sleep, A
      will spin waiting for B who is spinning waiting for
      A, and the only way out of that loop is the
      need_resched() test in mutex_spin_on_owner().
      
      This patch fixes it by completely disabling spinning
      if we own the BKL. This adds one more detail to the
      extensive list of reasons why it's a bad idea for
      kernel code to be holding the BKL.
      Signed-off-by: default avatarTony Breeds <tony@bakeyournoodle.com>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      LKML-Reference: <20100519054636.GC12389@ozlabs.org>
      [ added an unlikely() attribute to the branch ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3aff03b2
    • Sebastian Andrzej Siewior's avatar
      libata: don't flush dcache on slab pages · 8b867c02
      Sebastian Andrzej Siewior authored
      commit 3842e835 upstream.
      
      page_mapping() check this via VM_BUG_ON(PageSlab(page)) so we bug here
      with the according debuging turned on.
      
      Future TODO: replace this with a flush_dcache_page_for_pio() API
      Signed-off-by: default avatarSebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8b867c02
    • Tejun Heo's avatar
      libata: disable ATAPI AN by default · bf874fa7
      Tejun Heo authored
      commit e7ecd435 upstream.
      
      There are ATAPI devices which raise AN when hit by commands issued by
      open().  This leads to infinite loop of AN -> MEDIA_CHANGE uevent ->
      udev open() to check media -> AN.
      
      Both ACS and SerialATA standards don't define in which case ATAPI
      devices are supposed to raise or not raise AN.  They both list media
      insertion event as a possible use case for ATAPI ANs but there is no
      clear description of what constitutes such events.  As such, it seems
      a bit too naive to export ANs directly to userland as MEDIA_CHANGE
      events without further verification (which should behave similarly to
      windows as it apparently is the only thing that some hardware vendors
      are testing against).
      
      This patch adds libata.atapi_an module parameter and disables ATAPI AN
      by default for now.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Nick Bowler <nbowler@elliptictech.com>
      Cc: David Zeuthen <david@fubar.dk>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bf874fa7
    • Andrey Vagin's avatar
      posix_timer: Fix error path in timer_create · 6455cfc4
      Andrey Vagin authored
      commit 45e0fffc upstream.
      
      Move CLOCK_DISPATCH(which_clock, timer_create, (new_timer)) after all
      posible EFAULT erros.
      
      *_timer_create may allocate/get resources.
      (for example posix_cpu_timer_create does get_task_struct)
      
      [ tglx: fold the remove crappy comment patch into this ]
      Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Pavel Emelyanov <xemul@openvz.org>
      Reviewed-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6455cfc4
    • Al Viro's avatar
      Fix racy use of anon_inode_getfd() in perf_event.c · 66717b57
      Al Viro authored
      commit ea635c64 upstream.
      
      once anon_inode_getfd() is called, you can't expect *anything* about
      struct file that descriptor points to - another thread might be doing
      whatever it likes with descriptor table at that point.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      66717b57
    • Larry Finger's avatar
      staging: vt6655: Fix kernel BUG on driver wpa initialization · dade84df
      Larry Finger authored
      commit f6551527 upstream.
      
      In http://bugzilla.novell.com/show_bug.cgi?id=597299, the vt6655 driver
      generates a kernel BUG on a NULL pointer dereference at NULL. This problem
      has been traced to a failure in the wpa_set_wpadev() routine. As the vt6656
      driver does not call this routine, the vt6655 code is similarly set to skip
      the call.
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Tested-by: default avatarRichard Meek <osl2008@googlemail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      dade84df
    • Rodrigo Linfati's avatar
      Staging: add Add Sitecom WL-349 to rtl8192su · b96bae3a
      Rodrigo Linfati authored
      commit 64a5a092 upstream.
      
      Add usb id of Sitecom WL-349 to rtl8192su
      Signed-off-by: default avatarRodrigo Linfati <rodrigo@linfati.cl>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b96bae3a
    • John W. Linville's avatar
      rtl8180: fix tx status reporting · 0c23a92a
      John W. Linville authored
      commit d989ff7c upstream.
      
      When reporting Tx status, indicate that only one rate was used.
      Otherwise, the rate is frozen at rate index 0 (i.e. 1Mb/s).
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0c23a92a
    • Andreas Bombe's avatar
      ARCNET: Limit com20020 PCI ID matches for SOHARD cards · a45334ab
      Andreas Bombe authored
      commit e7971c80 upstream.
      
      The SH SOHARD ARCNET cards are implemented using generic PLX Technology
      PCI<->IOBus bridges. Subvendor and subdevice IDs were not specified,
      causing the driver to attach to any such bridge and likely crash the
      system by attempting to initialize an unrelated device.
      
      Fix by specifying subvendor and subdevice according to the values found
      in the PCI-ID Repository at http://pci-ids.ucw.cz/ .
      Signed-off-by: default avatarAndreas Bombe <aeb@debian.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a45334ab
    • Tejun Heo's avatar
      sata_nv: use ata_pci_sff_activate_host() instead of ata_host_activate() · 6ef0d693
      Tejun Heo authored
      commit 95cc2c70 upstream.
      
      sata_nv was incorrectly using ata_host_activate() instead of
      ata_pci_sff_activate_host() leading to IRQ assignment failure in
      legacy mode.  Fix it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Robert Hancock <hancockr@shaw.ca>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6ef0d693
    • Pavel Emelyanov's avatar
      NFSD: don't report compiled-out versions as present · d700d271
      Pavel Emelyanov authored
      commit 15ddb4ae upstream.
      
      The /proc/fs/nfsd/versions file calls nfsd_vers() to check whether
      the particular nfsd version is present/available. The problem is
      that once I turn off e.g. NFSD-V4 this call returns -1 which is
      true from the callers POV which is wrong.
      
      The proposal is to report false in that case.
      
      The bug has existed since 6658d3a7 "[PATCH] knfsd: remove
      nfsd_versbits as intermediate storage for desired versions".
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Acked-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d700d271
    • KOSAKI Motohiro's avatar
      cpumask: fix compat getaffinity · ab871d83
      KOSAKI Motohiro authored
      commit fa9dc265 upstream.
      
      Commit a45185d2 "cpumask: convert kernel/compat.c" broke libnuma, which
      abuses sched_getaffinity to find out NR_CPUS in order to parse
      /sys/devices/system/node/node*/cpumap.
      
      On NUMA systems with less than 32 possibly CPUs, the current
      compat_sys_sched_getaffinity now returns '4' instead of the actual
      NR_CPUS/8, which makes libnuma bail out when parsing the cpumap.
      
      The libnuma call sched_getaffinity(0, bitmap, 4096) at first.  It mean
      the libnuma expect the return value of sched_getaffinity() is either len
      argument or NR_CPUS.  But it doesn't expect to return nr_cpu_ids.
      
      Strictly speaking, userland requirement are
      
      1) Glibc assume the return value mean the lengh of initialized
         of mask argument. E.g. if sched_getaffinity(1024) return 128,
         glibc make zero fill rest 896 byte.
      2) Libnuma assume the return value can be used to guess NR_CPUS
         in kernel. It assume len-arg<NR_CPUS makes -EINVAL. But
         it try len=4096 at first and 4096 is always bigger than
         NR_CPUS. Then, if we remove strange min_length normalization,
         we never hit -EINVAL case.
      
      sched_getaffinity() already solved this issue.  This patch adapts
      compat_sys_sched_getaffinity() to match the non-compat case.
      Signed-off-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reported-by: default avatarKen Werner <ken.werner@web.de>
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ab871d83
    • Andi Kleen's avatar
      oprofile: remove double ring buffering · 6f92c079
      Andi Kleen authored
      commit cb6e943c upstream.
      
      oprofile used a double buffer scheme for its cpu event buffer
      to avoid races on reading with the old locked ring buffer.
      
      But that is obsolete now with the new ring buffer, so simply
      use a single buffer. This greatly simplifies the code and avoids
      a lot of sample drops on large runs, especially with call graph.
      
      Based on suggestions from Steven Rostedt
      
      For stable kernels from v2.6.32, but not earlier.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6f92c079
    • Robert Richter's avatar
      oprofile/x86: fix uninitialized counter usage during cpu hotplug · 3da87f44
      Robert Richter authored
      commit 2623a1d5 upstream.
      
      This fixes a NULL pointer dereference that is triggered when taking a
      cpu offline after oprofile was initialized, e.g.:
      
       $ opcontrol --init
       $ opcontrol --start-daemon
       $ opcontrol --shutdown
       $ opcontrol --deinit
       $ echo 0 > /sys/devices/system/cpu/cpu1/online
      
      See the crash dump below. Though the counter has been disabled the cpu
      notifier is still active and trying to use already freed counter data.
      
      This fix is for linux-stable. To proper fix this, the hotplug code
      must be rewritten. Thus I will leave a WARN_ON_ONCE() message with
      this patch.
      
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: [<ffffffff8132ad57>] op_amd_stop+0x2d/0x8e
      PGD 0
      Oops: 0000 [#1] SMP
      last sysfs file: /sys/devices/system/cpu/cpu1/online
      CPU 1
      Modules linked in:
      
      Pid: 0, comm: swapper Not tainted 2.6.34-rc5-oprofile-x86_64-standard-00210-g8c00f06 #16 Anaheim/Anaheim
      RIP: 0010:[<ffffffff8132ad57>]  [<ffffffff8132ad57>] op_amd_stop+0x2d/0x8e
      RSP: 0018:ffff880001843f28  EFLAGS: 00010006
      RAX: 0000000000000000 RBX: 0000000000000000 RCX: dead000000200200
      RDX: ffff880001843f68 RSI: dead000000100100 RDI: 0000000000000000
      RBP: ffff880001843f48 R08: 0000000000000000 R09: ffff880001843f08
      R10: ffffffff8102c9a5 R11: ffff88000184ea80 R12: 0000000000000000
      R13: ffff88000184f6c0 R14: 0000000000000000 R15: 0000000000000000
      FS:  00007fec6a92e6f0(0000) GS:ffff880001840000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000000 CR3: 000000000163b000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process swapper (pid: 0, threadinfo ffff88042fcd8000, task ffff88042fcd51d0)
      Stack:
       ffff880001843f48 0000000000000001 ffff88042e9f7d38 ffff880001843f68
      <0> ffff880001843f58 ffffffff8132a602 ffff880001843f98 ffffffff810521b3
      <0> ffff880001843f68 ffff880001843f68 ffff880001843f88 ffff88042fcd9fd8
      Call Trace:
       <IRQ>
       [<ffffffff8132a602>] nmi_cpu_stop+0x21/0x23
       [<ffffffff810521b3>] generic_smp_call_function_single_interrupt+0xdf/0x11b
       [<ffffffff8101804f>] smp_call_function_single_interrupt+0x22/0x31
       [<ffffffff810029f3>] call_function_single_interrupt+0x13/0x20
       <EOI>
       [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff81008701>] ? default_idle+0x22/0x37
       [<ffffffff8100896d>] c1e_idle+0xdf/0xe6
       [<ffffffff813f1170>] ? atomic_notifier_call_chain+0x13/0x15
       [<ffffffff810012fb>] cpu_idle+0x4b/0x7e
       [<ffffffff813e8a4e>] start_secondary+0x1ae/0x1b2
      Code: 89 e5 41 55 49 89 fd 41 54 45 31 e4 53 31 db 48 83 ec 08 89 df e8 be f8 ff ff 48 98 48 83 3c c5 10 67 7a 81 00 74 1f 49 8b 45 08 <42> 8b 0c 20 0f 32 48 c1 e2 20 25 ff ff bf ff 48 09 d0 48 89 c2
      RIP  [<ffffffff8132ad57>] op_amd_stop+0x2d/0x8e
       RSP <ffff880001843f28>
      CR2: 0000000000000000
      ---[ end trace 679ac372d674b757 ]---
      Kernel panic - not syncing: Fatal exception in interrupt
      Pid: 0, comm: swapper Tainted: G      D    2.6.34-rc5-oprofile-x86_64-standard-00210-g8c00f06 #16
      Call Trace:
       <IRQ>  [<ffffffff813ebd6a>] panic+0x9e/0x10c
       [<ffffffff810474b0>] ? up+0x34/0x39
       [<ffffffff81031ccc>] ? kmsg_dump+0x112/0x12c
       [<ffffffff813eeff1>] oops_end+0x81/0x8e
       [<ffffffff8101efee>] no_context+0x1f3/0x202
       [<ffffffff8101f1b7>] __bad_area_nosemaphore+0x1ba/0x1e0
       [<ffffffff81028d24>] ? enqueue_task_fair+0x16d/0x17a
       [<ffffffff810264dc>] ? activate_task+0x42/0x53
       [<ffffffff8102c967>] ? try_to_wake_up+0x272/0x284
       [<ffffffff8101f1eb>] bad_area_nosemaphore+0xe/0x10
       [<ffffffff813f0f3f>] do_page_fault+0x1c8/0x37c
       [<ffffffff81028d24>] ? enqueue_task_fair+0x16d/0x17a
       [<ffffffff813ee55f>] page_fault+0x1f/0x30
       [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff8132ad57>] ? op_amd_stop+0x2d/0x8e
       [<ffffffff8132ad46>] ? op_amd_stop+0x1c/0x8e
       [<ffffffff8132a602>] nmi_cpu_stop+0x21/0x23
       [<ffffffff810521b3>] generic_smp_call_function_single_interrupt+0xdf/0x11b
       [<ffffffff8101804f>] smp_call_function_single_interrupt+0x22/0x31
       [<ffffffff810029f3>] call_function_single_interrupt+0x13/0x20
       <EOI>  [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff81008701>] ? default_idle+0x22/0x37
       [<ffffffff8100896d>] c1e_idle+0xdf/0xe6
       [<ffffffff813f1170>] ? atomic_notifier_call_chain+0x13/0x15
       [<ffffffff810012fb>] cpu_idle+0x4b/0x7e
       [<ffffffff813e8a4e>] start_secondary+0x1ae/0x1b2
      ------------[ cut here ]------------
      WARNING: at /local/rrichter/.source/linux/arch/x86/kernel/smp.c:118 native_smp_send_reschedule+0x27/0x53()
      Hardware name: Anaheim
      Modules linked in:
      Pid: 0, comm: swapper Tainted: G      D    2.6.34-rc5-oprofile-x86_64-standard-00210-g8c00f06 #16
      Call Trace:
       <IRQ>  [<ffffffff81017f32>] ? native_smp_send_reschedule+0x27/0x53
       [<ffffffff81030ee2>] warn_slowpath_common+0x77/0xa4
       [<ffffffff81030f1e>] warn_slowpath_null+0xf/0x11
       [<ffffffff81017f32>] native_smp_send_reschedule+0x27/0x53
       [<ffffffff8102634b>] resched_task+0x60/0x62
       [<ffffffff8102653a>] check_preempt_curr_idle+0x10/0x12
       [<ffffffff8102c8ea>] try_to_wake_up+0x1f5/0x284
       [<ffffffff8102c986>] default_wake_function+0xd/0xf
       [<ffffffff810a110d>] pollwake+0x57/0x5a
       [<ffffffff8102c979>] ? default_wake_function+0x0/0xf
       [<ffffffff81026be5>] __wake_up_common+0x46/0x75
       [<ffffffff81026ed0>] __wake_up+0x38/0x50
       [<ffffffff81031694>] printk_tick+0x39/0x3b
       [<ffffffff8103ac37>] update_process_times+0x3f/0x5c
       [<ffffffff8104dc63>] tick_periodic+0x5d/0x69
       [<ffffffff8104dc90>] tick_handle_periodic+0x21/0x71
       [<ffffffff81018fd0>] smp_apic_timer_interrupt+0x82/0x95
       [<ffffffff81002853>] apic_timer_interrupt+0x13/0x20
       [<ffffffff81030cb5>] ? panic_blink_one_second+0x0/0x7b
       [<ffffffff813ebdd6>] ? panic+0x10a/0x10c
       [<ffffffff810474b0>] ? up+0x34/0x39
       [<ffffffff81031ccc>] ? kmsg_dump+0x112/0x12c
       [<ffffffff813eeff1>] ? oops_end+0x81/0x8e
       [<ffffffff8101efee>] ? no_context+0x1f3/0x202
       [<ffffffff8101f1b7>] ? __bad_area_nosemaphore+0x1ba/0x1e0
       [<ffffffff81028d24>] ? enqueue_task_fair+0x16d/0x17a
       [<ffffffff810264dc>] ? activate_task+0x42/0x53
       [<ffffffff8102c967>] ? try_to_wake_up+0x272/0x284
       [<ffffffff8101f1eb>] ? bad_area_nosemaphore+0xe/0x10
       [<ffffffff813f0f3f>] ? do_page_fault+0x1c8/0x37c
       [<ffffffff81028d24>] ? enqueue_task_fair+0x16d/0x17a
       [<ffffffff813ee55f>] ? page_fault+0x1f/0x30
       [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff8132ad57>] ? op_amd_stop+0x2d/0x8e
       [<ffffffff8132ad46>] ? op_amd_stop+0x1c/0x8e
       [<ffffffff8132a602>] ? nmi_cpu_stop+0x21/0x23
       [<ffffffff810521b3>] ? generic_smp_call_function_single_interrupt+0xdf/0x11b
       [<ffffffff8101804f>] ? smp_call_function_single_interrupt+0x22/0x31
       [<ffffffff810029f3>] ? call_function_single_interrupt+0x13/0x20
       <EOI>  [<ffffffff8102c9a5>] ? wake_up_process+0x10/0x12
       [<ffffffff81008701>] ? default_idle+0x22/0x37
       [<ffffffff8100896d>] ? c1e_idle+0xdf/0xe6
       [<ffffffff813f1170>] ? atomic_notifier_call_chain+0x13/0x15
       [<ffffffff810012fb>] ? cpu_idle+0x4b/0x7e
       [<ffffffff813e8a4e>] ? start_secondary+0x1ae/0x1b2
      ---[ end trace 679ac372d674b758 ]---
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3da87f44
    • Krishna Kumar's avatar
      ixgbe: Fix return of invalid txq · 47680045
      Krishna Kumar authored
      commit fdd3d631 upstream.
      
      a developer had complained of getting lots of warnings:
      
      "eth16 selects TX queue 98, but real number of TX queues is 64"
      
      http://www.mail-archive.com/e1000-devel@lists.sourceforge.net/msg02200.html
      
      As there was no follow up on that bug, I am submitting this
      patch assuming that the other return points will not return
      invalid txq's, and also that this fixes the bug (not tested).
      Signed-off-by: default avatarKrishna Kumar <krkumar2@in.ibm.com>
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Acked-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      47680045
  2. 01 Jun, 2010 3 commits
  3. 26 May, 2010 21 commits
    • Greg Kroah-Hartman's avatar
      Linux 2.6.32.14 · 7b7a917a
      Greg Kroah-Hartman authored
      7b7a917a
    • Greg Kroah-Hartman's avatar
      Revert "parisc: Set PCI CLS early in boot." · 763f2ee6
      Greg Kroah-Hartman authored
      This reverts the following patch, which shouldn't have been applied
      to the .32 stable tree as it causes problems.
      
      
        commit 5fd4514b upstream.
      
        Set the PCI CLS early in the boot process to prevent
        device failures. In pcibios_set_master use the new
        pci_cache_line_size instead of a hard-coded value.
      Signed-off-by: default avatarCarlos O'Donell <carlos@codesourcery.com>
      Reviewed-by: default avatarGrant Grundler <grundler@google.com>
      Signed-off-by: default avatarKyle McMartin <kyle@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      763f2ee6
    • Herbert Xu's avatar
      crypto: authenc - Add EINPROGRESS check · 0ddd1167
      Herbert Xu authored
      commit 180ce7e8 upstream.
      
      When Steffen originally wrote the authenc async hash patch, he
      correctly had EINPROGRESS checks in place so that we did not invoke
      the original completion handler with it.
      
      Unfortuantely I told him to remove it before the patch was applied.
      
      As only MAY_BACKLOG request completion handlers are required to
      handle EINPROGRESS completions, those checks are really needed.
      
      This patch restores them.
      Reported-by: default avatarSebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0ddd1167
    • Luis R. Rodriguez's avatar
      Revert "ath9k: fix lockdep warning when unloading module" on stable kernels · 4ee20bc2
      Luis R. Rodriguez authored
      Johannes' patch 34e89507 titled:
      
      	mac80211: allow station add/remove to sleep
      
      changed the way mac80211 adds and removes peers. The new
      sta_add() / sta_remove() callbacks allowed the driver callbacks
      to sleep. Johannes also ported ath9k to use sta_add() / sta_remove()
      via the patch 4ca77860 titled:
      
      	ath9k: convert to new station add/remove callbacks
      
      but this patch forgot to address a change in locking issue which
      Ming Lei eventually found on his 2.6.33-wl #12 build. The 2.6.33-wl
      build includes code for the 802.11 subsystem for 2.6.34 though so did
      already have the above two patches (ath9k_sta_remove() on his trace),
      the 2.6.33 kernel did not however have these two patches. Ming eventually
      cured his lockdep warnign via the patch a9f042cb titled:
      
      	ath9k: fix lockdep warning when unloading module
      
      This went in to 2.6.34 and although it was not marked as a stable
      fix it did get trickled down and applied on both 2.6.33 and 2.6.32.
      
      In review, the culprits:
      
      	mac80211: allow station add/remove to sleep
      git describe --contains 34e89507
      v2.6.34-rc1~233^2~49^2~107
      
      	ath9k: convert to new station add/remove callbacks
      git describe --contains 4ca77860
      v2.6.34-rc1~233^2~49^2~10
      
      	ath9k: fix lockdep warning when unloading module
      
      This last one trickled down to 2.6.33 (OK), 2.6.33 (invalid) and 2.6.32 (invalid).
      
      git describe --contains a9f042cb
      v2.6.34-rc2~48^2~77^2~7
      git describe --contains 0524bcfa
      v2.6.33.2~125
      git describe --contains 0dcc9985
      v2.6.32.11~79
      
      The patch titled "ath9k: fix lockdep warning when unloading module"
      should be reverted on both 2.6.33 and 2.6.32 as it is invalid and
      actually ended up causing the following warning:
      
      ADDRCONF(NETDEV_CHANGE): wlan31: link becomes ready
      phy0: WMM queue=2 aci=0 acm=0 aifs=3 cWmin=15 cWmax=1023 txop=0
      phy0: WMM queue=3 aci=1 acm=0 aifs=7 cWmin=15 cWmax=1023 txop=0
      phy0: WMM queue=1 aci=2 acm=0 aifs=2 cWmin=7 cWmax=15 txop=94
      phy0: WMM queue=0 aci=3 acm=0 aifs=2 cWmin=3 cWmax=7 txop=47
      phy0: device now idle
      ------------[ cut here ]------------
      WARNING: at kernel/softirq.c:143 local_bh_enable_ip+0x7b/0xa0()
      Hardware name: 7660A14
      Modules linked in: ath9k(-) mac80211 ath cfg80211 <whatever-bleh-etc>
      Pid: 2003, comm: rmmod Not tainted 2.6.32.11 #6
      Call Trace:
       [<ffffffff8105d178>] warn_slowpath_common+0x78/0xb0
       [<ffffffff8105d1bf>] warn_slowpath_null+0xf/0x20
       [<ffffffff81063f8b>] local_bh_enable_ip+0x7b/0xa0
       [<ffffffff815121e4>] _spin_unlock_bh+0x14/0x20
       [<ffffffffa034aea5>] ath_tx_node_cleanup+0x185/0x1b0 [ath9k]
       [<ffffffffa0345597>] ath9k_sta_notify+0x57/0xb0 [ath9k]
       [<ffffffffa02ac51a>] __sta_info_unlink+0x15a/0x260 [mac80211]
       [<ffffffffa02ac658>] sta_info_unlink+0x38/0x60 [mac80211]
       [<ffffffffa02b3fbe>] ieee80211_set_disassoc+0x1ae/0x210 [mac80211]
       [<ffffffffa02b42d9>] ieee80211_mgd_deauth+0x109/0x110 [mac80211]
       [<ffffffffa02ba409>] ieee80211_deauth+0x19/0x20 [mac80211]
       [<ffffffffa028160e>] __cfg80211_mlme_deauth+0xee/0x130 [cfg80211]
       [<ffffffff81118540>] ? init_object+0x50/0x90
       [<ffffffffa0285429>] __cfg80211_disconnect+0x159/0x1d0 [cfg80211]
       [<ffffffffa027125f>] cfg80211_netdev_notifier_call+0x10f/0x450 [cfg80211]
       [<ffffffff81514ca7>] notifier_call_chain+0x47/0x90
       [<ffffffff8107f501>] raw_notifier_call_chain+0x11/0x20
       [<ffffffff81442d66>] call_netdevice_notifiers+0x16/0x20
       [<ffffffff8144352d>] dev_close+0x4d/0xa0
       [<ffffffff814439a8>] rollback_registered+0x48/0x120
       [<ffffffff81443a9d>] unregister_netdevice+0x1d/0x70
       [<ffffffffa02b6cc4>] ieee80211_remove_interfaces+0x84/0xc0 [mac80211]
       [<ffffffffa02aa072>] ieee80211_unregister_hw+0x42/0xf0 [mac80211]
       [<ffffffffa0347bde>] ath_detach+0x8e/0x180 [ath9k]
       [<ffffffffa0347ce1>] ath_cleanup+0x11/0x50 [ath9k]
       [<ffffffffa0351a2c>] ath_pci_remove+0x1c/0x20 [ath9k]
       [<ffffffff8129d712>] pci_device_remove+0x32/0x60
       [<ffffffff81332373>] __device_release_driver+0x53/0xb0
       [<ffffffff81332498>] driver_detach+0xc8/0xd0
       [<ffffffff81331405>] bus_remove_driver+0x85/0xe0
       [<ffffffff81332a5a>] driver_unregister+0x5a/0x90
       [<ffffffff8129da00>] pci_unregister_driver+0x40/0xb0
       [<ffffffffa03518d0>] ath_pci_exit+0x10/0x20 [ath9k]
       [<ffffffffa0353cd5>] ath9k_exit+0x9/0x2a [ath9k]
       [<ffffffff81092838>] sys_delete_module+0x1a8/0x270
       [<ffffffff8107ebe9>] ? up_read+0x9/0x10
       [<ffffffff81011f82>] system_call_fastpath+0x16/0x1b
      ---[ end trace fad957019ffdd40b ]---
      phy0: Removed STA 00:22:6b:56:fd:e8
      phy0: Destroyed STA 00:22:6b:56:fd:e8
      wlan31: deauthenticating from 00:22:6b:56:fd:e8 by local choice (reason=3)
      ath9k 0000:16:00.0: PCI INT A disabled
      
      The original lockdep fixed an issue where due to the new changes
      the driver was not disabling the bottom halves but it is incorrect
      to do this on the older kernels since IRQs are already disabled.
      
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: John W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4ee20bc2
    • Ryusuke Konishi's avatar
      nilfs2: fix sync silent failure · 7823f8d6
      Ryusuke Konishi authored
      commit 973bec34 upstream.
      
      As of 32a88aa1, __sync_filesystem() will return 0 if s_bdi is not set.
      And nilfs does not set s_bdi anywhere.  I noticed this problem by the
      warning introduced by the recent commit 5129a469 ("Catch filesystem
      lacking s_bdi").
      
       WARNING: at fs/super.c:959 vfs_kern_mount+0xc5/0x14e()
       Hardware name: PowerEdge 2850
       Modules linked in: nilfs2 loop tpm_tis tpm tpm_bios video shpchp pci_hotplug output dcdbas
       Pid: 3773, comm: mount.nilfs2 Not tainted 2.6.34-rc6-debug #38
       Call Trace:
        [<c1028422>] warn_slowpath_common+0x60/0x90
        [<c102845f>] warn_slowpath_null+0xd/0x10
        [<c1095936>] vfs_kern_mount+0xc5/0x14e
        [<c1095a03>] do_kern_mount+0x32/0xbd
        [<c10a811e>] do_mount+0x671/0x6d0
        [<c1073794>] ? __get_free_pages+0x1f/0x21
        [<c10a684f>] ? copy_mount_options+0x2b/0xe2
        [<c107b634>] ? strndup_user+0x48/0x67
        [<c10a81de>] sys_mount+0x61/0x8f
        [<c100280c>] sysenter_do_call+0x12/0x32
      
      This ensures to set s_bdi for nilfs and fixes the sync silent failure.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Acked-by: default avatarJens Axboe <jens.axboe@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7823f8d6
    • Kees Cook's avatar
      mmap_min_addr check CAP_SYS_RAWIO only for write · 734c542a
      Kees Cook authored
      commit 4ae69e6b upstream.
      
      Redirecting directly to lsm, here's the patch discussed on lkml:
      http://lkml.org/lkml/2010/4/22/219
      
      The mmap_min_addr value is useful information for an admin to see without
      being root ("is my system vulnerable to kernel NULL pointer attacks?") and
      its setting is trivially easy for an attacker to determine by calling
      mmap() in PAGE_SIZE increments starting at 0, so trying to keep it private
      has no value.
      
      Only require CAP_SYS_RAWIO if changing the value, not reading it.
      
      Comment from Serge :
      
        Me, I like to write my passwords with light blue pen on dark blue
        paper, pasted on my window - if you're going to get my password, you're
        gonna get a headache.
      Signed-off-by: default avatarKees Cook <kees.cook@canonical.com>
      Acked-by: default avatarSerge Hallyn <serue@us.ibm.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      (cherry picked from commit 822cceec)
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      734c542a
    • Tomas Henzl's avatar
      megaraid_sas: fix for 32bit apps · 9e79d530
      Tomas Henzl authored
      commit b3dc1a21 upstream.
      
      It looks like this patch -
      
      commit 7b2519af
      Author: Yang, Bo <Bo.Yang@lsi.com>
      Date:   Tue Oct 6 14:52:20 2009 -0600
      
          [SCSI] megaraid_sas: fix 64 bit sense pointer truncation
      
      has caused a problem for 32bit programs with 64bit os -
      
      http://bugzilla.kernel.org/show_bug.cgi?id=15001
      
      fix by converting the user space 32bit pointer to a 64 bit one when
      needed.
      
      [jejb: fix up some 64 bit warnings]
      Signed-off-by: default avatarTomas Henzl <thenzl@redhat.com>
      Cc: Bo Yang <Bo.Yang@lsi.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9e79d530
    • David Howells's avatar
      CacheFiles: Fix error handling in cachefiles_determine_cache_security() · 58e4a597
      David Howells authored
      commit 7ac512aa upstream.
      
      cachefiles_determine_cache_security() is expected to return with a
      security override in place.  However, if set_create_files_as() fails, we
      fail to do this.  In this case, we should just reinstate the security
      override that was set by the caller.
      
      Furthermore, if set_create_files_as() fails, we should dispose of the
      new credentials we were in the process of creating.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      58e4a597
    • Christian Lamparter's avatar
      p54: disable channels with incomplete calibration data sets · 7bb08a1c
      Christian Lamparter authored
      commit 93a59d75 upstream.
      
      James Grossmann [1] reported that p54 spews out confusing
      messages instead of preventing the mayhem from happening.
      
      the reason is that "p54: generate channel list dynamically"
      is not perfect. It didn't discard incomplete channel data
      sets and therefore p54 advertised to support them as well.
      
      [1]: http://marc.info/?l=linux-wireless&m=125699830215890
      
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Reported-by: default avatarJames Grossmann <cctsurf@gmail.com>
      Signed-off-by: default avatarChristian Lamparter <chunkeey@web.de>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7bb08a1c
    • Wey-Yi Guy's avatar
      iwlwifi: clear all the stop_queue flag after load firmware · 79ec1d30
      Wey-Yi Guy authored
      commit a9e10fb9 upstream.
      
      All the queues are awake and ready to use after loading firmware,
      for firmware reload case, if any queues was stopped before
      reload, mac80211 will wake those queues after restart hardware, so make
      sure all the flag used to keep track of the queue status are
      reset correctly.
      Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      79ec1d30
    • Robin Holt's avatar
      revert "procfs: provide stack information for threads" and its fixup commits · 92d664da
      Robin Holt authored
      commit 34441427 upstream.
      
      Originally, commit d899bf7b ("procfs: provide stack information for
      threads") attempted to introduce a new feature for showing where the
      threadstack was located and how many pages are being utilized by the
      stack.
      
      Commit c44972f1 ("procfs: disable per-task stack usage on NOMMU") was
      applied to fix the NO_MMU case.
      
      Commit 89240ba0 ("x86, fs: Fix x86 procfs stack information for threads on
      64-bit") was applied to fix a bug in ia32 executables being loaded.
      
      Commit 9ebd4eba ("procfs: fix /proc/<pid>/stat stack pointer for kernel
      threads") was applied to fix a bug which had kernel threads printing a
      userland stack address.
      
      Commit 1306d603 ('proc: partially revert "procfs: provide stack
      information for threads"') was then applied to revert the stack pages
      being used to solve a significant performance regression.
      
      This patch nearly undoes the effect of all these patches.
      
      The reason for reverting these is it provides an unusable value in
      field 28.  For x86_64, a fork will result in the task->stack_start
      value being updated to the current user top of stack and not the stack
      start address.  This unpredictability of the stack_start value makes
      it worthless.  That includes the intended use of showing how much stack
      space a thread has.
      
      Other architectures will get different values.  As an example, ia64
      gets 0.  The do_fork() and copy_process() functions appear to treat the
      stack_start and stack_size parameters as architecture specific.
      
      I only partially reverted c44972f1 ("procfs: disable per-task stack usage
      on NOMMU") .  If I had completely reverted it, I would have had to change
      mm/Makefile only build pagewalk.o when CONFIG_PROC_PAGE_MONITOR is
      configured.  Since I could not test the builds without significant effort,
      I decided to not change mm/Makefile.
      
      I only partially reverted 89240ba0 ("x86, fs: Fix x86 procfs stack
      information for threads on 64-bit") .  I left the KSTK_ESP() change in
      place as that seemed worthwhile.
      Signed-off-by: default avatarRobin Holt <holt@sgi.com>
      Cc: Stefani Seibold <stefani@seibold.net>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      92d664da
    • KOSAKI Motohiro's avatar
      proc: partially revert "procfs: provide stack information for threads" · c8c4c2f0
      KOSAKI Motohiro authored
      commit 1306d603 upstream.
      
      Commit d899bf7b (procfs: provide stack information for threads) introduced
      to show stack information in /proc/{pid}/status.  But it cause large
      performance regression.  Unfortunately /proc/{pid}/status is used ps
      command too and ps is one of most important component.  Because both to
      take mmap_sem and page table walk are heavily operation.
      
      If many process run, the ps performance is,
      
      [before d899bf7b]
      
      % perf stat ps >/dev/null
      
       Performance counter stats for 'ps':
      
           4090.435806  task-clock-msecs         #      0.032 CPUs
                   229  context-switches         #      0.000 M/sec
                     0  CPU-migrations           #      0.000 M/sec
                   234  page-faults              #      0.000 M/sec
            8587565207  cycles                   #   2099.425 M/sec
            9866662403  instructions             #      1.149 IPC
            3789415411  cache-references         #    926.409 M/sec
              30419509  cache-misses             #      7.437 M/sec
      
         128.859521955  seconds time elapsed
      
      [after d899bf7b]
      
      % perf stat  ps  > /dev/null
      
       Performance counter stats for 'ps':
      
           4305.081146  task-clock-msecs         #      0.028 CPUs
                   480  context-switches         #      0.000 M/sec
                     2  CPU-migrations           #      0.000 M/sec
                   237  page-faults              #      0.000 M/sec
            9021211334  cycles                   #   2095.480 M/sec
           10605887536  instructions             #      1.176 IPC
            3612650999  cache-references         #    839.160 M/sec
              23917502  cache-misses             #      5.556 M/sec
      
         152.277819582  seconds time elapsed
      
      Thus, this patch revert it. Fortunately /proc/{pid}/task/{tid}/smaps
      provide almost same information. we can use it.
      
      Commit d899bf7b introduced two features:
      
       1) Add the annotattion of [thread stack: xxxx] mark to
          /proc/{pid}/task/{tid}/maps.
       2) Add StackUsage field to /proc/{pid}/status.
      
      I only revert (2), because I haven't seen (1) cause regression.
      Signed-off-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Stefani Seibold <stefani@seibold.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c8c4c2f0
    • Vitaliy Kulikov's avatar
      ALSA: hda - New Intel HDA controller · 2df40553
      Vitaliy Kulikov authored
      commit c602c8ad upstream.
      
      Added a PCI controller id on new Dell laptops.
      Signed-off-by: default avatarVitaliy Kulikov <Vitaliy.Kulikov@idt.com>
      Cc: AmenophisIII <AmenophisIII@gmx.at>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2df40553
    • Dan Rosenberg's avatar
      Btrfs: check for read permission on src file in the clone ioctl · cca81985
      Dan Rosenberg authored
      commit 5dc64164 upstream.
      
      The existing code would have allowed you to clone a file that was
      only open for writing
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      cca81985
    • Andreas Herrmann's avatar
      x86, amd: Check X86_FEATURE_OSVW bit before accessing OSVW MSRs · f46c7299
      Andreas Herrmann authored
      commit f0148711 upstream.
      
      If host CPU is exposed to a guest the OSVW MSRs are not guaranteed
      to be present and a GP fault occurs. Thus checking the feature flag is
      essential.
      Signed-off-by: default avatarAndreas Herrmann <andreas.herrmann3@amd.com>
      LKML-Reference: <20100427101348.GC4489@alberich.amd.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f46c7299
    • Frank Arnold's avatar
      x86, cacheinfo: Turn off L3 cache index disable feature in virtualized environments · 798e99d3
      Frank Arnold authored
      commit 7f284d3c upstream.
      
      When running a quest kernel on xen we get:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
      IP: [<ffffffff8142f2fb>] cpuid4_cache_lookup_regs+0x2ca/0x3df
      PGD 0
      Oops: 0000 [#1] SMP
      last sysfs file:
      CPU 0
      Modules linked in:
      
      Pid: 0, comm: swapper Tainted: G        W  2.6.34-rc3 #1 /HVM domU
      RIP: 0010:[<ffffffff8142f2fb>]  [<ffffffff8142f2fb>] cpuid4_cache_lookup_regs+0x
      2ca/0x3df
      RSP: 0018:ffff880002203e08  EFLAGS: 00010046
      RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000060
      RDX: 0000000000000000 RSI: 0000000000000040 RDI: 0000000000000000
      RBP: ffff880002203ed8 R08: 00000000000017c0 R09: ffff880002203e38
      R10: ffff8800023d5d40 R11: ffffffff81a01e28 R12: ffff880187e6f5c0
      R13: ffff880002203e34 R14: ffff880002203e58 R15: ffff880002203e68
      FS:  0000000000000000(0000) GS:ffff880002200000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000038 CR3: 0000000001a3c000 CR4: 00000000000006f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process swapper (pid: 0, threadinfo ffffffff81a00000, task ffffffff81a44020)
      Stack:
       ffffffff810d7ecb ffff880002203e20 ffffffff81059140 ffff880002203e30
      <0> ffffffff810d7ec9 0000000002203e40 000000000050d140 ffff880002203e70
      <0> 0000000002008140 0000000000000086 ffff880040020140 ffffffff81068b8b
      Call Trace:
       <IRQ>
       [<ffffffff810d7ecb>] ? sync_supers_timer_fn+0x0/0x1c
       [<ffffffff81059140>] ? mod_timer+0x23/0x25
       [<ffffffff810d7ec9>] ? arm_supers_timer+0x34/0x36
       [<ffffffff81068b8b>] ? hrtimer_get_next_event+0xa7/0xc3
       [<ffffffff81058e85>] ? get_next_timer_interrupt+0x19a/0x20d
       [<ffffffff8142fa23>] get_cpu_leaves+0x5c/0x232
       [<ffffffff8106a7b1>] ? sched_clock_local+0x1c/0x82
       [<ffffffff8106a9a0>] ? sched_clock_tick+0x75/0x7a
       [<ffffffff8107748c>] generic_smp_call_function_single_interrupt+0xae/0xd0
       [<ffffffff8101f6ef>] smp_call_function_single_interrupt+0x18/0x27
       [<ffffffff8100a773>] call_function_single_interrupt+0x13/0x20
       <EOI>
       [<ffffffff8143c468>] ? notifier_call_chain+0x14/0x63
       [<ffffffff810295c6>] ? native_safe_halt+0xc/0xd
       [<ffffffff810114eb>] ? default_idle+0x36/0x53
       [<ffffffff81008c22>] cpu_idle+0xaa/0xe4
       [<ffffffff81423a9a>] rest_init+0x7e/0x80
       [<ffffffff81b10dd2>] start_kernel+0x40e/0x419
       [<ffffffff81b102c8>] x86_64_start_reservations+0xb3/0xb7
       [<ffffffff81b103c4>] x86_64_start_kernel+0xf8/0x107
      Code: 14 d5 40 ff ae 81 8b 14 02 31 c0 3b 15 47 1c 8b 00 7d 0e 48 8b 05 36 1c 8b
       00 48 63 d2 48 8b 04 d0 c7 85 5c ff ff ff 00 00 00 00 <8b> 70 38 48 8d 8d 5c ff
       ff ff 48 8b 78 10 ba c4 01 00 00 e8 eb
      RIP  [<ffffffff8142f2fb>] cpuid4_cache_lookup_regs+0x2ca/0x3df
       RSP <ffff880002203e08>
      CR2: 0000000000000038
      ---[ end trace a7919e7f17c0a726 ]---
      
      The L3 cache index disable feature of AMD CPUs has to be disabled if the
      kernel is running as guest on top of a hypervisor because northbridge
      devices are not available to the guest. Currently, this fixes a boot
      crash on top of Xen. In the future this will become an issue on KVM as
      well.
      
      Check if northbridge devices are present and do not enable the feature
      if there are none.
      
      [ hpa: backported to 2.6.34 ]
      Signed-off-by: default avatarFrank Arnold <frank.arnold@amd.com>
      LKML-Reference: <1271945222-5283-3-git-send-email-bp@amd64.org>
      Acked-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      798e99d3
    • Borislav Petkov's avatar
      x86, k8: Fix build error when K8_NB is disabled · b53d27ff
      Borislav Petkov authored
      commit ade029e2 upstream.
      
      K8_NB depends on PCI and when the last is disabled (allnoconfig) we fail
      at the final linking stage due to missing exported num_k8_northbridges.
      Add a header stub for that.
      Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      LKML-Reference: <20100503183036.GJ26107@aftab>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b53d27ff
    • Hugh Dickins's avatar
      profile: fix stats and data leakage · 7ff4b9cc
      Hugh Dickins authored
      commit 16a2164b upstream.
      
      If the kernel is large or the profiling step small, /proc/profile
      leaks data and readprofile shows silly stats, until readprofile -r
      has reset the buffer: clear the prof_buffer when it is vmalloc()ed.
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7ff4b9cc
    • Pavel Emelyanov's avatar
      inotify: don't leak user struct on inotify release · d8ca15af
      Pavel Emelyanov authored
      commit b3b38d84 upstream.
      
      inotify_new_group() receives a get_uid-ed user_struct and saves the
      reference on group->inotify_data.user.  The problem is that free_uid() is
      never called on it.
      
      Issue seem to be introduced by 63c882a0 (inotify: reimplement inotify
      using fsnotify) after 2.6.30.
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Eric Paris <eparis@parisplace.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d8ca15af
    • Eric Paris's avatar
      inotify: race use after free/double free in inotify inode marks · c606e701
      Eric Paris authored
      commit e0873344 upstream.
      
      There is a race in the inotify add/rm watch code.  A task can find and
      remove a mark which doesn't have all of it's references.  This can
      result in a use after free/double free situation.
      
      Task A					Task B
      ------------				-----------
      inotify_new_watch()
       allocate a mark (refcnt == 1)
       add it to the idr
      					inotify_rm_watch()
      					 inotify_remove_from_idr()
      					  fsnotify_put_mark()
      					      refcnt hits 0, free
       take reference because we are on idr
       [at this point it is a use after free]
       [time goes on]
       refcnt may hit 0 again, double free
      
      The fix is to take the reference BEFORE the object can be found in the
      idr.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c606e701
    • Daniel T Chen's avatar
      ALSA: hda: Fix 0 dB for Lenovo models using Conexant CX20549 (Venice) · bbd7e6ac
      Daniel T Chen authored
      commit 0ebf9e36 upstream.
      
      Reference: http://mailman.alsa-project.org/pipermail/alsa-devel/2010-May/027525.html
      
      As reported on the mailing list, we also need to cap to the 0 dB offset
      for Lenovo models, else the sound will be distorted.
      Reported-and-Tested-by: default avatarTim Starling <tstarling@wikimedia.org>
      Signed-off-by: default avatarDaniel T Chen <crimsun@ubuntu.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bbd7e6ac