Re: [PATCH 09/31] powerpc/mm: Don't use pte_val as lvalue

From
Scott Wood <hidden>
Date
2015-09-22 02:22:38
Reply to
Aneesh Kumar K.V, 2015-09-21
On Mon, Sep 21, 2015 at 12:10:36PM +0530, Aneesh Kumar K.V wrote:
quoted hunk ↗ jump to hunk
+static inline pte_t pte_mkwrite(pte_t pte)
+{
+	pte_basic_t ptev;
+
+	ptev = pte_val(pte) & ~_PAGE_RO;
+	ptev |= _PAGE_RW;
+	return __pte(pte);
+}
s/__pte(pte)/__pte(ptev)/

...to fix an endless handle_mm_fault() loop.

CONFIG_STRICT_MM_TYPECHECKS would have caught this.

-Scott
Thread (57 messages) 57 messages, 5 authors, last reply 2015-09-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help