diff options
Diffstat (limited to 'drivers/xen/xen-scsiback.c')
-rw-r--r-- | drivers/xen/xen-scsiback.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c index 25144a0ff07c..10d67802a2fb 100644 --- a/drivers/xen/xen-scsiback.c +++ b/drivers/xen/xen-scsiback.c | |||
@@ -864,7 +864,7 @@ static int scsiback_add_translation_entry(struct vscsibk_info *info, | |||
864 | struct list_head *head = &(info->v2p_entry_lists); | 864 | struct list_head *head = &(info->v2p_entry_lists); |
865 | unsigned long flags; | 865 | unsigned long flags; |
866 | char *lunp; | 866 | char *lunp; |
867 | unsigned int unpacked_lun; | 867 | unsigned long long unpacked_lun; |
868 | struct se_lun *se_lun; | 868 | struct se_lun *se_lun; |
869 | struct scsiback_tpg *tpg_entry, *tpg = NULL; | 869 | struct scsiback_tpg *tpg_entry, *tpg = NULL; |
870 | char *error = "doesn't exist"; | 870 | char *error = "doesn't exist"; |
@@ -876,9 +876,10 @@ static int scsiback_add_translation_entry(struct vscsibk_info *info, | |||
876 | } | 876 | } |
877 | *lunp = 0; | 877 | *lunp = 0; |
878 | lunp++; | 878 | lunp++; |
879 | if (kstrtouint(lunp, 10, &unpacked_lun) || unpacked_lun >= TRANSPORT_MAX_LUNS_PER_TPG) { | 879 | err = kstrtoull(lunp, 10, &unpacked_lun); |
880 | if (err < 0) { | ||
880 | pr_err("lun number not valid: %s\n", lunp); | 881 | pr_err("lun number not valid: %s\n", lunp); |
881 | return -EINVAL; | 882 | return err; |
882 | } | 883 | } |
883 | 884 | ||
884 | mutex_lock(&scsiback_mutex); | 885 | mutex_lock(&scsiback_mutex); |