Page MenuHomeFreeBSD

cam(4): preserve alloc_flags when copying CCBs
ClosedPublic

Authored by trasz on Jul 5 2021, 1:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 28, 5:33 PM
Unknown Object (File)
Fri, Mar 27, 10:43 AM
Unknown Object (File)
Sun, Mar 22, 8:07 AM
Unknown Object (File)
Thu, Mar 19, 9:02 PM
Unknown Object (File)
Thu, Mar 19, 10:56 AM
Unknown Object (File)
Thu, Mar 19, 10:23 AM
Unknown Object (File)
Tue, Mar 17, 3:38 AM
Unknown Object (File)
Mon, Mar 9, 10:03 AM
Subscribers

Details

Summary

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 <gljennjohn@gmail.com>
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable