1. 11 Feb, 2017 7 commits
  2. 10 Feb, 2017 22 commits
  3. 09 Feb, 2017 11 commits
    • ojab's avatar
      scsi: mpt3sas: disable ASPM for MPI2 controllers · ffdadd68
      ojab authored
      MPI2 controllers sometimes got lost (i.e. disappear from
      /sys/bus/pci/devices) if ASMP is enabled.
      Signed-off-by: default avatarSlava Kardakov <ojab@ojab.ru>
      Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=60644
      Cc: <stable@vger.kernel.org>
      Acked-by: default avatarSreekanth Reddy <Sreekanth.Reddy@broadcom.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      ffdadd68
    • Yendapally Reddy Dhananjaya Reddy's avatar
      net: phy: Initialize mdio clock at probe function · bb1a6197
      Yendapally Reddy Dhananjaya Reddy authored
      USB PHYs need the MDIO clock divisor enabled earlier to work.
      Initialize mdio clock divisor in probe function. The ext bus
      bit available in the same register will be used by mdio mux
      to enable external mdio.
      Signed-off-by: default avatarYendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
      Fixes: ddc24ae1 ("net: phy: Broadcom iProc MDIO bus driver")
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarJon Mason <jon.mason@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb1a6197
    • Hangbin Liu's avatar
      igmp, mld: Fix memory leak in igmpv3/mld_del_delrec() · 9c8bb163
      Hangbin Liu authored
      In function igmpv3/mld_add_delrec() we allocate pmc and put it in
      idev->mc_tomb, so we should free it when we don't need it in del_delrec().
      But I removed kfree(pmc) incorrectly in latest two patches. Now fix it.
      
      Fixes: 24803f38 ("igmp: do not remove igmp souce list info when ...")
      Fixes: 1666d49e ("mld: do not remove mld souce list info when ...")
      Reported-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c8bb163
    • Ross Lagerwall's avatar
      xen-netfront: Improve error handling during initialization · e2e004ac
      Ross Lagerwall authored
      This fixes a crash when running out of grant refs when creating many
      queues across many netdevs.
      
      * If creating queues fails (i.e. there are no grant refs available),
      call xenbus_dev_fatal() to ensure that the xenbus device is set to the
      closed state.
      * If no queues are created, don't call xennet_disconnect_backend as
      netdev->real_num_tx_queues will not have been set correctly.
      * If setup_netfront() fails, ensure that all the queues created are
      cleaned up, not just those that have been set up.
      * If any queues were set up and an error occurs, call
      xennet_destroy_queues() to clean up the napi context.
      * If any fatal error occurs, unregister and destroy the netdev to avoid
      leaving around a half setup network device.
      Signed-off-by: default avatarRoss Lagerwall <ross.lagerwall@citrix.com>
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2e004ac
    • David S. Miller's avatar
      Merge branch 'sierra_net-fixes' · 1b5805c2
      David S. Miller authored
      Stefan Brüns says:
      
      ====================
      Fixes for sierra_net driver
      
      When trying to initiate a dual-stack (ipv4v6) connection, a MC7710, FW
      version SWI9200X_03.05.24.00ap answers with an unsupported LSI. Add support
      for this LSI.
      Also the link_type should be ignored when going idle, otherwise the modem
      is stuck in a bad link state.
      Tested on MC7710, T-Mobile DE, APN internet.telekom, IPv4v6 PDP type. Both
      IPv4 and IPv6 connections work.
      
      v2: Do not overwrite protocol field in rx_fixup
      v3: Remove leftover struct ethhdr *eth declaration
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b5805c2
    • Stefan Brüns's avatar
      sierra_net: Skip validating irrelevant fields for IDLE LSIs · 764895d3
      Stefan Brüns authored
      When the context is deactivated, the link_type is set to 0xff, which
      triggers a warning message, and results in a wrong link status, as
      the LSI is ignored.
      Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      764895d3
    • Stefan Brüns's avatar
      sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications · 5a70348e
      Stefan Brüns authored
      If a context is configured as dualstack ("IPv4v6"), the modem indicates
      the context activation with a slightly different indication message.
      The dual-stack indication omits the link_type (IPv4/v6) and adds
      additional address fields.
      IPv6 LSIs are identical to IPv4 LSIs, but have a different link type.
      Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
      Reviewed-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a70348e
    • WANG Cong's avatar
      kcm: fix 0-length case for kcm_sendmsg() · 98e3862c
      WANG Cong authored
      Dmitry reported a kernel warning:
      
       WARNING: CPU: 3 PID: 2936 at net/kcm/kcmsock.c:627
       kcm_write_msgs+0x12e3/0x1b90 net/kcm/kcmsock.c:627
       CPU: 3 PID: 2936 Comm: a.out Not tainted 4.10.0-rc6+ #209
       Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
       Call Trace:
        __dump_stack lib/dump_stack.c:15 [inline]
        dump_stack+0x2ee/0x3ef lib/dump_stack.c:51
        panic+0x1fb/0x412 kernel/panic.c:179
        __warn+0x1c4/0x1e0 kernel/panic.c:539
        warn_slowpath_null+0x2c/0x40 kernel/panic.c:582
        kcm_write_msgs+0x12e3/0x1b90 net/kcm/kcmsock.c:627
        kcm_sendmsg+0x163a/0x2200 net/kcm/kcmsock.c:1029
        sock_sendmsg_nosec net/socket.c:635 [inline]
        sock_sendmsg+0xca/0x110 net/socket.c:645
        sock_write_iter+0x326/0x600 net/socket.c:848
        new_sync_write fs/read_write.c:499 [inline]
        __vfs_write+0x483/0x740 fs/read_write.c:512
        vfs_write+0x187/0x530 fs/read_write.c:560
        SYSC_write fs/read_write.c:607 [inline]
        SyS_write+0xfb/0x230 fs/read_write.c:599
        entry_SYSCALL_64_fastpath+0x1f/0xc2
      
      when calling syscall(__NR_write, sock2, 0x208aaf27ul, 0x0ul) on a KCM
      seqpacket socket. It appears that kcm_sendmsg() does not handle len==0
      case correctly, which causes an empty skb is allocated and queued.
      Fix this by skipping the skb allocation for len==0 case.
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Cc: Tom Herbert <tom@herbertland.com>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      98e3862c
    • Vineeth Remanan Pillai's avatar
      xen-netfront: Rework the fix for Rx stall during OOM and network stress · 538d9291
      Vineeth Remanan Pillai authored
      The commit 90c311b0 ("xen-netfront: Fix Rx stall during network
      stress and OOM") caused the refill timer to be triggerred almost on
      all invocations of xennet_alloc_rx_buffers for certain workloads.
      This reworks the fix by reverting to the old behaviour and taking into
      consideration the skb allocation failure. Refill timer is now triggered
      on insufficient requests or skb allocation failure.
      Signed-off-by: default avatarVineeth Remanan Pillai <vineethp@amazon.com>
      Fixes: 90c311b0 (xen-netfront: Fix Rx stall during network stress and OOM)
      Reported-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      538d9291
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 55aac6ef
      Linus Torvalds authored
      Pull SCSI target fixes from Nicholas Bellinger:
       "This target series for v4.10 contains fixes which address a few
        long-standing bugs that DATERA's QA + automation teams have uncovered
        while putting v4.1.y target code into production usage.
      
        We've been running the top three in our nightly automated regression
        runs for the last two months, and the COMPARE_AND_WRITE fix Mr. Gary
        Guo has been manually verifying against a four node ESX cluster this
        past week.
      
        Note all of them have CC' stable tags.
      
        Summary:
      
         - Fix a bug with ESX EXTENDED_COPY + SAM_STAT_RESERVATION_CONFLICT
           status, where target_core_xcopy.c logic was incorrectly returning
           SAM_STAT_CHECK_CONDITION for all non SAM_STAT_GOOD cases (Nixon
           Vincent)
      
         - Fix a TMR LUN_RESET hung task bug while other in-flight TMRs are
           being aborted, before the new one had been dispatched into tmr_wq
           (Rob Millner)
      
         - Fix a long standing double free OOPs, where a dynamically generated
           'demo-mode' NodeACL has multiple sessions associated with it, and
           the /sys/kernel/config/target/$FABRIC/$WWN/ subsequently disables
           demo-mode, but never converts the dynamic ACL into a explicit ACL
           (Rob Millner)
      
         - Fix a long standing reference leak with ESX VAAI COMPARE_AND_WRITE
           when the second phase WRITE COMMIT command fails, resulting in
           CHECK_CONDITION response never being sent and se_cmd->cmd_kref
           never reaching zero (Gary Guo)
      
        Beyond these items on v4.1.y we've reproduced, fixed, and run through
        our regression test suite using iscsi-target exports, there are two
        additional outstanding list items:
      
         - Remove a >= v4.2 RCU conversion BUG_ON that would trigger when
           dynamic node NodeACLs where being converted to explicit NodeACLs.
           The patch drops the BUG_ON to follow how pre RCU conversion worked
           for this special case (Benjamin Estrabaud)
      
         - Add ibmvscsis target_core_fabric_ops->max_data_sg_nent assignment
           to match what IBM's Virtual SCSI hypervisor is already enforcing at
           transport layer. (Bryant Ly + Steven Royer)"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        ibmvscsis: Add SGL limit
        target: Fix COMPARE_AND_WRITE ref leak for non GOOD status
        target: Fix multi-session dynamic se_node_acl double free OOPs
        target: Fix early transport_generic_handle_tmr abort scenario
        target: Use correct SCSI status during EXTENDED_COPY exception
        target: Don't BUG_ON during NodeACL dynamic -> explicit conversion
      55aac6ef
    • Florian Fainelli's avatar
      net: phy: Fix PHY module checks and NULL deref in phy_attach_direct() · 6d9f66ac
      Florian Fainelli authored
      The Generic PHY drivers gets assigned after we checked that the current
      PHY driver is NULL, so we need to check a few things before we can
      safely dereference d->driver. This would be causing a NULL deference to
      occur when a system binds to the Generic PHY driver. Update
      phy_attach_direct() to do the following:
      
      - grab the driver module reference after we have assigned the Generic
        PHY drivers accordingly, and remember we came from the generic PHY
        path
      
      - update the error path to clean up the module reference in case the
        Generic PHY probe function fails
      
      - split the error path involving phy_detacht() to avoid double free/put
        since phy_detach() does all the clean up
      
      - finally, have phy_detach() drop the module reference count before we
        call device_release_driver() for the Generic PHY driver case
      
      Fixes: cafe8df8 ("net: phy: Fix lack of reference count on PHY driver")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d9f66ac