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)
Mon, Jan 6, 8:47 PM
Unknown Object (File)
Dec 3 2024, 10:32 PM
Unknown Object (File)
Nov 22 2024, 7:20 PM
Unknown Object (File)
Nov 22 2024, 3:52 PM
Unknown Object (File)
Nov 22 2024, 11:26 AM
Unknown Object (File)
Nov 18 2024, 3:10 AM
Unknown Object (File)
Nov 18 2024, 2:07 AM
Unknown Object (File)
Nov 17 2024, 7:08 PM
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.