Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177505906
D58662.1794583295.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.1794583295.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
Fri, Nov 13, 3:21 PM (2 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41703717
Default Alt Text
D58662.1794583295.diff (839 B)
Attached To
Mode
D58662: ufshci: do not free the devq twice on SIM attach failure
Attached
Detach File
Event Timeline