lkml.org 
[lkml]   [2009]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: irq-disabled vs vmap vs text_poke
From
Date
On Fri, 2009-02-13 at 14:02 +0100, Peter Zijlstra wrote:
> Agreed, I think we want to fix text_poke() and make the vmap/vunmap()
> ops yell louder at violations of these rules.

Something like so?

---
mm/vmalloc.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 75f49d3..8516cea 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1249,6 +1249,7 @@ EXPORT_SYMBOL(vfree);
void vunmap(const void *addr)
{
BUG_ON(in_interrupt());
+ might_sleep();
__vunmap(addr, 0);
}
EXPORT_SYMBOL(vunmap);
@@ -1268,6 +1269,8 @@ void *vmap(struct page **pages, unsigned int count,
{
struct vm_struct *area;

+ might_sleep();
+
if (count > num_physpages)
return NULL;



\
 
 \ /
  Last update: 2009-02-13 14:05    [W:0.525 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site