1. 22 Aug, 2011 3 commits
    • Jesper Juhl's avatar
      iscsi-target: Fix leak on failure in iscsi_copy_param_list() · 9be08c58
      Jesper Juhl authored
      We leak memory if the allocations for 'new_param->name' or
      'new_param->value' fail in iscsi_target_parameters.c::iscsi_copy_param_list()
      
      We also do a lot of variable assignments that are completely pointless
      if the allocations fail.
      
      So, let's move the allocations before the assignments and also make
      sure that we free whatever was allocated to one if the allocation fail.
      
      There's also some small CodingStyle fixups in there (curly braces on
      both branches of if statement, only one variable per line) since I was
      in the area anyway. And finally, error messages in the function are
      put on a single line for easy grep'abillity.
      Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      9be08c58
    • Thomas Meyer's avatar
      target: Use ERR_CAST inlined function · e1750ba2
      Thomas Meyer authored
      Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
      
      The semantic patch that makes this output is available
      in scripts/coccinelle/api/err_cast.cocci.
      
      More information about semantic patching is available at
      http://coccinelle.lip6.fr/Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      e1750ba2
    • Nicholas Bellinger's avatar
      target: Make standard INQUIRY return 'not connected' for tpg_virt_lun0 · 052605c6
      Nicholas Bellinger authored
      This patch changes target_emulate_inquiry_std() to set the 'not connected'
      (0x35) bit in standard INQUIRY response data when we are processing a
      request to a virtual LUN=0 mapping from struct se_device *g_lun0_dev that
      have been setup for us in transport_lookup_cmd_lun().
      
      This addresses an issue where qla2xxx FC clients need to be able
      to create demo-mode I_T FC Nexuses by default, but should not be
      exposing the default set of TPG LUNs to all FC clients.  This includes
      adding an new optional target_core_fabric_ops->tpg_check_demo_mode_login_only()
      caller to allow demo_mode nexuses to skip the old default of bulding
      a demo-mode MappedLUNs list via core_tpg_add_node_to_devs().
      
      (roland: Add missing tpg_check_demo_mode_login_only check in core_dev_add_lun)
      Reported-by: default avatarRoland Dreier <roland@purestorage.com>
      Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@risingtidesystems.com>
      052605c6
  2. 17 Aug, 2011 1 commit
  3. 14 Aug, 2011 13 commits
  4. 13 Aug, 2011 23 commits