Re: scsi: lpfc: Fix crash in the function lpfc_sli4_queue_free when reboot

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

 



On 11/1/2019 2:20 AM, Zhangguanghui wrote:
Hi everyone
There is a crash in the function lpfc_sli4_queue_free while rebooting the host.
potential crash arising from ' wq_list list_delete' ordering problems.
I thinks it’s the correct order.
can you help me review and commit this patch, Best regards

diff --git a/drivers/scsi/lpfc /lpfc_sli.c b/drivers/scsi/lpfc /lpfc_sli.c
index 50f13ab..0cd5a96 100644
--- a/drivers/scsi/lpfc /lpfc_sli.c
+++ b/drivers/scsi/lpfc /lpfc_sli.c
@@ -14438,9 +14438,6 @@ lpfc_sli4_queue_free(struct lpfc_queue *queue)
         if (!queue)
                 return;

-       if (!list_empty(&queue->wq_list))
-               list_del(&queue->wq_list);
-
         while (!list_empty(&queue->page_list)) {
                 list_remove_head(&queue->page_list, dmabuf, struct lpfc_dmabuf,
                                  list);
@@ -14453,6 +14450,9 @@ lpfc_sli4_queue_free(struct lpfc_queue *queue)
                 kfree(queue->rqbp);
         }

+       if (!list_empty(&queue->wq_list))
+               list_del(&queue->wq_list);
+
         if (!list_empty(&queue->cpu_list))
                 list_del(&queue->cpu_list);


Hi,

Thank you for the patch. It's not clear what the patch is actually fixing.  The change in order simply puts a longer delay in before the list freeing is done.

Can you send a stack trace or more information about the problem ?
What driver rev (see lpfc_version.h, also printed in dmesg at driver load/1st attach) was your crash ?

-- james




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux