libmpathpersist: pthread join counts should be consistent with threads created

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In mpath_prout_reg, it’s perhaps more proper to modify active_pathcount to count which

is the actual thread counts created, otherwise it may leads to a segmentfault error.

 

---

libmpathpersist/mpath_persist.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

 

diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist

index 7a2249f..8518a2e 100644

--- a/libmpathpersist/mpath_persist.c

+++ b/libmpathpersist/mpath_persist.c

@@ -503,7 +503,7 @@ int mpath_prout_reg(struct multipath *mpp,

        count = count +1;

      }

     }

-    for( i=0; i < active_pathcount ; i++){

+    for( i=0; i < count ; i++){

      rc = pthread_join(thread[i].id, NULL);

      if (rc){

        condlog (0, "%s: Thread[%d] failed to join thread %d",

--

1.8.3.4

 

 

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux