From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] intel: make sure VG_CLEAR() will always do memory clear
Date: Wed, 20 Nov 2013 17:22:48 +0800 [thread overview]
Message-ID: <1384939368-17291-1-git-send-email-zhenyuw@linux.intel.com> (raw)
If valgrind is not available, current VG_CLEAR() would just ignore
memory clear operation which might make invalid ioctl argument. So
make sure VG_CLEAR() will always clear memory.
---
intel/intel_bufmgr_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index df6fcec..389f73a 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -74,7 +74,7 @@
#define VG(x)
#endif
-#define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s)))
+#define VG_CLEAR(s) (memset(&s, 0, sizeof(s)))
#define DBG(...) do { \
if (bufmgr_gem->bufmgr.debug) \
--
1.8.4.3
next reply other threads:[~2013-11-20 9:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 9:22 Zhenyu Wang [this message]
2013-11-20 11:36 ` [PATCH] intel: make sure VG_CLEAR() will always do memory clear Damien Lespiau
2013-11-20 15:53 ` Zhenyu Wang
2013-11-20 16:59 ` Damien Lespiau
2013-11-21 2:16 ` Zhenyu Wang
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=1384939368-17291-1-git-send-email-zhenyuw@linux.intel.com \
--to=zhenyuw@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.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