From: Nishanth Menon <nm@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: Nishanth Menon <nm@ti.com>,
Ameya Palande <ameya.palande@nokia.com>,
Deepak Chitriki <deepak.chitriki@ti.com>,
Felipe Contreras <felipe.contreras@nokia.com>,
Hiroshi Doyu <hiroshi.doyu@nokia.com>,
Omar Ramirez Luna <omar.ramirez@ti.com>
Subject: [PATCH] DSPBRIDGE: dont pass invalid DSP OPP requests
Date: Tue, 19 Jan 2010 19:44:08 -0600 [thread overview]
Message-ID: <1263951848-16822-1-git-send-email-nm@ti.com> (raw)
If DSP baseimage requests for invalid OPPs, do not pass them
to the rest of the linux kernel subsystem. with a test baseimage
it was found to send
IO_DispatchPM: WMDIOCTL_CONSTRAINT_REQUEST with parameter 0.
this is an invalid OPP ID and should not be passed anywhere.
we add a param check for this prior to passing it along to the
workqueue.
Cc: Ameya Palande <ameya.palande@nokia.com>
Cc: Deepak Chitriki <deepak.chitriki@ti.com>
Cc: Felipe Contreras <felipe.contreras@nokia.com>
Cc: Hiroshi Doyu <hiroshi.doyu@nokia.com>
Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
drivers/dsp/bridge/wmd/io_sm.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index 6c140c5..618bedb 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -960,9 +960,12 @@ static void IO_DispatchPM(struct work_struct *work)
pArg[1] = pIOMgr->pSharedMem->oppRequest.rqstOppPt;
DBG_Trace(DBG_LEVEL7, "IO_DispatchPM : Value of OPP "
"value =0x%x \n", pArg[1]);
- status = pIOMgr->pIntfFxns->pfnDevCntrl(pIOMgr->
- hWmdContext, WMDIOCTL_CONSTRAINT_REQUEST,
- pArg);
+ if (!pArg[1])
+ status = DSP_EINVALIDARG;
+ else
+ status = pIOMgr->pIntfFxns->pfnDevCntrl(pIOMgr->
+ hWmdContext,
+ WMDIOCTL_CONSTRAINT_REQUEST, pArg);
if (DSP_FAILED(status)) {
DBG_Trace(DBG_LEVEL7, "IO_DispatchPM : Failed "
"to set constraint = 0x%x \n",
--
1.6.3.3
next reply other threads:[~2010-01-20 1:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 1:44 Nishanth Menon [this message]
2010-01-20 10:01 ` [PATCH] DSPBRIDGE: dont pass invalid DSP OPP requests Ameya Palande
2010-01-20 12:02 ` Nishanth Menon
2010-01-20 17:04 ` Ramirez Luna, Omar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263951848-16822-1-git-send-email-nm@ti.com \
--to=nm@ti.com \
--cc=ameya.palande@nokia.com \
--cc=deepak.chitriki@ti.com \
--cc=felipe.contreras@nokia.com \
--cc=hiroshi.doyu@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=omar.ramirez@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox