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)
Fri, Jan 24, 4:57 PM
Unknown Object (File)
Tue, Jan 21, 3:34 AM
Unknown Object (File)
Sun, Dec 29, 2:04 PM
Unknown Object (File)
Dec 4 2024, 7:55 PM
Unknown Object (File)
Oct 31 2024, 9:53 AM
Unknown Object (File)
Oct 15 2024, 7:06 PM
Unknown Object (File)
Oct 1 2024, 10:28 PM
Unknown Object (File)
Oct 1 2024, 10:28 PM
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