Patch "scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails" has been added to the 4.14-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-fcoe-fix-transport-not-deattached-when-fcoe_if_.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 26b3d8fe56c8c4f3f2407718bb4f18928d79feca
Author: Chen Zhongjin <chenzhongjin@xxxxxxxxxx>
Date:   Tue Nov 15 17:24:42 2022 +0800

    scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails
    
    [ Upstream commit 4155658cee394b22b24c6d64e49247bf26d95b92 ]
    
    fcoe_init() calls fcoe_transport_attach(&fcoe_sw_transport), but when
    fcoe_if_init() fails, &fcoe_sw_transport is not detached and leaves freed
    &fcoe_sw_transport on fcoe_transports list. This causes panic when
    reinserting module.
    
     BUG: unable to handle page fault for address: fffffbfff82e2213
     RIP: 0010:fcoe_transport_attach+0xe1/0x230 [libfcoe]
     Call Trace:
      <TASK>
      do_one_initcall+0xd0/0x4e0
      load_module+0x5eee/0x7210
      ...
    
    Fixes: 78a582463c1e ("[SCSI] fcoe: convert fcoe.ko to become an fcoe transport provider driver")
    Signed-off-by: Chen Zhongjin <chenzhongjin@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221115092442.133088-1-chenzhongjin@xxxxxxxxxx
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 99b46dc87a37..f94936384b06 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -2531,6 +2531,7 @@ static int __init fcoe_init(void)
 
 out_free:
 	mutex_unlock(&fcoe_config_mutex);
+	fcoe_transport_detach(&fcoe_sw_transport);
 out_destroy:
 	destroy_workqueue(fcoe_wq);
 	return rc;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux