Page MenuHomeFreeBSD

cam(4): preserve alloc_flags when copying CCBs

Authored by trasz on Jul 5 2021, 1:58 PM.



Before UMA CCBs, all CCBs were of the same size, and could
be trivially copied using bcopy(9). Now we have to preserve
alloc_flags, otherwise we might end up attempting to free
stack-allocated CCB to UMA; we also need to take CCB size
into account.

This fixes kernel panic which would occur when trying to access
a stopped (as in, SCSI START STOP, also "ctladm stop") SCSI device.

Reported By: Gary Jennejohn <>
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.

Diff Detail

rG FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.