Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167481631
D7985.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7985.diff
View Options
Index: head/sys/cam/cam_xpt.c
===================================================================
--- head/sys/cam/cam_xpt.c
+++ head/sys/cam/cam_xpt.c
@@ -2578,21 +2578,25 @@
abort_ccb = start_ccb->cab.abort_ccb;
if (XPT_FC_IS_DEV_QUEUED(abort_ccb)) {
+ struct cam_ed *device;
+ struct cam_devq *devq;
- if (abort_ccb->ccb_h.pinfo.index >= 0) {
- struct cam_ccbq *ccbq;
- struct cam_ed *device;
-
- device = abort_ccb->ccb_h.path->device;
- ccbq = &device->ccbq;
- cam_ccbq_remove_ccb(ccbq, abort_ccb);
+ device = abort_ccb->ccb_h.path->device;
+ devq = device->sim->devq;
+
+ mtx_lock(&devq->send_mtx);
+ if (abort_ccb->ccb_h.pinfo.index > 0) {
+ cam_ccbq_remove_ccb(&device->ccbq, abort_ccb);
abort_ccb->ccb_h.status =
CAM_REQ_ABORTED|CAM_DEV_QFRZN;
- xpt_freeze_devq(abort_ccb->ccb_h.path, 1);
+ xpt_freeze_devq_device(device, 1);
+ mtx_unlock(&devq->send_mtx);
xpt_done(abort_ccb);
start_ccb->ccb_h.status = CAM_REQ_CMP;
break;
}
+ mtx_unlock(&devq->send_mtx);
+
if (abort_ccb->ccb_h.pinfo.index == CAM_UNQUEUED_INDEX
&& (abort_ccb->ccb_h.status & CAM_SIM_QUEUED) == 0) {
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 23, 3:19 AM (17 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37095703
Default Alt Text
D7985.diff (1 KB)
Attached To
Mode
D7985: xpt_action_default XPT_ABORT: protect ccbq access with devq->send_mtx
Attached
Detach File
Event Timeline
Log In to Comment