virtio_scsi: Zero stack-allocated CCBs
Fixes: 3394d4239b
("cam: allocate CCBs from UMA for SCSI and ATA IO")
Reported by: syzbot+2e9ce63919709feb3d1c@syzkaller.appspotmail.com
Reviewed by: trasz
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
9a2fac6ba6
commit
5b81e2e1bc
@ -700,6 +700,7 @@ vtscsi_register_async(struct vtscsi_softc *sc)
|
||||
{
|
||||
struct ccb_setasync csa;
|
||||
|
||||
memset(&csa, 0, sizeof(csa));
|
||||
xpt_setup_ccb(&csa.ccb_h, sc->vtscsi_path, 5);
|
||||
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
||||
csa.event_enable = AC_LOST_DEVICE | AC_FOUND_DEVICE;
|
||||
@ -716,6 +717,7 @@ vtscsi_deregister_async(struct vtscsi_softc *sc)
|
||||
{
|
||||
struct ccb_setasync csa;
|
||||
|
||||
memset(&csa, 0, sizeof(csa));
|
||||
xpt_setup_ccb(&csa.ccb_h, sc->vtscsi_path, 5);
|
||||
csa.ccb_h.func_code = XPT_SASYNC_CB;
|
||||
csa.event_enable = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user