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)
Wed, Apr 24, 9:43 AM
Unknown Object (File)
Mar 7 2024, 5:51 PM
Unknown Object (File)
Feb 17 2024, 3:14 AM
Unknown Object (File)
Dec 20 2023, 4:08 AM
Unknown Object (File)
Dec 15 2023, 10:41 PM
Unknown Object (File)
Dec 13 2023, 3:12 PM
Unknown Object (File)
Dec 12 2023, 11:36 PM
Unknown Object (File)
Dec 12 2023, 11:48 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40309
Build 37198: arc lint + arc unit