1. 05 Jul, 2010 8 commits
    • Neil Brown's avatar
      VFS: fix recent breakage of FS_REVAL_DOT · b55e3457
      Neil Brown authored
      commit 176306f5 upstream.
      
      Commit 1f36f774 broke FS_REVAL_DOT semantics.
      
      In particular, before this patch, the command
         ls -l
      in an NFS mounted directory would always check if the directory on the server
      had changed and if so would flush and refill the pagecache for the dir.
      After this patch, the same "ls -l" will repeatedly return stale date until
      the cached attributes for the directory time out.
      
      The following patch fixes this by ensuring the d_revalidate is called by
      do_last when "." is being looked-up.
      link_path_walk has already called d_revalidate, but in that case LOOKUP_OPEN
      is not set so nfs_lookup_verify_inode chooses not to do any validation.
      
      The following patch restores the original behaviour.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b55e3457
    • Al Viro's avatar
      Fix racy use of anon_inode_getfd() in perf_event.c · 9521ba4a
      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>
      9521ba4a
    • Peter Zijlstra's avatar
      perf: Fix exit() vs event-groups · 81bec1f5
      Peter Zijlstra authored
      commit 96c21a46 upstream.
      
      Corey reported that the value scale times of group siblings are not
      updated when the monitored task dies.
      
      The problem appears to be that we only update the group leader's
      time values, fix it by updating the whole group.
      Reported-by: default avatarCorey Ashford <cjashfor@linux.vnet.ibm.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1273588935.1810.6.camel@laptop>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      81bec1f5
    • Arnaldo Carvalho de Melo's avatar
      perf top: Properly notify the user that vmlinux is missing · ecd8a95f
      Arnaldo Carvalho de Melo authored
      commit b0a9ab62 upstream.
      
      Before this patch this message would very briefly appear on the
      screen and then the screen would get updates only on the top,
      for number of interrupts received, etc, but no annotation would
      be performed:
      
       [root@doppio linux-2.6-tip]# perf top -s n_tty_write > /tmp/bla
       objdump: '[kernel.kallsyms]': No such file
      
      Now this is what the user gets:
      
       [root@doppio linux-2.6-tip]# perf top -s n_tty_write
       Can't annotate n_tty_write: No vmlinux file was found in the
       path: [0] vmlinux
       [1] /boot/vmlinux
       [2] /boot/vmlinux-2.6.33-rc5
       [3] /lib/modules/2.6.33-rc5/build/vmlinux
       [4] /usr/lib/debug/lib/modules/2.6.33-rc5/vmlinux
       [root@doppio linux-2.6-tip]#
      
      This bug was introduced when we added automatic search for
      vmlinux, before that time the user had to specify a vmlinux
      file.
      Reported-by: default avatarDavid S. Miller <davem@davemloft.net>
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1268664418-28328-2-git-send-email-acme@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ecd8a95f
    • Peter Zijlstra's avatar
      perf: Fix exit() vs PERF_FORMAT_GROUP · 03d7c94a
      Peter Zijlstra authored
      commit 050735b0 upstream.
      
      Both Stephane and Corey reported that PERF_FORMAT_GROUP didn't
      work as expected if the task the counters were attached to quit
      before the read() call.
      
      The cause is that we unconditionally destroy the grouping when
      we remove counters from their context. Fix this by splitting off
      the group destroy from the list removal such that
      perf_event_remove_from_context() does not do this and change
      perf_event_release() to do so.
      Reported-by: default avatarCorey Ashford <cjashfor@linux.vnet.ibm.com>
      Reported-by: default avatarStephane Eranian <eranian@google.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1273571513.5605.3527.camel@twins>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      03d7c94a
    • Ian Munsie's avatar
      perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() · 08959bab
      Ian Munsie authored
      commit c0555642 upstream.
      
      Parsing an option from the command line with OPT_BOOLEAN on a
      bool data type would not work on a big-endian machine due to the
      manner in which the boolean was being cast into an int and
      incremented. For example, running 'perf probe --list' on a
      PowerPC machine would fail to properly set the list_events bool
      and would therefore print out the usage information and
      terminate.
      
      This patch makes OPT_BOOLEAN work as expected with a bool
      datatype. For cases where the original OPT_BOOLEAN was
      intentionally being used to increment an int each time it was
      passed in on the command line, this patch introduces OPT_INCR
      with the old behaviour of OPT_BOOLEAN (the verbose variable is
      currently the only such example of this).
      
      I have reviewed every use of OPT_BOOLEAN to verify that a true
      C99 bool was passed. Where integers were used, I verified that
      they were only being used for boolean logic and changed them to
      bools to ensure that they would not be mistakenly used as ints.
      The major exception was the verbose variable which now uses
      OPT_INCR instead of OPT_BOOLEAN.
      Signed-off-by: default avatarIan Munsie <imunsie@au.ibm.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: <stable@kernel.org>
      Cc: Git development list <git@vger.kernel.org>
      Cc: Ian Munsie <imunsie@au1.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Eric B Munson <ebmunson@us.ibm.com>
      Cc: Valdis.Kletnieks@vt.edu
      Cc: WANG Cong <amwang@redhat.com>
      Cc: Thiago Farina <tfransosi@gmail.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1271147857-11604-1-git-send-email-imunsie@au.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      08959bab
    • Andi Kleen's avatar
      oprofile: remove double ring buffering · a3f7f054
      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>
      a3f7f054
    • Robert Richter's avatar
      oprofile/x86: fix uninitialized counter usage during cpu hotplug · ae39937e
      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>
      ae39937e
  2. 16 May, 2010 6 commits
  3. 15 May, 2010 17 commits
  4. 14 May, 2010 9 commits
    • H. Peter Anvin's avatar
      x86, mrst: Don't blindly access extended config space · e9b1d5d0
      H. Peter Anvin authored
      Do not blindly access extended configuration space unless we actively
      know we're on a Moorestown platform.  The fixed-size BAR capability
      lives in the extended configuration space, and thus is not applicable
      if the configuration space isn't appropriately sized.
      
      This fixes booting certain VMware configurations with CONFIG_MRST=y.
      
      Moorestown will add a fake PCI-X 266 capability to advertise the
      presence of extended configuration space.
      Reported-and-tested-by: default avatarPetr Vandrovec <petr@vandrovec.name>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Acked-by: default avatarJacob Pan <jacob.jun.pan@intel.com>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      LKML-Reference: <AANLkTiltKUa3TrKR1M51eGw8FLNoQJSLT0k0_K5X3-OJ@mail.gmail.com>
      e9b1d5d0
    • Linus Torvalds's avatar
      Merge branch 'x86-fixes-for-linus' of... · ef0e9180
      Linus Torvalds authored
      Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/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, cacheinfo: Turn off L3 cache index disable feature in virtualized environments
        x86, k8: Fix build error when K8_NB is disabled
        x86, amd: Check X86_FEATURE_OSVW bit before accessing OSVW MSRs
        x86: Fix fake apicid to node mapping for numa emulation
      ef0e9180
    • Frank Arnold's avatar
      x86, cacheinfo: Turn off L3 cache index disable feature in virtualized environments · 7f284d3c
      Frank Arnold authored
      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>
      Cc: <stable@kernel.org>
      7f284d3c
    • Borislav Petkov's avatar
      x86, k8: Fix build error when K8_NB is disabled · ade029e2
      Borislav Petkov authored
      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>
      Cc: <stable@kernel.org>
      ade029e2
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify · 4fc4c3ce
      Linus Torvalds authored
      * 'for-linus' of git://git.infradead.org/users/eparis/notify:
        inotify: don't leak user struct on inotify release
        inotify: race use after free/double free in inotify inode marks
        inotify: clean up the inotify_add_watch out path
        Inotify: undefined reference to `anon_inode_getfd'
      
      Manual merge to remove duplicate "select ANON_INODES" from Kconfig file
      4fc4c3ce
    • Linus Torvalds's avatar
      Merge branch 'davinci-fixes-for-linus-2' of... · 97b2073f
      Linus Torvalds authored
      Merge branch 'davinci-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
      
      * 'davinci-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci:
        DA830: fix USB 2.0 clock entry
      97b2073f
    • Sergei Shtylyov's avatar
      DA830: fix USB 2.0 clock entry · b9af5ddf
      Sergei Shtylyov authored
      DA8xx OHCI driver fails to load due to failing clk_get() call for the USB 2.0
      clock. Arrange matching USB 2.0 clock by the clock name instead of the device.
      (Adding another CLK() entry for "ohci.0" device won't do -- in the future I'll
      also have to enable USB 2.0 clock to configure CPPI 4.1 module, in which case
      I won't have any device at all.)
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      b9af5ddf
    • Pavel Emelyanov's avatar
      inotify: don't leak user struct on inotify release · b3b38d84
      Pavel Emelyanov authored
      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>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      b3b38d84
    • Eric Paris's avatar
      inotify: race use after free/double free in inotify inode marks · e0873344
      Eric Paris authored
      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>
      Cc: <stable@kernel.org>
      e0873344