LeapIO inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBE7VU
------------------------------------------
fix hiding ugood disk problem. fix "The address of local variable 'mpi_request' might be accessed at non-zero index in function leapioraid_base_send_ioc_init"
Signed-off-by: haodongdong doubled@leap-io.com --- drivers/scsi/leapioraid/leapioraid_app.c | 1 - drivers/scsi/leapioraid/leapioraid_func.c | 15 ++++++++------- drivers/scsi/leapioraid/leapioraid_func.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/leapioraid/leapioraid_app.c b/drivers/scsi/leapioraid/leapioraid_app.c index 9d699721d1be7..6e7f6bf877782 100644 --- a/drivers/scsi/leapioraid/leapioraid_app.c +++ b/drivers/scsi/leapioraid/leapioraid_app.c @@ -53,7 +53,6 @@ #include <linux/poll.h> #include <linux/io.h> #include <linux/uaccess.h> -#include "leapioraid_func.h"
#ifdef __KERNEL__ #include <linux/miscdevice.h> diff --git a/drivers/scsi/leapioraid/leapioraid_func.c b/drivers/scsi/leapioraid/leapioraid_func.c index 2d80a86da007d..97e0f893ab4c5 100644 --- a/drivers/scsi/leapioraid/leapioraid_func.c +++ b/drivers/scsi/leapioraid/leapioraid_func.c @@ -4746,14 +4746,11 @@ leapioraid_base_send_ioc_init(struct LEAPIORAID_ADAPTER *ioc) current_time = ktime_get_real(); mpi_request.TimeStamp = cpu_to_le64(ktime_to_ms(current_time)); if (ioc->logging_level & LEAPIORAID_DEBUG_INIT) { - __le32 *mfp; - int i;
- mfp = (__le32 *) &mpi_request; pr_info("%s \toffset:data\n", ioc->name); - for (i = 0; i < sizeof(struct LeapioraidIOCInitReq_t) / 4; i++) - pr_info("%s \t[0x%02x]:%08x\n", - ioc->name, i * 4, le32_to_cpu(mfp[i])); + leapioraid_debug_dump_mf(&mpi_request, + sizeof(struct LeapioraidIOCInitReq_t) / 4); + } r = leapioraid_base_handshake_req_reply_wait(ioc, sizeof @@ -7022,7 +7019,11 @@ leapioraid_config_get_volume_handle(struct LEAPIORAID_ADAPTER *ioc, r = -1; ioc_status = le16_to_cpu(mpi_reply.IOCStatus) & LEAPIORAID_IOCSTATUS_MASK; - if (ioc_status != LEAPIORAID_IOCSTATUS_SUCCESS) + if (ioc_status == LEAPIORAID_IOCSTATUS_CONFIG_INVALID_PAGE) { + *volume_handle = 0; + r = 0; + goto out; + } else if (ioc_status != LEAPIORAID_IOCSTATUS_SUCCESS) goto out; for (i = 0; i < config_page->NumElements; i++) { element_type = diff --git a/drivers/scsi/leapioraid/leapioraid_func.h b/drivers/scsi/leapioraid/leapioraid_func.h index 9cf8206ccb3ce..8ca8fc0a6f262 100644 --- a/drivers/scsi/leapioraid/leapioraid_func.h +++ b/drivers/scsi/leapioraid/leapioraid_func.h @@ -103,7 +103,7 @@ #define LEAPIORAID_KDUMP_SCSI_IO_DEPTH (64) #define LEAPIORAID_RAID_MAX_SECTORS (128)
-#define LEAPIORAID_NAME_LENGTH (32) +#define LEAPIORAID_NAME_LENGTH (48) #define LEAPIORAID_DRIVER_NAME_LENGTH (24) #define LEAPIORAID_STRING_LENGTH (64)
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/14325 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/S...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/14325 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/S...