From: Zachary Amsden <zach@vmware.com>
To: Andrew Morton <akpm@osdl.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
To: Virtualization Mailing List <virtualization@lists.osdl.org>
To: "H. Peter Anvin" <hpa@zytor.com>
To: Zwane Mwaikambo <zwane@arm.linux.org.uk>
To: Chris Wright <chrisw@osdl.org>
To: Martin Bligh <mbligh@mbligh.org>
To: Pratap Subrahmanyam <pratap@vmware.com>
To: Christopher Li <chrisl@vmware.com>
To: Zachary Amsden <zach@vmware.com>
Subject: [PATCH 3/5] Make set_wrprotect() value safe
Date: Wed, 24 Aug 2005 11:43:12 -0700 [thread overview]
Message-ID: <200508241843.j7OIhC7a001888@zach-dev.vmware.com> (raw)
The macro set_wrprotect() should not be defined to have a value. Make it
a do {} while(0) instead of ({}).
Noticed by Chris Wright.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Patch-subject: Make set_wrprotect() value safe
Index: linux-2.6.13/include/asm-generic/pgtable.h
===================================================================
--- linux-2.6.13.orig/include/asm-generic/pgtable.h 2005-08-15 13:54:42.000000000 -0700
+++ linux-2.6.13/include/asm-generic/pgtable.h 2005-08-22 14:21:05.000000000 -0700
@@ -314,11 +314,11 @@ do { \
#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
#define ptep_set_wrprotect(__mm, __address, __ptep) \
-({ \
+do { \
pte_t __old_pte = *(__ptep); \
set_pte_at((__mm), (__address), (__ptep), \
pte_wrprotect(__old_pte)); \
-})
+} while (0)
#endif
#ifndef __HAVE_ARCH_PTE_SAME
next reply other threads:[~2005-08-24 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-24 18:43 Zachary Amsden [this message]
2005-08-24 19:55 ` Chris Wright
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=200508241843.j7OIhC7a001888@zach-dev.vmware.com \
--to=zach@vmware.com \
--cc=akpm@osdl.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
all inboxes | Powered by JetHome®