Check the void * argument in the AC_FOUND_DEV case against NULL. Whether
correctly or not, this sometimes is propagated up via XPT.
This commit is contained in:
parent
9d2e63879d
commit
2be2b20986
@ -505,6 +505,8 @@ cdasync(void *callback_arg, u_int32_t code,
|
||||
cam_status status;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (cgd == NULL)
|
||||
break;
|
||||
|
||||
if (SID_TYPE(&cgd->inq_data) != T_CDROM
|
||||
&& SID_TYPE(&cgd->inq_data) != T_WORM)
|
||||
|
@ -325,6 +325,8 @@ chasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||
cam_status status;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (cgd == NULL)
|
||||
break;
|
||||
|
||||
if (SID_TYPE(&cgd->inq_data)!= T_CHANGER)
|
||||
break;
|
||||
|
@ -894,6 +894,8 @@ daasync(void *callback_arg, u_int32_t code,
|
||||
cam_status status;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (cgd == NULL)
|
||||
break;
|
||||
|
||||
if (SID_TYPE(&cgd->inq_data) != T_DIRECT
|
||||
&& SID_TYPE(&cgd->inq_data) != T_OPTICAL)
|
||||
@ -1101,7 +1103,7 @@ dastart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
tag_code = MSG_SIMPLE_Q_TAG;
|
||||
}
|
||||
scsi_read_write(&start_ccb->csio,
|
||||
/*retries*/4,
|
||||
/*retries*/4, /* retry a few times */
|
||||
dadone,
|
||||
tag_code,
|
||||
bp->bio_cmd == BIO_READ,
|
||||
|
@ -237,6 +237,8 @@ passasync(void *callback_arg, u_int32_t code,
|
||||
cam_status status;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (cgd == NULL)
|
||||
break;
|
||||
|
||||
/*
|
||||
* Allocate a peripheral instance for
|
||||
|
@ -446,6 +446,8 @@ ptasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||
cam_status status;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (cgd == NULL)
|
||||
break;
|
||||
|
||||
if (SID_TYPE(&cgd->inq_data) != T_PROCESSOR)
|
||||
break;
|
||||
|
@ -1375,6 +1375,8 @@ saasync(void *callback_arg, u_int32_t code,
|
||||
cam_status status;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (cgd == NULL)
|
||||
break;
|
||||
|
||||
if (SID_TYPE(&cgd->inq_data) != T_SEQUENTIAL)
|
||||
break;
|
||||
|
@ -288,6 +288,9 @@ sesasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
||||
int inq_len;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (arg == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
inq_len = cgd->inq_data.additional_length + 4;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user