Commit 3c9d903b authored by Jitendra Bhivare's avatar Jitendra Bhivare Committed by Martin K. Petersen

be2iscsi: Added return value check for mgmt_get_all_if_id

Use of mutex_lock_interruptible can return -EINTR, handle and log the
error.
Signed-off-by: default avatarJitendra Bhivare <jitendra.bhivare@avagotech.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9ec6f6b8
...@@ -367,13 +367,14 @@ beiscsi_set_vlan_tag(struct Scsi_Host *shost, ...@@ -367,13 +367,14 @@ beiscsi_set_vlan_tag(struct Scsi_Host *shost,
struct iscsi_iface_param_info *iface_param) struct iscsi_iface_param_info *iface_param)
{ {
struct beiscsi_hba *phba = iscsi_host_priv(shost); struct beiscsi_hba *phba = iscsi_host_priv(shost);
int ret = 0; int ret;
/* Get the Interface Handle */ /* Get the Interface Handle */
if (mgmt_get_all_if_id(phba)) { ret = mgmt_get_all_if_id(phba);
if (ret) {
beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
"BS_%d : Getting Interface Handle Failed\n"); "BS_%d : Getting Interface Handle Failed\n");
return -EIO; return ret;
} }
switch (iface_param->param) { switch (iface_param->param) {
......
...@@ -1025,8 +1025,9 @@ int mgmt_set_ip(struct beiscsi_hba *phba, ...@@ -1025,8 +1025,9 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
uint32_t ip_type; uint32_t ip_type;
int rc; int rc;
if (mgmt_get_all_if_id(phba)) rc = mgmt_get_all_if_id(phba);
return -EIO; if (rc)
return rc;
ip_type = (ip_param->param == ISCSI_NET_PARAM_IPV6_ADDR) ? ip_type = (ip_param->param == ISCSI_NET_PARAM_IPV6_ADDR) ?
BE2_IPV6 : BE2_IPV4 ; BE2_IPV6 : BE2_IPV4 ;
...@@ -1195,8 +1196,9 @@ int mgmt_get_if_info(struct beiscsi_hba *phba, int ip_type, ...@@ -1195,8 +1196,9 @@ int mgmt_get_if_info(struct beiscsi_hba *phba, int ip_type,
uint32_t ioctl_size = sizeof(struct be_cmd_get_if_info_resp); uint32_t ioctl_size = sizeof(struct be_cmd_get_if_info_resp);
int rc; int rc;
if (mgmt_get_all_if_id(phba)) rc = mgmt_get_all_if_id(phba);
return -EIO; if (rc)
return rc;
do { do {
rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd, rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment