1. 23 7月, 2015 13 次提交
  2. 22 7月, 2015 1 次提交
    • J
      usb: dwc3: Reset the transfer resource index on SET_INTERFACE · aebda618
      John Youn 提交于
      This fixes an issue introduced in commit b23c8439 (usb: dwc3:
      gadget: fix DEPSTARTCFG for non-EP0 EPs) that made sure we would
      only use DEPSTARTCFG once per SetConfig.
      
      The trick is that we should use one DEPSTARTCFG per SetConfig *OR*
      SetInterface. SetInterface was completely missed from the original
      patch.
      
      This problem became aparent after commit 76e838c9 (usb: dwc3:
      gadget: return error if command sent to DEPCMD register fails)
      added checking of the return status of device endpoint commands.
      
      'Set Endpoint Transfer Resource' command was caught failing
      occasionally. This is because the Transfer Resource
      Index was not getting reset during a SET_INTERFACE request.
      
      Finally, to fix the issue, was we have to do is make sure that
      our start_config_issued flag gets reset whenever we receive a
      SetInterface request.
      
      To verify the problem (and its fix), all we have to do is run
      test 9 from testusb with 'testusb -t 9 -s 2048 -a -c 5000'.
      Tested-by: NHuang Rui <ray.huang@amd.com>
      Tested-by: NSubbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com>
      Fixes: b23c8439 (usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs)
      Cc: <stable@vger.kernel.org> # v3.2+
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      aebda618
  3. 21 7月, 2015 3 次提交
  4. 18 7月, 2015 1 次提交
    • N
      configfs: fix kernel infoleak through user-controlled format string · 3958b792
      Nicolas Iooss 提交于
      Some modules call config_item_init_type_name() and config_group_init_type_name()
      with parameter "name" directly controlled by userspace.  These two
      functions call config_item_set_name() with this name used as a format
      string, which can be used to leak information such as content of the
      stack to userspace.
      
      For example, make_netconsole_target() in netconsole module calls
      config_item_init_type_name() with the name of a newly-created directory.
      This means that the following commands give some unexpected output, with
      configfs mounted in /sys/kernel/config/ and on a system with a
      configured eth0 ethernet interface:
      
          # modprobe netconsole
          # mkdir /sys/kernel/config/netconsole/target_%lx
          # echo eth0 > /sys/kernel/config/netconsole/target_%lx/dev_name
          # echo 1 > /sys/kernel/config/netconsole/target_%lx/enabled
          # echo eth0 > /sys/kernel/config/netconsole/target_%lx/dev_name
          # dmesg |tail -n1
          [  142.697668] netconsole: target (target_ffffffffc0ae8080) is
          enabled, disable to update parameters
      
      The directory name is correct but %lx has been interpreted in the
      internal item name, displayed here in the error message used by
      store_dev_name() in drivers/net/netconsole.c.
      
      To fix this, update every caller of config_item_set_name to use "%s"
      when operating on untrusted input.
      
      This issue was found using -Wformat-security gcc flag, once a __printf
      attribute has been added to config_item_set_name().
      Signed-off-by: NNicolas Iooss <nicolas.iooss_linux@m4x.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Acked-by: NJoel Becker <jlbec@evilplan.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3958b792
  5. 09 7月, 2015 1 次提交
    • J
      USB: serial: Destroy serial_minors IDR on module exit · d23f47d4
      Johannes Thumshirn 提交于
      Destroy serial_minors IDR on module exit, reclaiming the allocated memory.
      
      This was detected by the following semantic patch (written by Luis
      Rodriguez <mcgrof@suse.com>)
      
      <SmPL>
      @ defines_module_init @
      declarer name module_init, module_exit;
      declarer name DEFINE_IDR;
      identifier init;
      @@
      
      module_init(init);
      
      @ defines_module_exit @
      identifier exit;
      @@
      
      module_exit(exit);
      
      @ declares_idr depends on defines_module_init && defines_module_exit @
      identifier idr;
      @@
      
      DEFINE_IDR(idr);
      
      @ on_exit_calls_destroy depends on declares_idr && defines_module_exit @
      identifier declares_idr.idr, defines_module_exit.exit;
      @@
      
      exit(void)
      {
       ...
       idr_destroy(&idr);
       ...
      }
      
      @ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @
      identifier declares_idr.idr, defines_module_exit.exit;
      @@
      
      exit(void)
      {
       ...
       +idr_destroy(&idr);
      }
      </SmPL>
      Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Cc: stable <stable@vger.kernel.org>	# v3.11
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      d23f47d4
  6. 07 7月, 2015 11 次提交
  7. 06 7月, 2015 3 次提交
    • P
      USB: cp210x: add ID for Aruba Networks controllers · f98a7aa8
      Peter Sanford 提交于
      Add the USB serial console device ID for Aruba Networks 7xxx series
      controllers which have a USB port for their serial console.
      Signed-off-by: NPeter Sanford <peter@sanford.io>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      f98a7aa8
    • S
      USB: mos7720: rename registers · ee5729ec
      Sudip Mukherjee 提交于
      Some of the register names defined here are matching with registers
      defined in other places. Like DCR is defined here and DCR is also
      a register in mn10300 architecture. So when we are building this with
      mn10300, build fails.
      To avoid we rename all the registers.
      Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      ee5729ec
    • C
      USB: option: add 2020:4000 ID · f6d7fb37
      Claudio Cappelli 提交于
      Add device Olivetti Olicard 300 (Network Connect: MT6225) - IDs 2020:4000.
      
      T:  Bus=01 Lev=02 Prnt=04 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 0
      D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=2020 ProdID=4000 Rev=03.00
      S:  Manufacturer=Network Connect
      S:  Product=MT6225
      C:  #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
      I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
      I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
      I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      I:  If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      I:  If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
      Signed-off-by: NClaudio Cappelli <claudio.cappelli.linux@gmail.com>
      Suggested-by: NLars Melin <larsm17@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      [johan: amend commit message with devices info ]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      f6d7fb37
  8. 26 6月, 2015 1 次提交
  9. 24 6月, 2015 1 次提交
  10. 23 6月, 2015 1 次提交
    • D
      module: add per-module param_lock · b51d23e4
      Dan Streetman 提交于
      Add a "param_lock" mutex to each module, and update params.c to use
      the correct built-in or module mutex while locking kernel params.
      Remove the kparam_block_sysfs_r/w() macros, replace them with direct
      calls to kernel_param_[un]lock(module).
      
      The kernel param code currently uses a single mutex to protect
      modification of any and all kernel params.  While this generally works,
      there is one specific problem with it; a module callback function
      cannot safely load another module, i.e. with request_module() or even
      with indirect calls such as crypto_has_alg().  If the module to be
      loaded has any of its params configured (e.g. with a /etc/modprobe.d/*
      config file), then the attempt will result in a deadlock between the
      first module param callback waiting for modprobe, and modprobe trying to
      lock the single kernel param mutex to set the new module's param.
      
      This fixes that by using per-module mutexes, so that each individual module
      is protected against concurrent changes in its own kernel params, but is
      not blocked by changes to other module params.  All built-in modules
      continue to use the built-in mutex, since they will always be loaded at
      runtime and references (e.g. request_module(), crypto_has_alg()) to them
      will never cause load-time param changing.
      
      This also simplifies the interface used by modules to block sysfs access
      to their params; while there are currently functions to block and unblock
      sysfs param access which are split up by read and write and expect a single
      kernel param to be passed, their actual operation is identical and applies
      to all params, not just the one passed to them; they simply lock and unlock
      the global param mutex.  They are replaced with direct calls to
      kernel_param_[un]lock(THIS_MODULE), which locks THIS_MODULE's param_lock, or
      if the module is built-in, it locks the built-in mutex.
      Suggested-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NDan Streetman <ddstreet@ieee.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      b51d23e4
  11. 22 6月, 2015 1 次提交
    • B
      MIPS: Octeon: Set OHCI and EHCI MMIO byte order to match CPU · df115f3e
      Ben Hutchings 提交于
      The Octeon OHCI is now supported by the ohci-platform driver, and
      USB_OCTEON_OHCI is marked as deprecated.  However, it is currently
      still necessary to enable it in order to select
      USB_OHCI_BIG_ENDIAN_MMIO.  Make CPU_CAVIUM_OCTEON select that as well,
      so that USB_OCTEON_OHCI is really obsolete.
      
      The old ohci-octeon and ehci-octeon drivers also only enabled big-endian
      MMIO in case the CPU was big-endian.  Make the selections of
      USB_EHCI_BIG_ENDIAN_MMIO and USB_OHCI_BIG_ENDIAN_MMIO conditional, to
      match this.
      
      Fixes: 2193dda5 ("USB: host: Remove ehci-octeon and ohci-octeon drivers")
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: linux-mips@linux-mips.org
      Cc: David Daney <david.daney@cavium.com>
      Cc: Chandrakala Chavva <cchavva@caviumnetworks.com>
      Cc: Paul Martin <paul.martin@codethink.co.uk>
      Patchwork: https://patchwork.linux-mips.org/patch/10178/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      df115f3e
  12. 16 6月, 2015 1 次提交
    • N
      target: Drop unnecessary core_tpg_register TFO parameter · bc0c94b1
      Nicholas Bellinger 提交于
      This patch drops unnecessary target_core_fabric_ops parameter usage
      for core_tpg_register() during fabric driver TFO->fabric_make_tpg()
      se_portal_group creation callback execution.
      
      Instead, use the existing se_wwn->wwn_tf->tf_ops pointer to ensure
      fabric driver is really using the same TFO provided at module_init
      time.
      
      Also go ahead and drop the forward TFO declarations tree-wide, and
      handling the special case for iscsi-target discovery TPG.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bc0c94b1
  13. 13 6月, 2015 2 次提交