HomeFreeBSD

For CCBs allocated on the stack, we need to clear the entire CCB, not just

Description

For CCBs allocated on the stack, we need to clear the entire CCB, not just
the header. Otherwise stack garbage can lead to random flags getting set.

This showed up as 'camcontrol rescan all' failing with EINVAL because the
address type wasn't CAM_DATA_VADDR.

sbin/camcontrol/camcontrol.c:
In rescan_or_reset_bus(), bzero the stack-allocated CCBs before
use instead of clearing the body.

MFC after: 3 days
Sponsored by: Spectra Logic

Details

Provenance
kenAuthored on
Parents
rS307683: Correct typo in r307679: the variable is MK_GNU_GREP_COMPAT
Branches
Unknown
Tags
Unknown