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
F174317093: D31054.diff
Fri, Oct 2, 8:15 AM
Unknown Object (File)
Mon, Sep 28, 12:01 AM
Unknown Object (File)
Sun, Sep 27, 11:41 PM
Unknown Object (File)
Sun, Sep 27, 11:31 PM
Unknown Object (File)
Sun, Sep 27, 10:37 AM
Unknown Object (File)
Sat, Sep 26, 8:08 PM
Unknown Object (File)
Fri, Sep 25, 10:45 PM
Unknown Object (File)
Sat, Sep 19, 10:51 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