[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080306155238.GA24008@elte.hu>
Date: Thu, 6 Mar 2008 16:52:38 +0100
From: Ingo Molnar <mingo@...e.hu>
To: pageexec@...email.hu
Cc: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
Srinivasa DS <srinivasa@...ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, ananth@...ibm.com,
Jim Keniston <jkenisto@...ibm.com>, srikar@...ux.vnet.ibm.com,
SystemTAP <systemtap@...rces.redhat.com>,
Andi Kleen <andi@...stfloor.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Jeremy Fitzhardinge <jeremy@...p.org>,
Arjan van de Ven <arjan@...radead.org>
Subject: Re: [PATCH] x86 - Enhance DEBUG_RODATA support - alternatives
* pageexec@...email.hu <pageexec@...email.hu> wrote:
> > + vaddr = vmap(pages, nr_pages, VM_MAP, PAGE_KERNEL);
> > + WARN_ON(!vaddr);
> > + local_irq_save(flags);
> > + memcpy(&vaddr[(unsigned long)addr & ~PAGE_MASK], opcode, len);
> > + local_irq_restore(flags);
>
> you probably want a BUG_ON instead (or some graceful recovery) else
> the NULL deref will trigger with IRQs off...
agreed - i changed it to BUG_ON() for the time being.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists