Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: qla2xxx: Complain if sp->done() is not called from the completion path

Not calling sp->done() from the command completion path is a severe bug.
Hence complain loudly if that happens.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
88263208 0dcec41a

+12
+4
drivers/scsi/qla2xxx/qla_init.c
··· 243 243 sp->done(sp, QLA_FUNCTION_TIMEOUT); 244 244 } 245 245 break; 246 + default: 247 + WARN_ON_ONCE(true); 248 + sp->done(sp, QLA_FUNCTION_TIMEOUT); 249 + break; 246 250 } 247 251 } 248 252
+4
drivers/scsi/qla2xxx/qla_isr.c
··· 2786 2786 2787 2787 if (rsp->status_srb == NULL) 2788 2788 sp->done(sp, res); 2789 + else 2790 + WARN_ON_ONCE(true); 2789 2791 } 2790 2792 2791 2793 /** ··· 2845 2843 if (sense_len == 0) { 2846 2844 rsp->status_srb = NULL; 2847 2845 sp->done(sp, cp->result); 2846 + } else { 2847 + WARN_ON_ONCE(true); 2848 2848 } 2849 2849 } 2850 2850
+4
drivers/scsi/qla2xxx/qla_mr.c
··· 2539 2539 2540 2540 if (rsp->status_srb == NULL) 2541 2541 sp->done(sp, res); 2542 + else 2543 + WARN_ON_ONCE(true); 2542 2544 } 2543 2545 2544 2546 /** ··· 2618 2616 if (sense_len == 0) { 2619 2617 rsp->status_srb = NULL; 2620 2618 sp->done(sp, cp->result); 2619 + } else { 2620 + WARN_ON_ONCE(true); 2621 2621 } 2622 2622 } 2623 2623