1. 12 12月, 2015 1 次提交
    • M
      xhci: fix usb2 resume timing and races. · f69115fd
      Mathias Nyman 提交于
      According to USB 2 specs ports need to signal resume for at least 20ms,
      in practice even longer, before moving to U0 state.
      Both host and devices can initiate resume.
      
      On device initiated resume, a port status interrupt with the port in resume
      state in issued. The interrupt handler tags a resume_done[port]
      timestamp with current time + USB_RESUME_TIMEOUT, and kick roothub timer.
      Root hub timer requests for port status, finds the port in resume state,
      checks if resume_done[port] timestamp passed, and set port to U0 state.
      
      On host initiated resume, current code sets the port to resume state,
      sleep 20ms, and finally sets the port to U0 state. This should also
      be changed to work in a similar way as the device initiated resume, with
      timestamp tagging, but that is not yet tested and will be a separate
      fix later.
      
      There are a few issues with this approach
      
      1. A host initiated resume will also generate a resume event. The event
         handler will find the port in resume state, believe it's a device
         initiated resume, and act accordingly.
      
      2. A port status request might cut the resume signalling short if a
         get_port_status request is handled during the host resume signalling.
         The port will be found in resume state. The timestamp is not set leading
         to time_after_eq(jiffies, timestamp) returning true, as timestamp = 0.
         get_port_status will proceed with moving the port to U0.
      
      3. If an error, or anything else happens to the port during device
         initiated resume signalling it will leave all the device resume
         parameters hanging uncleared, preventing further suspend, returning
         -EBUSY, and cause the pm thread to busyloop trying to enter suspend.
      
      Fix this by using the existing resuming_ports bitfield to indicate that
      resume signalling timing is taken care of.
      Check if the resume_done[port] is set before using it for timestamp
      comparison, and also clear out any resume signalling related variables
      if port is not in U0 or Resume state
      
      This issue was discovered when a PM thread busylooped, trying to runtime
      suspend the xhci USB 2 roothub on a Dell XPS
      
      Cc: stable <stable@vger.kernel.org>
      Reported-by: NDaniel J Blueman <daniel@quora.org>
      Tested-by: NDaniel J Blueman <daniel@quora.org>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f69115fd
  2. 10 12月, 2015 1 次提交
    • G
      Merge tag 'fixes-for-v4.4-rc5' of... · 73b39bb0
      Greg Kroah-Hartman 提交于
      Merge tag 'fixes-for-v4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
      
      Felipe writes:
      
      usb: fixes for-v4.4-rc5
      
      Hopefully final set of fixes for v4.4 release cycle.
      
      There's a fix for a regression on dwc3 caused by recent changes to how
      transfers are started. We're not pre-starting interrupt endpoints
      anymore.
      
      A NULL pointer dereference fix for the MSM phy driver.
      
      The UVC gadget got a minor fix for permissions to its configfs
      attributes and, finally, two fixes for MUSB. A fix for PM runtime when
      MUSB returns EPROBE_DEFER and a fix to actually return an error in case
      we can't initialize a DMA engine.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      73b39bb0
  3. 09 12月, 2015 1 次提交
  4. 08 12月, 2015 3 次提交
  5. 05 12月, 2015 4 次提交
    • A
      USB: host: ohci-at91: fix a crash in ohci_hcd_at91_overcurrent_irq · 4a0c4c36
      Alexandre Belloni 提交于
      The interrupt handler, ohci_hcd_at91_overcurrent_irq may be called right
      after registration. At that time, pdev->dev.platform_data is not yet set,
      leading to a NULL pointer dereference.
      
      Fixes: e4df9227 (USB: host: ohci-at91: merge loops in ohci_hcd_at91_drv_probe)
      Reported-by: NPeter Rosin <peda@axentia.se>
      Tested-by: NPeter Rosin <peda@axentia.se>
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Cc: stable@vger.kernel.org # 4.3+
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4a0c4c36
    • D
      usb: Quiet down false peer failure messages · 6406eeb3
      Don Zickus 提交于
      My recent Intel box is spewing these messages:
      
      xhci_hcd 0000:00:14.0: xHCI Host Controller
      xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
      usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
      usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
      usb usb2: Product: xHCI Host Controller
      usb usb2: Manufacturer: Linux 4.3.0+ xhci-hcd
      usb usb2: SerialNumber: 0000:00:14.0
      hub 2-0:1.0: USB hub found
      hub 2-0:1.0: 6 ports detected
      usb: failed to peer usb2-port2 and usb1-port1 by location (usb2-port2:none) (usb1-port1:usb2-port1)
      usb usb2-port2: failed to peer to usb1-port1 (-16)
      usb: port power management may be unreliable
      usb: failed to peer usb2-port3 and usb1-port1 by location (usb2-port3:none) (usb1-port1:usb2-port1)
      usb usb2-port3: failed to peer to usb1-port1 (-16)
      usb: failed to peer usb2-port5 and usb1-port1 by location (usb2-port5:none) (usb1-port1:usb2-port1)
      usb usb2-port5: failed to peer to usb1-port1 (-16)
      usb: failed to peer usb2-port6 and usb1-port1 by location (usb2-port6:none) (usb1-port1:usb2-port1)
      usb usb2-port6: failed to peer to usb1-port1 (-16)
      
      Diving into the acpi tables, I noticed the EHCI hub has 12 ports while the XHCI
      hub has 8 ports.  Most of those ports are of connect type USB_PORT_NOT_USED
      (including port 1 of the EHCI hub).
      
      Further the unused ports have location data initialized to 0x80000000.
      
      Now each unused port on the xhci hub walks the port list and finds a matching
      peer with port1 of the EHCI hub because the zero'd out group id bits falsely match.
      After port1 of the XHCI hub, each following matching peer will generate the
      above warning.
      
      These warnings seem to be harmless for this scenario as I don't think it
      matters that unused ports could not create a peer link.
      
      The attached patch utilizes that assumption and just turns the pr_warn into
      pr_debug to quiet things down.
      
      Tested on my Intel box.
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Acked-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6406eeb3
    • C
      usb: xhci: fix config fail of FS hub behind a HS hub with MTT · 096b110a
      Chunfeng Yun 提交于
      if a full speed hub connects to a high speed hub which
      supports MTT, the MTT field of its slot context will be set
      to 1 when xHCI driver setups an xHCI virtual device in
      xhci_setup_addressable_virt_dev(); once usb core fetch its
      hub descriptor, and need to update the xHC's internal data
      structures for the device, the HUB field of its slot context
      will be set to 1 too, meanwhile MTT is also set before,
      this will cause configure endpoint command fail, so in the
      case, we should clear MTT to 0 for full speed hub according
      to section 6.2.2
      Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      096b110a
    • M
      xhci: Fix memory leak in xhci_pme_acpi_rtd3_enable() · 84ed9152
      Mika Westerberg 提交于
      There is a memory leak because acpi_evaluate_dsm() actually returns an
      object which the caller is supposed to release. Fix this by calling
      ACPI_FREE() for the returned object (this expands to kfree() so passing
      NULL there is fine as well).
      
      While there correct indentation in !CONFIG_ACPI case.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: stable <stable@vger.kernel.org> # v4.2
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      84ed9152
  6. 02 12月, 2015 8 次提交
  7. 01 12月, 2015 1 次提交
    • F
      usb: dwc3: gadget: don't prestart interrupt endpoints · 62e345ae
      Felipe Balbi 提交于
      Because interrupt endpoints usually transmit such
      small amounts of data, it seems pointless to prestart
      transfers and try to get speed improvements. This
      patch also sorts out a problem with CDC ECM function
      where its notification endpoint gets stuck in busy
      state and we continuously issue Update Transfer
      commands.
      
      Fixes: 8a1a9c9e ("usb: dwc3: gadget: start transfer on XFER_COMPLETE")
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      62e345ae
  8. 30 11月, 2015 8 次提交
    • L
      Linux 4.4-rc3 · 31ade3b8
      Linus Torvalds 提交于
      31ade3b8
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · c5bc1c93
      Linus Torvalds 提交于
      Pull nouveau and radeon fixes from Dave Airlie:
       "Just some nouveau and radeon/amdgpu fixes.
      
        The nouveau fixes look large as the firmware context files are
        regenerated, but the actual change is quite small"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon: make some dpm errors debug only
        drm/nouveau/volt/pwm/gk104: fix an off-by-one resulting in the voltage not being set
        drm/nouveau/nvif: allow userspace access to its own client object
        drm/nouveau/gr/gf100-: fix oops when calling zbc methods
        drm/nouveau/gr/gf117-: assume no PPC if NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK is zero
        drm/nouveau/gr/gf117-: read NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK from correct GPC
        drm/nouveau/gr/gf100-: split out per-gpc address calculation macro
        drm/nouveau/bios: return actual size of the buffer retrieved via _ROM
        drm/nouveau/instmem: protect instobj list with a spinlock
        drm/nouveau/pci: enable c800 magic for some unknown Samsung laptop
        drm/nouveau/pci: enable c800 magic for Clevo P157SM
        drm/radeon: make rv770_set_sw_state failures non-fatal
        drm/amdgpu: move dependency handling out of atomic section v2
        drm/amdgpu: optimize scheduler fence handling
        drm/amdgpu: remove vm->mutex
        drm/amdgpu: add mutex for ba_va->valids/invalids
        drm/amdgpu: adapt vce session create interface changes
        drm/amdgpu: vce use multiple cache surface starting from stoney
        drm/amdgpu: reset vce trap interrupt flag
      c5bc1c93
    • L
      Merge tag 'rtc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 818aba30
      Linus Torvalds 提交于
      Pull RTC fixes from Alexandre Belloni:
       "Two fixes for the ds1307 alarm and wakeup"
      
      * tag 'rtc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
        rtc: ds1307: fix alarm reading at probe time
        rtc: ds1307: fix kernel splat due to wakeup irq handling
      818aba30
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 00fd6a71
      Linus Torvalds 提交于
      Pull MIPS fix from Ralf Baechle:
       "Just a fix for empty loops that may be removed by non-antique GCC"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Fix delay loops which may be removed by GCC.
      00fd6a71
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · d72aee78
      Linus Torvalds 提交于
      Pull m68k fixes from Geert Uytterhoeven:
       "Summary:
      
         - Add missing initialization of max_pfn, which is needed to make
           selftests/vm/mlock2-tests succeed,
      
         - Wire up new mlock2 syscall"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: Wire up mlock2
        m68knommu: Add missing initialization of max_pfn and {min,max}_low_pfn
        m68k/mm: sun3 - Add missing initialization of max_pfn and {min,max}_low_pfn
        m68k/mm: m54xx - Add missing initialization of max_pfn
        m68k/mm: motorola - Add missing initialization of max_pfn
      d72aee78
    • L
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 04527fda
      Linus Torvalds 提交于
      Pull ARM fixes from Russell King:
       "Just two changes this time around:
      
         - wire up the new mlock2 syscall added during the last merge window
      
         - fix a build problem with certain configurations provoked by making
           CONFIG_OF user selectable"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8454/1: OF implies OF_FLATTREE
        ARM: wire up mlock2 syscall
      04527fda
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 36511e86
      Linus Torvalds 提交于
      Pull SCSI target fixes from Nicholas Bellinger:
       - fix tcm-user backend driver expired cmd time processing (agrover)
       - eliminate kref_put_spinlock_irqsave() for I/O completion (bart)
       - fix iscsi login kthread failure case hung task regression (nab)
       - fix COMPARE_AND_WRITE completion use-after-free race (nab)
       - fix COMPARE_AND_WRITE with SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC non zero
         SGL offset data corruption.  (Jan + Doug)
       - fix >= v4.4-rc1 regression for tcm_qla2xxx enable configfs attribute
         (Himanshu + HCH)
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        target/stat: print full t10_wwn.model buffer
        target: fix COMPARE_AND_WRITE non zero SGL offset data corruption
        qla2xxx: Fix regression introduced by target configFS changes
        kref: Remove kref_put_spinlock_irqsave()
        target: Invoke release_cmd() callback without holding a spinlock
        target: Fix race for SCF_COMPARE_AND_WRITE_POST checking
        iscsi-target: Fix rx_login_comp hang after login failure
        iscsi-target: return -ENOMEM instead of -1 in case of failed kmalloc()
        target/user: Do not set unused fields in tcmu_ops
        target/user: Fix time calc in expired cmd processing
      36511e86
    • L
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 75a29ec1
      Linus Torvalds 提交于
      Pull thermal management fixes from Zhang Rui:
       "Specifics:
      
       - several fixes and cleanups on Rockchip thermal drivers.
      
       - add the missing support of RK3368 SoCs in Rockchip driver.
      
       - small fixes on of-thermal, power_allocator, rcar driver, IMX, and
         QCOM drivers, and also compilation fixes, on thermal.h, when thermal
         is not selected"
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        imx: thermal: use CPU temperature grade info for thresholds
        thermal: fix thermal_zone_bind_cooling_device prototype
        Revert "thermal: qcom_spmi: allow compile test"
        thermal: rcar_thermal: remove redundant operation
        thermal: of-thermal: Reduce log level for message when can't fine thermal zone
        thermal: power_allocator: Use temperature reading from tz
        thermal: rockchip: Support the RK3368 SoCs in thermal driver
        thermal: rockchip: consistently use int for temperatures
        thermal: rockchip: Add the sort mode for adc value increment or decrement
        thermal: rockchip: improve the conversion function
        thermal: rockchip: trivial: fix typo in commit
        thermal: rockchip: better to compatible the driver for different SoCs
        dt-bindings: rockchip-thermal: Support the RK3368 SoCs compatible
      75a29ec1
  9. 29 11月, 2015 12 次提交
    • D
      target/stat: print full t10_wwn.model buffer · 8f903539
      David Disseldorp 提交于
      Cut 'n paste error saw it only process sizeof(t10_wwn.vendor) characters.
      Signed-off-by: NDavid Disseldorp <ddiss@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8f903539
    • J
      target: fix COMPARE_AND_WRITE non zero SGL offset data corruption · d94e5a61
      Jan Engelhardt 提交于
      target_core_sbc's compare_and_write functionality suffers from taking
      data at the wrong memory location when writing a CAW request to disk
      when a SGL offset is non-zero.
      
      This can happen with loopback and vhost-scsi fabric drivers when
      SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC is used to map existing user-space
      SGL memory into COMPARE_AND_WRITE READ/WRITE payload buffers.
      
      Given the following sample LIO subtopology,
      
      % targetcli ls /loopback/
      o- loopback ................................. [1 Target]
        o- naa.6001405ebb8df14a ....... [naa.60014059143ed2b3]
          o- luns ................................... [2 LUNs]
            o- lun0 ................ [iblock/ram0 (/dev/ram0)]
            o- lun1 ................ [iblock/ram1 (/dev/ram1)]
      % lsscsi -g
      [3:0:1:0]    disk    LIO-ORG  IBLOCK           4.0   /dev/sdc   /dev/sg3
      [3:0:1:1]    disk    LIO-ORG  IBLOCK           4.0   /dev/sdd   /dev/sg4
      
      the following bug can be observed in Linux 4.3 and 4.4~rc1:
      
      % perl -e 'print chr$_ for 0..255,reverse 0..255' >rand
      % perl -e 'print "\0" x 512' >zero
      % cat rand >/dev/sdd
      % sg_compare_and_write -i rand -D zero --lba 0 /dev/sdd
      % sg_compare_and_write -i zero -D rand --lba 0 /dev/sdd
      Miscompare reported
      % hexdump -Cn 512 /dev/sdd
      00000000  0f 0e 0d 0c 0b 0a 09 08  07 06 05 04 03 02 01 00
      00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
      *
      00000200
      
      Rather than writing all-zeroes as instructed with the -D file, it
      corrupts the data in the sector by splicing some of the original
      bytes in. The page of the first entry of cmd->t_data_sg includes the
      CDB, and sg->offset is set to a position past the CDB. I presume that
      sg->offset is also the right choice to use for subsequent sglist
      members.
      Signed-off-by: NJan Engelhardt <jengelh@netitwork.de>
      Tested-by: NDouglas Gilbert <dgilbert@interlog.com>
      Cc: <stable@vger.kernel.org> # v3.12+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d94e5a61
    • H
      qla2xxx: Fix regression introduced by target configFS changes · 3786dc45
      Himanshu Madhani 提交于
      this patch fixes following regression
      
       # targetcli
       [Errno 13] Permission denied: '/sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1/enable'
      
      Fixes: 2eafd729 ("target: use per-attribute show and store methods")
      Signed-off-by: NHimanshu Madhani <himanshu.madhani@qlogic.com>
      Signed-off-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3786dc45
    • B
      kref: Remove kref_put_spinlock_irqsave() · 3a66d7dc
      Bart Van Assche 提交于
      The last user is gone. Hence remove this function.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Joern Engel <joern@logfs.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3a66d7dc
    • B
      target: Invoke release_cmd() callback without holding a spinlock · 9ff9d15e
      Bart Van Assche 提交于
      This patch fixes the following kernel warning because it avoids that
      IRQs are disabled while ft_release_cmd() is invoked (fc_seq_set_resp()
      invokes spin_unlock_bh()):
      
      WARNING: CPU: 3 PID: 117 at kernel/softirq.c:150 __local_bh_enable_ip+0xaa/0x110()
      Call Trace:
       [<ffffffff814f71eb>] dump_stack+0x4f/0x7b
       [<ffffffff8105e56a>] warn_slowpath_common+0x8a/0xc0
       [<ffffffff8105e65a>] warn_slowpath_null+0x1a/0x20
       [<ffffffff81062b2a>] __local_bh_enable_ip+0xaa/0x110
       [<ffffffff814ff229>] _raw_spin_unlock_bh+0x39/0x40
       [<ffffffffa03a7f94>] fc_seq_set_resp+0xe4/0x100 [libfc]
       [<ffffffffa02e604a>] ft_free_cmd+0x4a/0x90 [tcm_fc]
       [<ffffffffa02e6972>] ft_release_cmd+0x12/0x20 [tcm_fc]
       [<ffffffffa042bd66>] target_release_cmd_kref+0x56/0x90 [target_core_mod]
       [<ffffffffa042caf0>] target_put_sess_cmd+0xc0/0x110 [target_core_mod]
       [<ffffffffa042cb81>] transport_release_cmd+0x41/0x70 [target_core_mod]
       [<ffffffffa042d975>] transport_generic_free_cmd+0x35/0x420 [target_core_mod]
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Acked-by: NJoern Engel <joern@logfs.org>
      Reviewed-by: NAndy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9ff9d15e
    • N
      target: Fix race for SCF_COMPARE_AND_WRITE_POST checking · 057085e5
      Nicholas Bellinger 提交于
      This patch addresses a race + use after free where the first
      stage of COMPARE_AND_WRITE in compare_and_write_callback()
      is rescheduled after the backend sends the secondary WRITE,
      resulting in second stage compare_and_write_post() callback
      completing in target_complete_ok_work() before the first
      can return.
      
      Because current code depends on checking se_cmd->se_cmd_flags
      after return from se_cmd->transport_complete_callback(),
      this results in first stage having SCF_COMPARE_AND_WRITE_POST
      set, which incorrectly falls through into second stage CAW
      processing code, eventually triggering a NULL pointer
      dereference due to use after free.
      
      To address this bug, pass in a new *post_ret parameter into
      se_cmd->transport_complete_callback(), and depend upon this
      value instead of ->se_cmd_flags to determine when to return
      or fall through into ->queue_status() code for CAW.
      
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: <stable@vger.kernel.org> # v3.12+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      057085e5
    • N
      iscsi-target: Fix rx_login_comp hang after login failure · ca82c2bd
      Nicholas Bellinger 提交于
      This patch addresses a case where iscsi_target_do_tx_login_io()
      fails sending the last login response PDU, after the RX/TX
      threads have already been started.
      
      The case centers around iscsi_target_rx_thread() not invoking
      allow_signal(SIGINT) before the send_sig(SIGINT, ...) occurs
      from the failure path, resulting in RX thread hanging
      indefinately on iscsi_conn->rx_login_comp.
      
      Note this bug is a regression introduced by:
      
        commit e5419865
        Author: Nicholas Bellinger <nab@linux-iscsi.org>
        Date:   Wed Jul 22 23:14:19 2015 -0700
      
            iscsi-target: Fix iscsit_start_kthreads failure OOPs
      
      To address this bug, complete ->rx_login_complete for good
      measure in the failure path, and immediately return from
      RX thread context if connection state did not actually reach
      full feature phase (TARG_CONN_STATE_LOGGED_IN).
      
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: <stable@vger.kernel.org> # v3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ca82c2bd
    • L
      iscsi-target: return -ENOMEM instead of -1 in case of failed kmalloc() · 82a819e8
      Luis de Bethencourt 提交于
      Smatch complains about returning hard coded error codes, silence this
      warning.
      
      drivers/target/iscsi/iscsi_target_parameters.c:211
         iscsi_create_default_params() warn: returning -1 instead of -ENOMEM is sloppy
      Signed-off-by: NLuis de Bethencourt <luisbg@osg.samsung.com>
      Reviewed-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      82a819e8
    • A
      target/user: Do not set unused fields in tcmu_ops · 6ba4bd29
      Andy Grover 提交于
      TCMU sets TRANSPORT_FLAG_PASSTHROUGH, so INQUIRY commands will not be
      emulated by LIO but passed up to userspace. Therefore TCMU should not
      set these, just like pscsi doesn't.
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6ba4bd29
    • A
      target/user: Fix time calc in expired cmd processing · 611e2267
      Andy Grover 提交于
      Reversed arguments meant that we were doing nothing for cmds whose deadline
      had passed.
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      611e2267
    • A
      ARM: 8454/1: OF implies OF_FLATTREE · aa7d5f18
      Arnd Bergmann 提交于
      On the ARM architecture, individual platforms select CONFIG_USE_OF if they
      need it, but all device tree code is keyed off CONFIG_OF. When building
      a platform without DT support and manually enabling CONFIG_OF, we now
      get a number of build errors, e.g.
      
      arch/arm/kernel/devtree.c: In function 'setup_machine_fdt':
      arch/arm/kernel/devtree.c:215:19: error: implicit declaration of function 'early_init_dt_verify' [-Werror=implicit-function-declaration]
      
      We could now try to separate the use case of booting from DT vs. the
      case of using the dynamic implementation, but that seems more complicated
      than it can gain us.
      
      This simply changes the ARM Kconfig file to always enable OF_RESERVED_MEM
      and OF_EARLY_FLATTREE when CONFIG_OF is enabled. These options add a little
      extra code when we just want the dynamic OF implementation, but that seems
      like a rather obscure case, and this version solves all CONFIG_OF related
      randconfig regressions.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 0166dc11 ("of: make CONFIG_OF user selectable")
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      aa7d5f18
    • L
      Merge tag 'pci-v4.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 081f3698
      Linus Torvalds 提交于
      Pull PCI fixes from Bjorn Helgaas:
       "Here are a few fixes I'd like to have in v4.4: a generic one for sysfs
        and three for HiSilicon and DesignWare host controllers.
      
        Summary:
      
        NUMA:
         - Prevent out of bounds access in numa_node override (Mathias Krause)
      
        HiSilicon host bridge driver:
         - Fix deferred probing (Arnd Bergmann)
      
        Synopsys DesignWare host bridge driver:
         - Remove incorrect io_base assignment (Stanimir Varbanov)
         - Move align_resource function pointer to pci_host_bridge structure
           (Gabriele Paoloni)"
      
      * tag 'pci-v4.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        ARM/PCI: Move align_resource function pointer to pci_host_bridge structure
        PCI: hisi: Fix deferred probing
        PCI: designware: Remove incorrect io_base assignment
        PCI: Prevent out of bounds access in numa_node override
      081f3698
  10. 28 11月, 2015 1 次提交
    • L
      Merge tag 'nfs-for-4.4-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 8003a573
      Linus Torvalds 提交于
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Stable patches:
         - Fix a NFSv4 callback identifier leak that was also causing client
           crashes
         - Fix NFSv4 callback decoding issues when incoming requests are
           truncated
         - Don't declare the attribute cache valid when we call
           nfs_update_inode with an empty attribute structure.
         - Resend LAYOUTGET when there is a race that changes the seqid
      
        Bugfixes:
         - Fix a number of issues with the NFSv4.2 CLONE ioctl()
         - Properly set NFS v4.2 NFSDBG_FACILITY
         - NFSv4 referrals are broken; Cleanup FATTR4_WORD0_FS_LOCATIONS after
           decoding success
         - Use sliding delay when LAYOUTGET gets NFS4ERR_DELAY
         - Ensure that attrcache is revalidated after a SETATTR"
      
      * tag 'nfs-for-4.4-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        nfs4: resend LAYOUTGET when there is a race that changes the seqid
        nfs: if we have no valid attrs, then don't declare the attribute cache valid
        nfs: ensure that attrcache is revalidated after a SETATTR
        nfs4: limit callback decoding to received bytes
        nfs4: start callback_ident at idr 1
        nfs: use sliding delay when LAYOUTGET gets NFS4ERR_DELAY
        NFS4: Cleanup FATTR4_WORD0_FS_LOCATIONS after decoding success
        NFS: Properly set NFS v4.2 NFSDBG_FACILITY
        nfs: reduce the amount of ifdefs for v4.2 in nfs4file.c
        nfs: use btrfs ioctl defintions for clone
        nfs: allow intra-file CLONE
        nfs: offer native ioctls even if CONFIG_COMPAT is set
        nfs: pass on count for CLONE operations
      8003a573