diff options
Diffstat (limited to 'drivers/target/loopback')
| -rw-r--r-- | drivers/target/loopback/tcm_loop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index d4fee2a9d66a..70c2e7fa6664 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
| @@ -1143,7 +1143,7 @@ static ssize_t tcm_loop_tpg_store_nexus( | |||
| 1143 | * the fabric protocol_id set in tcm_loop_make_scsi_hba(), and call | 1143 | * the fabric protocol_id set in tcm_loop_make_scsi_hba(), and call |
| 1144 | * tcm_loop_make_nexus() | 1144 | * tcm_loop_make_nexus() |
| 1145 | */ | 1145 | */ |
| 1146 | if (strlen(page) > TL_WWN_ADDR_LEN) { | 1146 | if (strlen(page) >= TL_WWN_ADDR_LEN) { |
| 1147 | printk(KERN_ERR "Emulated NAA Sas Address: %s, exceeds" | 1147 | printk(KERN_ERR "Emulated NAA Sas Address: %s, exceeds" |
| 1148 | " max: %d\n", page, TL_WWN_ADDR_LEN); | 1148 | " max: %d\n", page, TL_WWN_ADDR_LEN); |
| 1149 | return -EINVAL; | 1149 | return -EINVAL; |
| @@ -1324,7 +1324,7 @@ struct se_wwn *tcm_loop_make_scsi_hba( | |||
| 1324 | return ERR_PTR(-EINVAL); | 1324 | return ERR_PTR(-EINVAL); |
| 1325 | 1325 | ||
| 1326 | check_len: | 1326 | check_len: |
| 1327 | if (strlen(name) > TL_WWN_ADDR_LEN) { | 1327 | if (strlen(name) >= TL_WWN_ADDR_LEN) { |
| 1328 | printk(KERN_ERR "Emulated NAA %s Address: %s, exceeds" | 1328 | printk(KERN_ERR "Emulated NAA %s Address: %s, exceeds" |
| 1329 | " max: %d\n", name, tcm_loop_dump_proto_id(tl_hba), | 1329 | " max: %d\n", name, tcm_loop_dump_proto_id(tl_hba), |
| 1330 | TL_WWN_ADDR_LEN); | 1330 | TL_WWN_ADDR_LEN); |
