1. 30 9月, 2015 23 次提交
  2. 28 9月, 2015 1 次提交
  3. 26 9月, 2015 4 次提交
    • R
      net: update docbook comment for __mdiobus_register() · 59f06978
      Russell King 提交于
      Update the docbook comment for __mdiobus_register() to include the new
      module owner argument.  This resolves a warning found by the 0-day
      builder.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59f06978
    • G
      ppp: fix lockdep splat in ppp_dev_uninit() · 58a89eca
      Guillaume Nault 提交于
      ppp_dev_uninit() locks all_ppp_mutex while under rtnl mutex protection.
      ppp_create_interface() must then lock these mutexes in that same order
      to avoid possible deadlock.
      
      [  120.880011] ======================================================
      [  120.880011] [ INFO: possible circular locking dependency detected ]
      [  120.880011] 4.2.0 #1 Not tainted
      [  120.880011] -------------------------------------------------------
      [  120.880011] ppp-apitest/15827 is trying to acquire lock:
      [  120.880011]  (&pn->all_ppp_mutex){+.+.+.}, at: [<ffffffffa0145f56>] ppp_dev_uninit+0x64/0xb0 [ppp_generic]
      [  120.880011]
      [  120.880011] but task is already holding lock:
      [  120.880011]  (rtnl_mutex){+.+.+.}, at: [<ffffffff812e4255>] rtnl_lock+0x12/0x14
      [  120.880011]
      [  120.880011] which lock already depends on the new lock.
      [  120.880011]
      [  120.880011]
      [  120.880011] the existing dependency chain (in reverse order) is:
      [  120.880011]
      [  120.880011] -> #1 (rtnl_mutex){+.+.+.}:
      [  120.880011]        [<ffffffff81073a6f>] lock_acquire+0xcf/0x10e
      [  120.880011]        [<ffffffff813ab18a>] mutex_lock_nested+0x56/0x341
      [  120.880011]        [<ffffffff812e4255>] rtnl_lock+0x12/0x14
      [  120.880011]        [<ffffffff812d9d94>] register_netdev+0x11/0x27
      [  120.880011]        [<ffffffffa0147b17>] ppp_ioctl+0x289/0xc98 [ppp_generic]
      [  120.880011]        [<ffffffff8113b367>] do_vfs_ioctl+0x4ea/0x532
      [  120.880011]        [<ffffffff8113b3fd>] SyS_ioctl+0x4e/0x7d
      [  120.880011]        [<ffffffff813ad7d7>] entry_SYSCALL_64_fastpath+0x12/0x6f
      [  120.880011]
      [  120.880011] -> #0 (&pn->all_ppp_mutex){+.+.+.}:
      [  120.880011]        [<ffffffff8107334e>] __lock_acquire+0xb07/0xe76
      [  120.880011]        [<ffffffff81073a6f>] lock_acquire+0xcf/0x10e
      [  120.880011]        [<ffffffff813ab18a>] mutex_lock_nested+0x56/0x341
      [  120.880011]        [<ffffffffa0145f56>] ppp_dev_uninit+0x64/0xb0 [ppp_generic]
      [  120.880011]        [<ffffffff812d5263>] rollback_registered_many+0x19e/0x252
      [  120.880011]        [<ffffffff812d5381>] rollback_registered+0x29/0x38
      [  120.880011]        [<ffffffff812d53fa>] unregister_netdevice_queue+0x6a/0x77
      [  120.880011]        [<ffffffffa0146a94>] ppp_release+0x42/0x79 [ppp_generic]
      [  120.880011]        [<ffffffff8112d9f6>] __fput+0xec/0x192
      [  120.880011]        [<ffffffff8112dacc>] ____fput+0x9/0xb
      [  120.880011]        [<ffffffff8105447a>] task_work_run+0x66/0x80
      [  120.880011]        [<ffffffff81001801>] prepare_exit_to_usermode+0x8c/0xa7
      [  120.880011]        [<ffffffff81001900>] syscall_return_slowpath+0xe4/0x104
      [  120.880011]        [<ffffffff813ad931>] int_ret_from_sys_call+0x25/0x9f
      [  120.880011]
      [  120.880011] other info that might help us debug this:
      [  120.880011]
      [  120.880011]  Possible unsafe locking scenario:
      [  120.880011]
      [  120.880011]        CPU0                    CPU1
      [  120.880011]        ----                    ----
      [  120.880011]   lock(rtnl_mutex);
      [  120.880011]                                lock(&pn->all_ppp_mutex);
      [  120.880011]                                lock(rtnl_mutex);
      [  120.880011]   lock(&pn->all_ppp_mutex);
      [  120.880011]
      [  120.880011]  *** DEADLOCK ***
      
      Fixes: 8cb775bc ("ppp: fix device unregistration upon netns deletion")
      Reported-by: NSedat Dilek <sedat.dilek@gmail.com>
      Tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: NGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58a89eca
    • S
      net: via/Kconfig: GENERIC_PCI_IOMAP required if PCI not selected · 21343ac2
      Sudip Mukherjee 提交于
      The builds of allmodconfig of avr32 is failing with:
      
      drivers/net/ethernet/via/via-rhine.c:1098:2: error: implicit declaration
      of function 'pci_iomap' [-Werror=implicit-function-declaration]
      drivers/net/ethernet/via/via-rhine.c:1119:2: error: implicit declaration
      of function 'pci_iounmap' [-Werror=implicit-function-declaration]
      
      The generic empty pci_iomap and pci_iounmap is used only if CONFIG_PCI
      is not defined and CONFIG_GENERIC_PCI_IOMAP is defined.
      
      Add GENERIC_PCI_IOMAP in the dependency list for VIA_RHINE as we are
      getting build failure when CONFIG_PCI and CONFIG_GENERIC_PCI_IOMAP both
      are not defined.
      Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      21343ac2
    • R
      phy: marvell: add link partner advertised modes · 357cd64c
      Russell King 提交于
      Read the standard link partner advertisment registers and store it in
      phydev->lp_advertising, so ethtool can report this information to
      userspace via ethtool.  Zero it as per genphy if autonegotiation is
      disabled.  Tested with a Marvell 88E1512 PHY.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      357cd64c
  4. 25 9月, 2015 12 次提交
    • G
      drm/i915: fix task reference leak in i915_debugfs.c · 7cb5dff8
      Geliang Tang 提交于
      Leak a task reference in i915_ppgtt_info(), add put_task_struct()
      to fix it.
      
      Introduced by
      
      commit 1c60fef5
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Fri Dec 6 14:11:30 2013 -0800
      
          drm/i915: Dump all ppgtt
      Signed-off-by: NGeliang Tang <geliangtang@163.com>
      [danvet: Add note provided by Jani about which commit introduced this
      issue.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7cb5dff8
    • N
      iscsi-target: Avoid OFMarker + IFMarker negotiation · 673681ca
      Nicholas Bellinger 提交于
      This patch fixes a v4.2+ regression introduced by commit c04a6091
      that removed support for obsolete sync-and-steering markers usage
      as originally defined in RFC-3720.
      
      The regression would involve attempting to send OFMarker=No +
      IFMarker=No keys during opertional negotiation login phase,
      including when initiators did not actually propose these keys.
      
      The result for MSFT iSCSI initiators would be random junk in
      TCP stream after the last successful login request was been sent
      signaling the move to full feature phase (FFP) operation.
      
      To address this bug, go ahead and avoid negotiating these keys
      by default unless the initiator explicitly proposes them, but
      still respond to them with 'No' if they are proposed.
      Reported-by: NDragan Milivojević <galileo@pkm-inc.com>
      Bisected-by: NChristophe Vu-Brugier <cvubrugier@fastmail.fm>
      Tested-by: NChristophe Vu-Brugier <cvubrugier@fastmail.fm>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      673681ca
    • N
      target: Make TCM_WRITE_PROTECT failure honor D_SENSE bit · 8fa3a867
      Nicholas Bellinger 提交于
      This patch changes transport_lookup_cmd_lun() to obtain
      se_lun->lun_ref + se_cmd->se_device rcu_dereference during
      TCM_WRITE_PROTECT -> CHECK_CONDITION failure status.
      
      Do this to ensure the active control D_SENSE mode page bit
      is being honored.
      Reported-by: NSagi Grimberg <sagig@mellanox.com>
      Reviewed-by: NSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8fa3a867
    • N
      target: Fix target_sense_desc_format NULL pointer dereference · f3bb467f
      Nicholas Bellinger 提交于
      This patch allows target_sense_desc_format() to be called without a
      valid se_device pointer, which can occur during an early exception
      ahead of transport_lookup_cmd_lun() setting up se_cmd->se_device.
      
      This addresses a v4.3-rc1 specific NULL pointer dereference
      regression introduced by commit 4e4937e8.
      
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f3bb467f
    • N
      target: Propigate backend read-only to core_tpg_add_lun · eeeb9522
      Nicholas Bellinger 提交于
      This patch adds a DF_READ_ONLY flag that is used by IBLOCK to
      signal when a backend has been set to read-only mode, in order
      to propigate read-only status up to core_tpg_add_lun() for all
      future LUN fabric exports.
      
      With this is place, existing emulation for reporting read-only
      in spc_emulate_modesense() and normal transport_lookup_cmd_lun()
      TCM_WRITE_PROTECTED status checking just works as expected.
      Reported-by: NJoeue Deng <joeue404@gmail.com>
      Reported-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      eeeb9522
    • N
      target: Fix PR registration + APTPL RCU conversion regression · 3ccd6e83
      Nicholas Bellinger 提交于
      This patch fixes a v4.2+ regression introduced by commit 79dc9c9e
      where lookup of t10_pr_registration->pr_reg_deve and associated
      ->pr_kref get was missing from __core_scsi3_do_alloc_registration(),
      which is responsible for setting DEF_PR_REG_ACTIVE.
      
      This would result in REGISTER operations completing successfully,
      but subsequent core_scsi3_pr_seq_non_holder() checking would fail
      with !DEF_PR_REG_ACTIVE -> RESERVATION CONFLICT status.
      
      Update __core_scsi3_add_registration() to drop ->pr_kref reference
      after registration and any optional ALL_TG_PT=1 processing has
      completed.  Update core_scsi3_decode_spec_i_port() to release
      the new parent local_pr_reg->pr_kref as well.
      
      Also, update __core_scsi3_check_aptpl_registration() to perform
      the same target_nacl_find_deve() lookup + ->pr_kref get, now that
      __core_scsi3_add_registration() expects to drop the reference.
      
      Finally, since there are cases when se_dev_entry->se_lun_acl can
      still be dereferenced in core_scsi3_lunacl_undepend_item() while
      holding ->pr_kref, go ahead and move explicit rcu_assign_pointer()
      NULL assignments within core_disable_device_list_for_node() until
      after orig->pr_comp finishes.
      Reported-by: NScott L. Lykens <scott@lykens.org>
      Tested-by: NScott L. Lykens <scott@lykens.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Lee Duncan <lduncan@suse.com>
      Cc: <stable@vger.kernel.org> # v4.2+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3ccd6e83
    • R
      phy: add phy_device_remove() · 38737e49
      Russell King 提交于
      Add a phy_device_remove() function to complement phy_device_register(),
      which undoes the effects of phy_device_register() by removing the phy
      device from visibility, but not freeing it.
      
      This allows these details to be moved out of the mdio bus code into
      the phy code where this action belongs.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38737e49
    • R
      phy: fixed-phy: properly validate phy in fixed_phy_update_state() · d618bf2b
      Russell King 提交于
      Validate that the phy_device passed into fixed_phy_update_state() is a
      fixed-phy device before walking the list of phys for a fixed phy at the
      same address.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d618bf2b
    • R
      net: fix phy refcounting in a bunch of drivers · 04d53b20
      Russell King 提交于
      of_phy_find_device() increments the phy struct device refcount, which
      we need to properly balance.  Add code to network drivers using this
      function to ensure that the struct device refcount is correctly
      balanced.
      
      For xgene, looking back in the history, we should be able to use
      of_phy_connect() with a zero flags argument for the DT case as this is
      how the driver used to operate prior to de7b5b3d ("net: eth: xgene:
      change APM X-Gene SoC platform ethernet to support ACPI").
      
      This leaves the Cavium Thunder BGX unfixed; fixing this driver is a
      complicated task, one which the maintainers need to be involved with.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      04d53b20
    • R
      of_mdio: fix MDIO phy device refcounting · f018ae7a
      Russell King 提交于
      bus_find_device() is defined as:
      
       * This is similar to the bus_for_each_dev() function above, but it
       * returns a reference to a device that is 'found' for later use, as
       * determined by the @match callback.
      
      and it does indeed return a reference-counted pointer to the device:
      
              while ((dev = next_device(&i)))
                      if (match(dev, data) && get_device(dev))
                                              ^^^^^^^^^^^^^^^
                              break;
              klist_iter_exit(&i);
              return dev;
      
      What that means is that when we're done with the struct device, we must
      drop that reference.  Neither of_phy_connect() nor of_phy_attach() did
      this when phy_connect_direct() or phy_attach_direct() failed.
      
      With our previous patch, phy_connect_direct() and phy_attach_direct()
      take a new refcount on the phy device when successful, so we can drop
      our local reference immediatley after these functions, whether or not
      they succeeded.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f018ae7a
    • R
      phy: add proper phy struct device refcounting · 7322967b
      Russell King 提交于
      Take a refcount on the phy struct device when the phy device is attached
      to a network device, and drop it after it's detached.  This ensures that
      a refcount is held on the phy device while the device is being used by
      a network device, thereby preventing the phy_device from being
      unexpectedly kfree()'d by phy_device_release().
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7322967b
    • R
      phy: fix mdiobus module safety · 3e3aaf64
      Russell King 提交于
      Re-implement the mdiobus module refcounting to ensure that we actually
      ensure that the mdiobus module code does not go away while we might call
      into it.
      
      The old scheme using bus->dev.driver was buggy, because bus->dev is a
      class device which never has a struct device_driver associated with it,
      and hence the associated code trying to obtain a refcount did nothing
      useful.
      
      Instead, take the approach that other subsystems do: pass the module
      when calling mdiobus_register(), and record that in the mii_bus struct.
      When we need to increment the module use count in the phy code, use
      this stored pointer.  When the phy is deteched, drop the module
      refcount, remembering that the phy device might go away at that point.
      
      This doesn't stop the mii_bus going away while there are in-use phys -
      it merely stops the underlying code vanishing.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e3aaf64
新手
引导
客服 返回
顶部