Skip to content
  1. Nov 03, 2012
  2. Nov 02, 2012
  3. Nov 01, 2012
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 8c23f406
      Linus Torvalds authored
      Pull KVM fix from Marcelo Tosatti.
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: fix vcpu->mmio_fragments overflow
      8c23f406
    • Steve Hodgson's avatar
      target: Fix incorrect usage of nested IRQ spinlocks in ABORT_TASK path · ab74b3d6
      Steve Hodgson authored
      
      
      This patch changes core_tmr_abort_task() to use spin_lock -> spin_unlock
      around se_cmd->t_state_lock while spin_lock_irqsave is held via
      se_sess->sess_cmd_lock.
      
      Signed-off-by: default avatarSteve Hodgson <steve@purestorage.com>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      ab74b3d6
    • Roland Dreier's avatar
      iscsi-target: Fix missed wakeup race in TX thread · d5627acb
      Roland Dreier authored
      
      
      The sleeping code in iscsi_target_tx_thread() is susceptible to the classic
      missed wakeup race:
      
       - TX thread finishes handle_immediate_queue() and handle_response_queue(),
         thinks both queues are empty.
       - Another thread adds a queue entry and does wake_up_process(), which does
         nothing because the TX thread is still awake.
       - TX thread does schedule_timeout() and sleeps forever.
      
      In practice this can kill an iSCSI connection if for example an initiator
      does single-threaded writes and the target misses the wakeup window when
      queueing an R2T; in this case the connection will be stuck until the
      initiator loses patience and does some task management operation (or kills
      the connection entirely).
      
      Fix this by converting to wait_event_interruptible(), which does not
      suffer from this sort of race.
      
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      d5627acb
    • Roland Dreier's avatar
      target: Avoid integer overflow in se_dev_align_max_sectors() · 3e03989b
      Roland Dreier authored
      
      
      The expression (max_sectors * block_size) might overflow a u32
      (indeed, since iblock sets max_hw_sectors to UINT_MAX, it is
      guaranteed to overflow and end up with a much-too-small result in many
      common cases).  Fix this by doing an equivalent calculation that
      doesn't require multiplication.
      
      While we're touching this code, avoid splitting a printk format across
      two lines and use pr_info(...) instead of printk(KERN_INFO ...).
      
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      3e03989b
    • Roland Dreier's avatar
      target: Don't return success from module_init() if setup fails · 0d0f9dfb
      Roland Dreier authored
      
      
      If the call to core_dev_release_virtual_lun0() fails, then nothing
      sets ret to anything other than 0, so even though everything is
      torn down and freed, target_core_init_configfs() will seem to succeed
      and the module will be loaded.  Fix this by passing the return value
      on up the chain.
      
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      0d0f9dfb
    • Nicholas Bellinger's avatar
      target: Re-add explict zeroing of INQUIRY bounce buffer memory · dea5f099
      Nicholas Bellinger authored
      This patch fixes a regression in spc_emulate_inquiry() code where the
      local scope bounce buffer was no longer getting it's memory zeroed,
      causing various problems with SCSI initiators that depend upon areas
      of INQUIRY EVPD=0x83 payload having been zeroed.
      
      This bug was introduced with the following v3.7-rc1 patch + CC'ed
      stable commit:
      
      commit ffe7b0e9
      
      
      Author: Paolo Bonzini <pbonzini@redhat.com>
      Date:   Fri Sep 7 17:30:38 2012 +0200
      
          target: support zero allocation length in INQUIRY
      
      Go ahead and re-add the missing memset of bounce buffer memory to be
      copied into the outgoing se_cmd descriptor kmapped SGL payload.
      
      Reported-by: default avatarKelsey Prantis <kelsey.prantis@intel.com>
      Cc: Kelsey Prantis <kelsey.prantis@intel.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      dea5f099
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 1e207eb1
      Linus Torvalds authored
      Pull scsi target fixes from Nicholas Bellinger:
       "These are the current target pending fixes headed for v3.7-rc4 code.
        This includes the following highlights:
      
         - Fix long-standing qla2xxx target bug where certain fc_port_t state
           transitions could cause the internal session b-tree list to become
           out-of-sync.  (Roland)
         - Fix task management double free of se_cmd descriptor in exception
           path for users of target_submit_tmr().  (nab)
         - Re-introduce simple NOP emulation of REZERO_UNIT, SEEK_6, and
           SEEK_10 SCSI-2 commands in order to support legacy initiators that
           still require them.  (Bernhard)
      
        Note these three patches are also CC'ed to stable.
      
        Also, there a couple of outstanding (external) regressions that are
        still being tracked down for tcm_fc(FCoE) and tcm_vhost fabrics for
        v3.7.0 code, so please expect another PULL as these issues identified
        -> resolved."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        target: reintroduce some obsolete SCSI-2 commands
        target: Fix double-free of se_cmd in target_complete_tmr_failure
        qla2xxx: Update target lookup session tables when a target session changes
        tcm_qla2xxx: Format VPD page 83h SCSI name string according to SPC
        qla2xxx: Add missing ->vport_slock while calling qlt_update_vp_map
      1e207eb1
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · ed48c06c
      Linus Torvalds authored
      Pull nouveau fixes from Dave Airlie:
       "Just a nouveau set, since we have a couple of reports on lkml and
        dri-devel of regressions that this should fix I sent it along on its
        own."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau: headless mode by default if pci class != vga display
        drm/nouveau: resurrect headless mode since rework
        drm/nv50/fb: prevent oops on chipsets without compression tags
        drm/nouveau: allow creation of zero-sized mm
        drm/nouveau/i2c: fix typo when checking nvio i2c port validity
        drm/nouveau: silence modesetting spam on pre-gf8 chipsets
      ed48c06c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 296bac30
      Linus Torvalds authored
      Pull HID updates from Jiri Kosina:
       "This contains fixes for two devices by Jiri Slaby and Xianhan Yu, new
        device IDs for MacBook Pro 10,2 from Dirk Hohndel and generic
        multitouch code fix from Alan Cox."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: Add support for the MacBook Pro 10,2 keyboard / touchpad
        HID: multitouch: fix maxcontacts problem on GeneralTouch
        HID: multitouch: put the case in the right switch statement
        HID: microsoft: fix invalid rdesc for 3k kbd
      296bac30
    • Linus Torvalds's avatar
      Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 33046957
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "This contains unexpectedly many changes in a wide range due to the
        fixes for races at disconnection of USB audio devices.  In the end, we
        end up covering fairly core parts of sound subsystem.
      
        Other than that, just a few usual small fixes."
      
      * tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: ice1724: Fix rate setup after resume
        ALSA: Avoid endless sleep after disconnect
        ALSA: Add a reference counter to card instance
        ALSA: usb-audio: Fix races at disconnection in mixer_quirks.c
        ALSA: usb-audio: Use rwsem for disconnect protection
        ALSA: usb-audio: Fix races at disconnection
        ALSA: PCM: Fix some races at disconnection
        ASoC: omap-dmic: Correct functional clock name
        ASoC: zoom2: Fix compile error by including correct header files
        ALSA: hda - Fix mute-LED setup for HP dv5 laptop
      33046957
    • Xiao Guangrong's avatar
      KVM: x86: fix vcpu->mmio_fragments overflow · 87da7e66
      Xiao Guangrong authored
      After commit b3356bf0
      
       (KVM: emulator: optimize "rep ins" handling),
      the pieces of io data can be collected and write them to the guest memory
      or MMIO together
      
      Unfortunately, kvm splits the mmio access into 8 bytes and store them to
      vcpu->mmio_fragments. If the guest uses "rep ins" to move large data, it
      will cause vcpu->mmio_fragments overflow
      
      The bug can be exposed by isapc (-M isapc):
      
      [23154.818733] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
      [ ......]
      [23154.858083] Call Trace:
      [23154.859874]  [<ffffffffa04f0e17>] kvm_get_cr8+0x1d/0x28 [kvm]
      [23154.861677]  [<ffffffffa04fa6d4>] kvm_arch_vcpu_ioctl_run+0xcda/0xe45 [kvm]
      [23154.863604]  [<ffffffffa04f5a1a>] ? kvm_arch_vcpu_load+0x17b/0x180 [kvm]
      
      Actually, we can use one mmio_fragment to store a large mmio access then
      split it when we pass the mmio-exit-info to userspace. After that, we only
      need two entries to store mmio info for the cross-mmio pages access
      
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      87da7e66
    • Konrad Rzeszutek Wilk's avatar
      xen/mmu: Use Xen specific TLB flush instead of the generic one. · 95a7d768
      Konrad Rzeszutek Wilk authored
      
      
      As Mukesh explained it, the MMUEXT_TLB_FLUSH_ALL allows the
      hypervisor to do a TLB flush on all active vCPUs. If instead
      we were using the generic one (which ends up being xen_flush_tlb)
      we end up making the MMUEXT_TLB_FLUSH_LOCAL hypercall. But
      before we make that hypercall the kernel will IPI all of the
      vCPUs (even those that were asleep from the hypervisor
      perspective). The end result is that we needlessly wake them
      up and do a TLB flush when we can just let the hypervisor
      do it correctly.
      
      This patch gives around 50% speed improvement when migrating
      idle guest's from one host to another.
      
      Oracle-bug: 14630170
      
      CC: stable@vger.kernel.org
      Tested-by: default avatarJingjie Jiang <jingjie.jiang@oracle.com>
      Suggested-by: default avatarMukesh Rathor <mukesh.rathor@oracle.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      95a7d768
  4. Oct 31, 2012