RE: [PATCH 5/8] dspbridge: Check pointer before dereferencing it

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

 



It looks good.

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 5/8] dspbridge: Check pointer before dereferencing it
>
>From: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx>
>
>Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@xxxxxxxxx>
>---
> drivers/dsp/bridge/rmgr/nldr.c |   15 ++++++++++++++-
> 1 files changed, 14 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/dsp/bridge/rmgr/nldr.c
>b/drivers/dsp/bridge/rmgr/nldr.c
>index 79f7505..8c162a1 100644
>--- a/drivers/dsp/bridge/rmgr/nldr.c
>+++ b/drivers/dsp/bridge/rmgr/nldr.c
>@@ -1560,6 +1560,13 @@ static DSP_STATUS LoadOvly(struct NLDR_NODEOBJECT
>*hNldrNode,
> 	}
>
> 	DBC_Assert(i < hNldr->nOvlyNodes);
>+
>+	if (!pONode) {
>+		/* Should we print warning here? */
>+		status = DSP_ENOTFOUND;
>+		goto func_end;
>+	}
>+
> 	switch (phase) {
> 	case NLDR_CREATE:
> 		pRefCount = &(pONode->createRef);
>@@ -1877,6 +1884,13 @@ static void UnloadOvly(struct NLDR_NODEOBJECT
>*hNldrNode, enum NLDR_PHASE phase)
> 	}
>
> 	DBC_Assert(i < hNldr->nOvlyNodes);
>+
>+	if (!pONode) {
>+		/* Should we print warning here? */
>+		status = DSP_ENOTFOUND;
>+		goto func_end;
>+	}
>+
> 	switch (phase) {
> 	case NLDR_CREATE:
> 		pRefCount = &(pONode->createRef);
>@@ -1917,7 +1931,6 @@ static void UnloadOvly(struct NLDR_NODEOBJECT
>*hNldrNode, enum NLDR_PHASE phase)
> 	}
> 	if (pOtherRef && *pOtherRef == 0)
> 		FreeSects(hNldr, pOtherSects, nOtherAlloc);
>-
> }
>
> /*
>--
>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