1. 07 2月, 2012 1 次提交
  2. 03 2月, 2012 13 次提交
    • S
      perf: Remove deprecated WARN_ON_ONCE() · 84f2b9b2
      Stephane Eranian 提交于
      With the new throttling/unthrottling code introduced with
      commit:
      
        e050e3f0 ("perf: Fix broken interrupt rate throttling")
      
      we occasionally hit two WARN_ON_ONCE() checks in:
      
        - intel_pmu_pebs_enable()
        - intel_pmu_lbr_enable()
        - x86_pmu_start()
      
      The assertions are no longer problematic. There is a valid
      path where they can trigger but it is harmless.
      
      The assertion can be triggered with:
      
        $ perf record -e instructions:pp ....
      
      Leading to paths:
      
        intel_pmu_pebs_enable
        intel_pmu_enable_event
        x86_perf_event_set_period
        x86_pmu_start
        perf_adjust_freq_unthr_context
        perf_event_task_tick
        scheduler_tick
      
      And:
      
        intel_pmu_lbr_enable
        intel_pmu_enable_event
        x86_perf_event_set_period
        x86_pmu_start
        perf_adjust_freq_unthr_context.
        perf_event_task_tick
        scheduler_tick
      
      cpuc->enabled is always on because when we get to
      perf_adjust_freq_unthr_context() the PMU is not totally
      disabled. Furthermore when we need to adjust a period,
      we only stop the event we need to change and not the
      entire PMU. Thus, when we re-enable, cpuc->enabled is
      already set. Note that when we stop the event, both
      pebs and lbr are stopped if necessary (and possible).
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Cc: peterz@infradead.org
      Link: http://lkml.kernel.org/r/20120202110401.GA30911@quadSigned-off-by: NIngo Molnar <mingo@elte.hu>
      84f2b9b2
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 6c073a7e
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
        rbd: fix safety of rbd_put_client()
        rbd: fix a memory leak in rbd_get_client()
        ceph: create a new session lock to avoid lock inversion
        ceph: fix length validation in parse_reply_info()
        ceph: initialize client debugfs outside of monc->mutex
        ceph: change "ceph.layout" xattr to be "ceph.file.layout"
      6c073a7e
    • J
    • A
      rbd: fix safety of rbd_put_client() · d23a4b3f
      Alex Elder 提交于
      The rbd_client structure uses a kref to arrange for cleaning up and
      freeing an instance when its last reference is dropped.  The cleanup
      routine is rbd_client_release(), and one of the things it does is
      delete the rbd_client from rbd_client_list.  It acquires node_lock
      to do so, but the way it is done is still not safe.
      
      The problem is that when attempting to reuse an existing rbd_client,
      the structure found might already be in the process of getting
      destroyed and cleaned up.
      
      Here's the scenario, with "CLIENT" representing an existing
      rbd_client that's involved in the race:
      
       Thread on CPU A                | Thread on CPU B
       ---------------                | ---------------
       rbd_put_client(CLIENT)         | rbd_get_client()
         kref_put()                   |   (acquires node_lock)
           kref->refcount becomes 0   |   __rbd_client_find() returns CLIENT
           calls rbd_client_release() |   kref_get(&CLIENT->kref);
                                      |   (releases node_lock)
             (acquires node_lock)     |
             deletes CLIENT from list | ...and starts using CLIENT...
             (releases node_lock)     |
             and frees CLIENT         | <-- but CLIENT gets freed here
      
      Fix this by having rbd_put_client() acquire node_lock.  The result
      could still be improved, but at least it avoids this problem.
      Signed-off-by: NAlex Elder <elder@dreamhost.com>
      Signed-off-by: NSage Weil <sage@newdream.net>
      d23a4b3f
    • C
      Fix race in process_vm_rw_core · 8cdb878d
      Christopher Yeoh 提交于
      This fixes the race in process_vm_core found by Oleg (see
      
        http://article.gmane.org/gmane.linux.kernel/1235667/
      
      for details).
      
      This has been updated since I last sent it as the creation of the new
      mm_access() function did almost exactly the same thing as parts of the
      previous version of this patch did.
      
      In order to use mm_access() even when /proc isn't enabled, we move it to
      kernel/fork.c where other related process mm access functions already
      are.
      Signed-off-by: NChris Yeoh <yeohc@au1.ibm.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8cdb878d
    • A
      rbd: fix a memory leak in rbd_get_client() · 97bb59a0
      Alex Elder 提交于
      If an existing rbd client is found to be suitable for use in
      rbd_get_client(), the rbd_options structure is not being
      freed as it should.  Fix that.
      Signed-off-by: NAlex Elder <elder@dreamhost.com>
      Signed-off-by: NSage Weil <sage@newdream.net>
      97bb59a0
    • A
      ceph: create a new session lock to avoid lock inversion · d8fb02ab
      Alex Elder 提交于
      Lockdep was reporting a possible circular lock dependency in
      dentry_lease_is_valid().  That function needs to sample the
      session's s_cap_gen and and s_cap_ttl fields coherently, but needs
      to do so while holding a dentry lock.  The s_cap_lock field was
      being used to protect the two fields, but that can't be taken while
      holding a lock on a dentry within the session.
      
      In most cases, the s_cap_gen and s_cap_ttl fields only get operated
      on separately.  But in three cases they need to be updated together.
      Implement a new lock to protect the spots updating both fields
      atomically is required.
      Signed-off-by: NAlex Elder <elder@dreamhost.com>
      Reviewed-by: NSage Weil <sage@newdream.net>
      d8fb02ab
    • X
      ceph: fix length validation in parse_reply_info() · 32852a81
      Xi Wang 提交于
      "len" is read from network and thus needs validation.  Otherwise, given
      a bogus "len" value, p+len could be an out-of-bounds pointer, which is
      used in further parsing.
      Signed-off-by: NXi Wang <xi.wang@gmail.com>
      Signed-off-by: NSage Weil <sage@newdream.net>
      32852a81
    • S
      ceph: initialize client debugfs outside of monc->mutex · ab434b60
      Sage Weil 提交于
      Initializing debufs under monc->mutex introduces a lock dependency for
      sb->s_type->i_mutex_key, which (combined with several other dependencies)
      leads to an annoying lockdep warning.  There's no particular reason to do
      the debugfs setup under this lock, so move it out.
      
      It used to be the case that our first monmap could come from the OSD; that
      is no longer the case with recent servers, so we will reliably set up the
      client entry during the initial authentication.
      
      We don't have to worry about racing with debugfs teardown by
      ceph_debugfs_client_cleanup() because ceph_destroy_client() calls
      ceph_msgr_flush() first, which will wait for the message dispatch work
      to complete (and the debugfs init to complete).
      
      Fixes: #1940
      Signed-off-by: NSage Weil <sage@newdream.net>
      ab434b60
    • A
      ceph: change "ceph.layout" xattr to be "ceph.file.layout" · 114fc474
      Alex Elder 提交于
      The virtual extended attribute named "ceph.layout" is meaningful
      only for regular files.  Change its name to be "ceph.file.layout" to
      more directly reflect that in the ceph xattr namespace.  Preserve
      the old "ceph.layout" name for the time being (until we decide it's
      safe to get rid of it entirely).
      
      Add a missing initializer for "readonly" in the terminating entry.
      Signed-off-by: NAlex Elder <elder@dreamhost.com>
      Reviewed-by: NSage Weil <sage@newdream.net>
      114fc474
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 24b36da3
      Linus Torvalds 提交于
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon/kms/blit: fix blit copy for very large buffers
        drm/radeon/kms: fix TRAVIS panel setup
        drm/radeon: fix use after free in ATRM bios reading code.
        drm/radeon/kms: Fix device tree linkage of DP i2c buses too
        drm/radeon: Set DESKTOP_HEIGHT register to the framebuffer (not mode) height.
        drm/radeon/kms: disable output polling when suspended
        drm/nv50/pm: signedness bug in nv50_pm_clocks_pre()
        drm/nouveau/gem: fix fence_sync race / oops
        drm/nouveau: fix typo on mxmdcb option
        drm/nouveau/mxm: pretend to succeed, even if we can't shadow the MXM-SIS
        drm/nouveau/disp: check that panel power gpio is enabled at init time
      24b36da3
    • L
      Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze · c84e295b
      Linus Torvalds 提交于
      * 'next' of git://git.monstr.eu/linux-2.6-microblaze:
        Revert "microblaze: Add topology init"
      c84e295b
    • L
      Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus',... · 2f2fde92
      Linus Torvalds 提交于
      Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus', 'sched-urgent-for-linus' and 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        bugs, x86: Fix printk levels for panic, softlockups and stack dumps
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf top: Fix number of samples displayed
        perf tools: Fix strlen() bug in perf_event__synthesize_event_type()
        perf tools: Fix broken build by defining _GNU_SOURCE in Makefile
        x86/dumpstack: Remove unneeded check in dump_trace()
        perf: Fix broken interrupt rate throttling
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/rt: Fix task stack corruption under __ARCH_WANT_INTERRUPTS_ON_CTXSW
        sched: Fix ancient race in do_exit()
        sched/nohz: Fix nohz cpu idle load balancing state with cpu hotplug
        sched/s390: Fix compile error in sched/core.c
        sched: Fix rq->nr_uninterruptible update race
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/reboot: Remove VersaLogic Menlow reboot quirk
        x86/reboot: Skip DMI checks if reboot set by user
        x86: Properly parenthesize cmpxchg() macro arguments
      2f2fde92
  3. 02 2月, 2012 15 次提交
  4. 01 2月, 2012 11 次提交