From: Varun B Patil <varun.basavaraj.patil@gmail.com>
To: linux-omap@vger.kernel.org
Cc: Varun B Patil <varun.basavaraj.patil@gmail.com>
Subject: [PATCH] omapdce : clear transaction if engine_open rpsend fails
Date: Sun, 6 Oct 2013 18:38:45 +0530 [thread overview]
Message-ID: <1381064927-3798-1-git-send-email-varun.basavaraj.patil@gmail.com> (raw)
The next time the same transaction structure is used, when the req_id's
wrap around, it should be completely cleared (memset) to avoid corruption.
Signed-off-by: Varun B Patil <varun.basavaraj.patil@gmail.com>
---
drivers/staging/omapdce/dce.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/omapdce/dce.c b/drivers/staging/omapdce/dce.c
index 1d9b75c..2dbb24e9 100644
--- a/drivers/staging/omapdce/dce.c
+++ b/drivers/staging/omapdce/dce.c
@@ -754,7 +754,7 @@ static int ioctl_engine_open(struct drm_device *dev, void *data,
strncpy(req.name, arg->name, sizeof(req.name));
ret = rpsend(priv, &arg->token, hdr(&req), sizeof(req));
if (ret)
- return ret;
+ return rpabort(hdr(&req), ret);
}
/* then wait for reply, which is interruptible */
--
1.8.1.2
next reply other threads:[~2013-10-06 13:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-06 13:08 Varun B Patil [this message]
2013-10-06 13:08 ` [PATCH] omapdce : fix bug in ioctl_codec_process Varun B Patil
2013-10-06 13:08 ` [PATCH] omapdce : fix transaction corruption due to wrong request id Varun B Patil
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=1381064927-3798-1-git-send-email-varun.basavaraj.patil@gmail.com \
--to=varun.basavaraj.patil@gmail.com \
--cc=linux-omap@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).