1. 16 1月, 2015 1 次提交
    • S
      perf/rapl: Fix sysfs_show() initialization for RAPL PMU · 433678bd
      Stephane Eranian 提交于
      This patch fixes a problem with the initialization of the
      sysfs_show() routine for the RAPL PMU.
      
      The current code was wrongly relying on the EVENT_ATTR_STR()
      macro which uses the events_sysfs_show() function in the x86
      PMU code. That function itself was relying on the x86_pmu data
      structure. Yet RAPL and the core PMU (x86_pmu) have nothing to
      do with each other. They should therefore not interact with
      each other.
      
      The x86_pmu structure is initialized at boot time based on
      the host CPU model. When the host CPU is not supported, the
      x86_pmu remains uninitialized and some of the callbacks it
      contains are NULL.
      
      The false dependency with x86_pmu could potentially cause crashes
      in case the x86_pmu is not initialized while the RAPL PMU is. This
      may, for instance, be the case in virtualized environments.
      
      This patch fixes the problem by using a private sysfs_show()
      routine for exporting the RAPL PMU events.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20150113225953.GA21525@thinkpad
      Cc: vincent.weaver@maine.edu
      Cc: jolsa@redhat.com
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      433678bd
  2. 15 1月, 2015 16 次提交
  3. 14 1月, 2015 14 次提交
  4. 13 1月, 2015 9 次提交
    • N
      locks: fix NULL-deref in generic_delete_lease · 52d304eb
      NeilBrown 提交于
      commit 0efaa7e8
        locks: generic_delete_lease doesn't need a file_lock at all
      
      moves the call to fl->fl_lmops->lm_change() to a place in the
      code where fl might be a non-lease lock.
      When that happens, fl_lmops is NULL and an Oops ensures.
      
      So add an extra test to restore correct functioning.
      Reported-by: NLinda Walsh <suse@tlinx.org>
      Link: https://bugzilla.suse.com/show_bug.cgi?id=912569
      Cc: stable@vger.kernel.org (v3.18)
      Fixes: 0efaa7e8Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJeff Layton <jlayton@primarydata.com>
      52d304eb
    • J
      x86/xen: properly retrieve NMI reason · f221b04f
      Jan Beulich 提交于
      Using the native code here can't work properly, as the hypervisor would
      normally have cleared the two reason bits by the time Dom0 gets to see
      the NMI (if passed to it at all). There's a shared info field for this,
      and there's an existing hook to use - just fit the two together. This
      is particularly relevant so that NMIs intended to be handled by APEI /
      GHES actually make it to the respective handler.
      
      Note that the hook can (and should) be used irrespective of whether
      being in Dom0, as accessing port 0x61 in a DomU would be even worse,
      while the shared info field would just hold zero all the time. Note
      further that hardware NMI handling for PVH doesn't currently work
      anyway due to missing code in the hypervisor (but it is expected to
      work the native rather than the PV way).
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      f221b04f
    • L
      Merge tag 'gpio-v3.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 971780b7
      Linus Torvalds 提交于
      Pull gpio fixes from Linus Walleij:
       "Here are some GPIO fixes, mainly affecting the DLN2 IRQ handling.
        Nothing special about them, just fixes:
      
         - Three patches fixing IRQ handling for the DLN2
         - Null pointer handling for grgpio"
      
      * tag 'gpio-v3.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: dln2: use bus_sync_unlock instead of scheduling work
        gpio: grgpio: Avoid potential NULL pointer dereference
        gpio: dln2: Fix gpio output value in dln2_gpio_direction_output()
        gpio: dln2: fix issue when an IRQ is unmasked then enabled
      971780b7
    • L
      Merge tag 'mmc-v3.19-3' of git://git.linaro.org/people/ulf.hansson/mmc · 904a9802
      Linus Torvalds 提交于
      Pull MMC fixes from Ulf Hansson:
       "MMC host:
         - sdhci-pci|acpi: Support some new IDs
         - sdhci: Fix sleep from atomic context
         - sdhci-pxav3: Prevent hang during ->probe()
         - sdhci: Disable re-tuning for HS400"
      
      * tag 'mmc-v3.19-3' of git://git.linaro.org/people/ulf.hansson/mmc:
        mmc: sdhci-pci: Add support for Intel SPT
        mmc: sdhci-acpi: Add ACPI HID INT344D
        mmc: sdhci: Fix sleep in atomic after inserting SD card
        mmc: sdhci-pxav3: do the mbus window configuration after enabling clocks
        mmc: sdhci: Disable re-tuning for HS400
        mmc: sdhci: Simplify use of tuning timer
        mmc: sdhci: Add out_unlock to sdhci_execute_tuning
        mmc: sdhci: Tuning should not change max_blk_count
      904a9802
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · fb43bd08
      Linus Torvalds 提交于
      Pull scsi target fixes from Nicholas Bellinger:
       "Mostly minor fixes this time, including:
      
         - Add missing virtio-scsi -> TCM attribute conversion in vhost-scsi.
         - Fix persistent reservations write exclusive handling to allow
           readers for all registered I_T nexuses.
         - Drop arbitrary maximum I/O size limit in order to process I/Os
           larger than 4 MB, required for initiators that don't honor block
           limits EVPD.
         - Drop the now left-over fabric_max_sectors attribute"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        iscsi-target: Fix typos in enum cmd_flags_table
        MAINTAINERS: Add entry for iSER target driver
        target: Allow Write Exclusive non-reservation holders to READ
        target: Drop left-over fabric_max_sectors attribute
        target: Drop arbitrary maximum I/O size limit
        Documentation/target: Update fabric_ops to latest code
        vhost-scsi: Add missing virtio-scsi -> TCM attribute conversion
      fb43bd08
    • W
      mm: mmu_gather: use tlb->end != 0 only for TLB invalidation · 721c21c1
      Will Deacon 提交于
      When batching up address ranges for TLB invalidation, we check tlb->end
      != 0 to indicate that some pages have actually been unmapped.
      
      As of commit f045bbb9 ("mmu_gather: fix over-eager
      tlb_flush_mmu_free() calling"), we use the same check for freeing these
      pages in order to avoid a performance regression where we call
      free_pages_and_swap_cache even when no pages are actually queued up.
      
      Unfortunately, the range could have been reset (tlb->end = 0) by
      tlb_end_vma, which has been shown to cause memory leaks on arm64.
      Furthermore, investigation into these leaks revealed that the fullmm
      case on task exit no longer invalidates the TLB, by virtue of tlb->end
       == 0 (in 3.18, need_flush would have been set).
      
      This patch resolves the problem by reverting commit f045bbb9, using
      instead tlb->local.nr as the predicate for page freeing in
      tlb_flush_mmu_free and ensuring that tlb->end is initialised to a
      non-zero value in the fullmm case.
      Tested-by: NMark Langsdorf <mlangsdo@redhat.com>
      Tested-by: NDave Hansen <dave@sr71.net>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      721c21c1
    • A
      usb/kaweth: use GFP_ATOMIC under spin_lock in usb_start_wait_urb() · 49c9e7c2
      Alexey Khoroshilov 提交于
      Commit e4c7f259 ("USB: kaweth.c: use GFP_ATOMIC under spin_lock")
      makes sure that kaweth_internal_control_msg() allocates memory with GFP_ATOMIC,
      but kaweth_internal_control_msg() also calls usb_start_wait_urb()
      that still allocates memory with GFP_NOIO.
      
      The patch fixes usb_start_wait_urb() as well.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Acked-by: NOliver Neukum <oliver@neukum.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49c9e7c2
    • T
      MAINTAINERS: add me as ibmveth maintainer · eddd63a6
      Thomas Falcon 提交于
      Adding myself as the ibmveth maintainer and replacing
      Santiago Leon.
      Signed-off-by: NThomas Falcon <tlfalcon@linux.vnet.ibm.com>
      Cc: Santiago Leon <santi_leon@yahoo.com>
      Cc: Brian King <brking@linux.vnet.ibm.com>
      Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eddd63a6
    • J
      tipc: fix bug in broadcast retransmit code · 16416779
      Jon Paul Maloy 提交于
      In commit 58dc55f2 ("tipc: use generic
      SKB list APIs to manage link transmission queue") we replace all list
      traversal loops with the macros skb_queue_walk() or
      skb_queue_walk_safe(). While the previous loops were based on the
      assumption that the list was NULL-terminated, the standard macros
      stop when the iterator reaches the list head, which is non-NULL.
      
      In the function bclink_retransmit_pkt() this macro replacement has
      lead to a bug. When we receive a BCAST STATE_MSG we unconditionally
      call the function bclink_retransmit_pkt(), whether there really is
      anything to retransmit or not, assuming that the sequence number
      comparisons will lead to the correct behavior. However, if the
      transmission queue is empty, or if there are no eligible buffers in
      the transmission queue, we will by mistake pass the list head pointer
      to the function tipc_link_retransmit(). Since the list head is not a
      valid sk_buff, this leads to a crash.
      
      In this commit we fix this by only calling tipc_link_retransmit()
      if we actually found eligible buffers in the transmission queue.
      Reviewed-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      16416779