Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217468
b: refs/heads/master
c: 7a837d1
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed Oct 26, 2010
1 parent e5f6aea commit 1d91b57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ece0e2b6406a995c371e0311190631ea34ad851a
refs/heads/master: 7a837d1bb7cb2bceb093ec639068626586a89234
5 changes: 2 additions & 3 deletions trunk/arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ static unsigned long
copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
{
unsigned long offset, addr = (unsigned long)from;
int type = in_nmi() ? KM_NMI : KM_IRQ0;
unsigned long size, len = 0;
struct page *page;
void *map;
Expand All @@ -63,9 +62,9 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
offset = addr & (PAGE_SIZE - 1);
size = min(PAGE_SIZE - offset, n - len);

map = kmap_atomic(page, type);
map = kmap_atomic(page);
memcpy(to, map+offset, size);
kunmap_atomic(map, type);
kunmap_atomic(map);
put_page(page);

len += size;
Expand Down

0 comments on commit 1d91b57

Please sign in to comment.