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)
Tue, Feb 17, 12:20 PM
Unknown Object (File)
Mon, Feb 16, 9:25 AM
Unknown Object (File)
Sat, Feb 14, 9:07 AM
Unknown Object (File)
Fri, Jan 30, 2:27 PM
Unknown Object (File)
Jan 5 2026, 5:15 PM
Unknown Object (File)
Jan 1 2026, 5:25 AM
Unknown Object (File)
Nov 27 2025, 10:45 PM
Unknown Object (File)
Nov 27 2025, 8:39 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