Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177464944
D58662.1794486375.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
839 B
Referenced Files
None
Subscribers
None
D58662.1794486375.diff
View Options
diff --git a/sys/dev/ufshci/ufshci_sim.c b/sys/dev/ufshci/ufshci_sim.c
--- a/sys/dev/ufshci/ufshci_sim.c
+++ b/sys/dev/ufshci/ufshci_sim.c
@@ -371,8 +371,9 @@
mtx_lock(&ctrlr->sc_mtx);
if (xpt_bus_register(ctrlr->ufshci_sim, ctrlr->dev, 0) != CAM_SUCCESS) {
+ /* cam_sim_free() with free_devq also frees the devq. */
cam_sim_free(ctrlr->ufshci_sim, /*free_devq*/ TRUE);
- cam_simq_free(devq);
+ ctrlr->ufshci_sim = NULL;
mtx_unlock(&ctrlr->sc_mtx);
printf("Failed to create a bus\n");
return (ENOMEM);
@@ -383,7 +384,7 @@
CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
xpt_bus_deregister(cam_sim_path(ctrlr->ufshci_sim));
cam_sim_free(ctrlr->ufshci_sim, /*free_devq*/ TRUE);
- cam_simq_free(devq);
+ ctrlr->ufshci_sim = NULL;
mtx_unlock(&ctrlr->sc_mtx);
printf("Failed to create a path\n");
return (ENOMEM);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 12, 12:26 PM (22 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41676043
Default Alt Text
D58662.1794486375.diff (839 B)
Attached To
Mode
D58662: ufshci: do not free the devq twice on SIM attach failure
Attached
Detach File
Event Timeline