--- ./source/private_module/mp/mp_lun.c	2018-04-22 08:45:38.000000000 +0000
+++ ./source/private_module/mp/mp_lun.c.hotpatch	2018-11-14 08:52:45.000000000 +0000
@@ -534,7 +534,7 @@
     /* end   x00279118 20150310 DTS2015030407611 */
     return RETURN_OK;
 }
-
+int32_t mpGetAvailLunUuidIndex_SPH105(LOGICAL_UNIT_S* lun, uint32_t* preIndex);
 /**************************************************************************
    : mpGetAvailLunUuidIndex
      : ȡuuid Чindex 
@@ -591,7 +591,7 @@
     int32_t ret = RETURN_ERROR;
     uint8_t uuidStr[2 * MP_MAX_UUID_LEN + 1] = {0};
     uint32_t forIndex = 0;
-    uint32_t backIndex = 0;
+
     
     spin_lock(&g_mpCamoLun.lock);
     list_for_each(lunList, &g_mpCamoLun.lunHead)
@@ -601,10 +601,10 @@
         /*begin y00325094@20170713 ЭȡLUNWWN descriptor */
         if (NULL != camoLun->lun)
         {   /* begin lwx227025@20180110 ȡαװWWNʧ DTS2017121211074*/
-            ret = mpGetAvailLunUuidIndex(camoLun->lun, &forIndex, &backIndex);
+            ret = mpGetAvailLunUuidIndex_SPH105(camoLun->lun, &forIndex);
             if (RETURN_ERROR != ret)
             {
-                if (0 == memcmp(wwn, &camoLun->wwn[forIndex],backIndex - forIndex + 1))
+                if (0 == memcmp(wwn, &camoLun->wwn[forIndex],MP_MAX_UUID_LEN - forIndex))
                 {
                     isCamoLunExist = TRUE;
                     break;
@@ -5419,7 +5419,7 @@
     bool isCamoLunExist = FALSE;
     int32_t ret = RETURN_ERROR;
     uint32_t forIndex = 0;
-    uint32_t backIndex = 0;
+
 
     spin_lock(&g_mpCamoLun.lock);
     list_for_each(lunList, &g_mpCamoLun.lunHead)
@@ -5427,10 +5427,10 @@
         camoLun = list_entry(lunList, LOGICAL_CAMO_UNIT_S, CamolunSibling);
         if (NULL != camoLun->lun)
         {
-            ret = mpGetAvailLunUuidIndex(camoLun->lun, &forIndex, &backIndex);
+            ret = mpGetAvailLunUuidIndex_SPH105(camoLun->lun, &forIndex);
             if (RETURN_ERROR != ret)
             {
-                if (0 == memcmp(wwn, &camoLun->wwn[forIndex], backIndex - forIndex + 1))
+                if (0 == memcmp(wwn, &camoLun->wwn[forIndex], MP_MAX_UUID_LEN - forIndex))
                 {
                     isCamoLunExist = TRUE;
                     break;
@@ -5536,7 +5536,7 @@
     struct list_head *lunList = NULL;
     uint8_t uuidStr[2 * MP_MAX_UUID_LEN + 1] = {0};
     uint32_t forIndex = 0;
-    uint32_t backIndex = 0;
+
     int32_t ret = RETURN_ERROR;
 
     spin_lock(&g_mpCamoLun.lock);
@@ -5545,10 +5545,10 @@
         camoLun = list_entry(lunList, LOGICAL_CAMO_UNIT_S, CamolunSibling);
         if (NULL != camoLun->lun)
         {
-            ret = mpGetAvailLunUuidIndex(camoLun->lun, &forIndex, &backIndex);
+            ret = mpGetAvailLunUuidIndex_SPH105(camoLun->lun, &forIndex);
             if (RETURN_ERROR != ret)
             {
-                if (0 == memcmp(wwn, &camoLun->wwn[forIndex], backIndex - forIndex + 1))
+                if (0 == memcmp(wwn, &camoLun->wwn[forIndex], MP_MAX_UUID_LEN - forIndex))
                 {
                     mpCamoLunfailover(camoLun->lun, failover);
                     spin_unlock(&g_mpCamoLun.lock);
@@ -6452,5 +6452,37 @@
     mpDiskExitPsMode();
 }
 EXPORT_SYMBOL(mpLunCheckLunIsInvalid);
+/* begin DTS2018111404790 hwx469378@201181112 αװeDevLUNeDevLUNӳʧ */
+/**************************************************************************
+   : mpGetAvailLunUuidIndex
+     : ȡuuid Чindex 
+ : LUN WWN
+ : int32_t
+   ֵ: RETURN_ERROR RETURN_OK
+     :
+**************************************************************************/
+int32_t mpGetAvailLunUuidIndex_SPH105(LOGICAL_UNIT_S* lun, uint32_t* preIndex)
+{
+    uint32_t forIndex = 0;
+
+    for (forIndex = 0; forIndex < MP_MAX_UUID_LEN; forIndex++)
+    {
+        if (0 != lun->uuid[forIndex])
+        {
+            break;
+        }
+    }
+
+
+    if (forIndex >= MP_MAX_UUID_LEN)
+    {
+        return RETURN_ERROR;
+    }
+
+    *preIndex = forIndex;
+
+    return RETURN_OK;
+}
+/* end DTS2018111404790 hwx469378@201181112 αװeDevLUNeDevLUNӳʧ */
 
 
