linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] omapdce : clear transaction if engine_open rpsend fails
@ 2013-10-06 13:08 Varun B Patil
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Varun B Patil @ 2013-10-06 13:08 UTC (permalink / raw)
  To: linux-omap; +Cc: Varun B Patil

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-06 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-06 13:08 [PATCH] omapdce : clear transaction if engine_open rpsend fails Varun B Patil
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

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).