Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
34754b69
Commit
34754b69
authored
Feb 25, 2009
by
Peter Zijlstra
Committed by
Ingo Molnar
Feb 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: make vmap yell louder when it is used under irqs_disabled()
Signed-off-by:
Ingo Molnar
<
mingo@elte.hu
>
parent
95108fa3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
arch/x86/kernel/alternative.c
arch/x86/kernel/alternative.c
+3
-3
mm/vmalloc.c
mm/vmalloc.c
+3
-0
No files found.
arch/x86/kernel/alternative.c
View file @
34754b69
...
...
@@ -498,12 +498,12 @@ void *text_poke_early(void *addr, const void *opcode, size_t len)
*/
void
*
__kprobes
text_poke
(
void
*
addr
,
const
void
*
opcode
,
size_t
len
)
{
unsigned
long
flags
;
char
*
vaddr
;
int
nr_pages
=
2
;
struct
page
*
pages
[
2
];
int
i
;
might_sleep
();
if
(
!
core_kernel_text
((
unsigned
long
)
addr
))
{
pages
[
0
]
=
vmalloc_to_page
(
addr
);
pages
[
1
]
=
vmalloc_to_page
(
addr
+
PAGE_SIZE
);
...
...
@@ -517,9 +517,9 @@ void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
nr_pages
=
1
;
vaddr
=
vmap
(
pages
,
nr_pages
,
VM_MAP
,
PAGE_KERNEL
);
BUG_ON
(
!
vaddr
);
local_irq_
save
(
flags
);
local_irq_
disable
(
);
memcpy
(
&
vaddr
[(
unsigned
long
)
addr
&
~
PAGE_MASK
],
opcode
,
len
);
local_irq_
restore
(
flags
);
local_irq_
enable
(
);
vunmap
(
vaddr
);
sync_core
();
/* Could also do a CLFLUSH here to speed up CPU recovery; but
...
...
mm/vmalloc.c
View file @
34754b69
...
...
@@ -1257,6 +1257,7 @@ EXPORT_SYMBOL(vfree);
void
vunmap
(
const
void
*
addr
)
{
BUG_ON
(
in_interrupt
());
might_sleep
();
__vunmap
(
addr
,
0
);
}
EXPORT_SYMBOL
(
vunmap
);
...
...
@@ -1276,6 +1277,8 @@ void *vmap(struct page **pages, unsigned int count,
{
struct
vm_struct
*
area
;
might_sleep
();
if
(
count
>
num_physpages
)
return
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment