Prev: [patch 2/2] mvsas: dereferencing before checking
Next: [tip:perf/core] perf ui: Complete the breakdown of util/newt.c
From: Dan Carpenter on 11 Aug 2010 03:50 If mvi_dev is NULL here, then we're supposed return with an error code but the "goto out" was missing and it could result in a NULL dereference. Signed-off-by: Dan Carpenter <error27(a)gmail.com> diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index adedaa9..406246c 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c @@ -1648,6 +1648,7 @@ int mvs_abort_task(struct sas_task *task) if (!mvi_dev) { mv_printk("%s:%d TMF_RESP_FUNC_FAILED\n", __func__, __LINE__); rc = TMF_RESP_FUNC_FAILED; + goto out; } mvi = mvi_dev->mvi_info; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |