Page MenuHomeFreeBSD

CAM ccbq sanity: checks on insert & remove
ClosedPublic

Authored by rlibby on Oct 4 2016, 10:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 28, 3:29 AM
Unknown Object (File)
Fri, Mar 27, 2:00 AM
Unknown Object (File)
Tue, Mar 24, 1:57 AM
Unknown Object (File)
Mon, Mar 23, 11:56 PM
Unknown Object (File)
Sun, Mar 22, 3:30 PM
Unknown Object (File)
Sat, Mar 21, 6:56 PM
Unknown Object (File)
Fri, Mar 13, 9:49 AM
Unknown Object (File)
Fri, Mar 13, 4:32 AM
Subscribers

Details

Summary

KASSERT in cam_ccbq_insert_ccb that only XPT_FC_QUEUED ops are queued,
and XPT_FC_USER_CCB ops are not. Otherwise cam_ccbq_ccb_done may be
skipped.

Bounds check the index used for camq_remove in order to panic instead
of scribble on removal of an out-of-bounds index (e.g. consider the
effect of camq_remove of CAM_UNQUEUED_INDEX).

KASSERT in cam_ccbq_remove_ccb that the ccb removed by index was the
one sought.

I used these in order to help debug the recently-patched ccb corruption
issues (D7985 & D8020).

Test Plan

make buildkernel KERNCONF=GENERIC-NODEBUG
make buildkernel KERNCONF=GENERIC
kyua test -k /usr/tests/sys/Kyuafile

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rlibby retitled this revision from to CAM ccbq sanity: checks on insert & remove.
rlibby updated this object.
rlibby edited the test plan for this revision. (Show Details)
rlibby added reviewers: imp, mav.
rlibby added a subscriber: markj.
mav edited edge metadata.

I have no objections.

This revision is now accepted and ready to land.Oct 5 2016, 4:41 AM
imp edited edge metadata.

seems reasonable to me, though I worry about more panic calls in the code. But it is really for a 'can't happen' event, so that's OK.

This revision was automatically updated to reflect the committed changes.