RE: [PATCH 3/8] DSPBRIDGE: Check input value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
	Good finding.

	Acked-by: Fernando Guzman Lugo <x0095840@xxxxxx>


>-----Original Message-----
>From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap-
>owner@xxxxxxxxxxxxxxx] On Behalf Of Andy Shevchenko
>Sent: Thursday, August 27, 2009 7:19 AM
>To: linux-omap@xxxxxxxxxxxxxxx
>Cc: Andy Shevchenko
>Subject: [PATCH 3/8] DSPBRIDGE: Check input value
>
>From: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx>
>
>Check input value before dereferencing it.
>
>Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx>
>---
> drivers/dsp/bridge/wmd/tiomap3430.c |    7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c
>b/drivers/dsp/bridge/wmd/tiomap3430.c
>index db48c49..4cb78c7 100644
>--- a/drivers/dsp/bridge/wmd/tiomap3430.c
>+++ b/drivers/dsp/bridge/wmd/tiomap3430.c
>@@ -1266,11 +1266,16 @@ static DSP_STATUS WMD_DEV_Destroy(struct
>WMD_DEV_CONTEXT *hDevContext)
> 	DSP_STATUS status = DSP_SOK;
> 	struct WMD_DEV_CONTEXT *pDevContext = (struct WMD_DEV_CONTEXT *)
> 						hDevContext;
>+
>+	/* It should never happen */
>+	if (!hDevContext)
>+		return DSP_EHANDLE;
>+
> 	DBG_Trace(DBG_ENTER, "Entering WMD_DEV_Destroy:n hDevContext
>::0x%x\n",
> 		  hDevContext);
> 	/* first put the device to stop state */
> 	WMD_BRD_Delete(pDevContext);
>-	if (pDevContext && pDevContext->pPtAttrs) {
>+	if (pDevContext->pPtAttrs) {
> 		pPtAttrs = pDevContext->pPtAttrs;
> 		if (pPtAttrs->hCSObj)
> 			SYNC_DeleteCS(pPtAttrs->hCSObj);
>--
>1.5.6.5
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>the body of a message to majordomo@xxxxxxxxxxxxxxx
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux