1. 24 Oct, 2012 21 commits
  2. 23 Oct, 2012 13 commits
  3. 22 Oct, 2012 6 commits
    • Lukas Czerner's avatar
      ext4: Avoid underflow in ext4_trim_fs() · 5de35e8d
      Lukas Czerner authored
      Currently if len argument in ext4_trim_fs() is smaller than one block,
      the 'end' variable underflow. Avoid that by returning EINVAL if len is
      smaller than file system block.
      
      Also remove useless unlikely().
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      5de35e8d
    • Sasha Levin's avatar
      KVM guest: exit idleness when handling KVM_PV_REASON_PAGE_NOT_PRESENT · c5e015d4
      Sasha Levin authored
      KVM_PV_REASON_PAGE_NOT_PRESENT kicks cpu out of idleness, but we haven't
      marked that spot as an exit from idleness.
      
      Not doing so can cause RCU warnings such as:
      
      [  732.788386] ===============================
      [  732.789803] [ INFO: suspicious RCU usage. ]
      [  732.790032] 3.7.0-rc1-next-20121019-sasha-00002-g6d8d02d-dirty #63 Tainted: G        W
      [  732.790032] -------------------------------
      [  732.790032] include/linux/rcupdate.h:738 rcu_read_lock() used illegally while idle!
      [  732.790032]
      [  732.790032] other info that might help us debug this:
      [  732.790032]
      [  732.790032]
      [  732.790032] RCU used illegally from idle CPU!
      [  732.790032] rcu_scheduler_active = 1, debug_locks = 1
      [  732.790032] RCU used illegally from extended quiescent state!
      [  732.790032] 2 locks held by trinity-child31/8252:
      [  732.790032]  #0:  (&rq->lock){-.-.-.}, at: [<ffffffff83a67528>] __schedule+0x178/0x8f0
      [  732.790032]  #1:  (rcu_read_lock){.+.+..}, at: [<ffffffff81152bde>] cpuacct_charge+0xe/0x200
      [  732.790032]
      [  732.790032] stack backtrace:
      [  732.790032] Pid: 8252, comm: trinity-child31 Tainted: G        W    3.7.0-rc1-next-20121019-sasha-00002-g6d8d02d-dirty #63
      [  732.790032] Call Trace:
      [  732.790032]  [<ffffffff8118266b>] lockdep_rcu_suspicious+0x10b/0x120
      [  732.790032]  [<ffffffff81152c60>] cpuacct_charge+0x90/0x200
      [  732.790032]  [<ffffffff81152bde>] ? cpuacct_charge+0xe/0x200
      [  732.790032]  [<ffffffff81158093>] update_curr+0x1a3/0x270
      [  732.790032]  [<ffffffff81158a6a>] dequeue_entity+0x2a/0x210
      [  732.790032]  [<ffffffff81158ea5>] dequeue_task_fair+0x45/0x130
      [  732.790032]  [<ffffffff8114ae29>] dequeue_task+0x89/0xa0
      [  732.790032]  [<ffffffff8114bb9e>] deactivate_task+0x1e/0x20
      [  732.790032]  [<ffffffff83a67c29>] __schedule+0x879/0x8f0
      [  732.790032]  [<ffffffff8117e20d>] ? trace_hardirqs_off+0xd/0x10
      [  732.790032]  [<ffffffff810a37a5>] ? kvm_async_pf_task_wait+0x1d5/0x2b0
      [  732.790032]  [<ffffffff83a67cf5>] schedule+0x55/0x60
      [  732.790032]  [<ffffffff810a37c4>] kvm_async_pf_task_wait+0x1f4/0x2b0
      [  732.790032]  [<ffffffff81139e50>] ? abort_exclusive_wait+0xb0/0xb0
      [  732.790032]  [<ffffffff81139c25>] ? prepare_to_wait+0x25/0x90
      [  732.790032]  [<ffffffff810a3a66>] do_async_page_fault+0x56/0xa0
      [  732.790032]  [<ffffffff83a6a6e8>] async_page_fault+0x28/0x30
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Acked-by: default avatarGleb Natapov <gleb@redhat.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      c5e015d4
    • Gleb Natapov's avatar
      7f46ddbd
    • Xiao Guangrong's avatar
      KVM: MMU: fix release noslot pfn · f3ac1a4b
      Xiao Guangrong authored
      We can not directly call kvm_release_pfn_clean to release the pfn
      since we can meet noslot pfn which is used to cache mmio info into
      spte
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      f3ac1a4b
    • Jiri Olsa's avatar
      perf test: Fix exclude_guest parse events tests · 42be7398
      Jiri Olsa authored
      Event parsing tests are broken by following commit:
      
        perf tool: Precise mode requires exclude_guest
        commit 1342798c
        Author: David Ahern <dsahern@gmail.com>
        Date:   Thu Sep 13 14:59:13 2012 -0600
      
      which enables 'exclude_guest' modifier any time the 'precise'
      modifier is detected.
      
      Fixing related tests and adding special comment.
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Tested-by: default avatarDavid Ahern <dsahern@gmail.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      42be7398
    • Luigi Semenzato's avatar
      perf tools: do not flush maps on COMM for perf report · 9fdbf671
      Luigi Semenzato authored
      This fixes a long-standing bug caused by the lack of separate COMM and EXEC
      record types, which makes "perf report" lose track of symbols when a process
      renames itself.
      
      With this fix (suggested by Stephane Eranian), a COMM (rename) no longer
      flushes the maps, which is the correct behavior.  An EXEC also no longer
      flushes the maps, but this doesn't matter because as new mappings are created
      (for the executable and the libraries) the old mappings are automatically
      removed.  This is not by accident: the functionality is necessary because DLLs
      can be explicitly loaded at any time with dlopen(), possibly on top of existing
      text, so "perf report" handles correctly the clobbering of new mappings on top
      of old ones.
      
      An alternative patch (which I proposed earlier) would be to introduce a
      separate PERF_RECORD_EXEC type, but it is a much larger change (about 300
      lines) and is not necessary.
      Signed-off-by: default avatarLuigi Semenzato <semenzato@chromium.org>
      Tested-by: default avatarStephane Eranian <eranian@google.com>
      Acked-by: default avatarStephane Eranian <eranian@google.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Olof Johansson <olofj@chromium.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Sonny Rao <sonnyrao@chromium.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Wilson <wilsons@start.ca>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Vasiliy Kulikov <segoon@openwall.com>
      Link: http://lkml.kernel.org/r/1345585940-6497-1-git-send-email-semenzato@chromium.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9fdbf671