Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1270809 > unrolled thread
| Started by | Dave Hansen <dave@sr71.net> |
|---|---|
| First post | 2015-11-17 04:40 +0100 |
| Last post | 2015-11-17 04:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 01/37] uprobes: dont pass around current->mm Dave Hansen <dave@sr71.net> - 2015-11-17 04:40 +0100
| From | Dave Hansen <dave@sr71.net> |
|---|---|
| Date | 2015-11-17 04:40 +0100 |
| Subject | [PATCH 01/37] uprobes: dont pass around current->mm |
| Message-ID | <qvFhF-7YL-43@gated-at.bofh.it> |
From: Dave Hansen <dave.hansen@linux.intel.com>
It doesn't make a whole lot of sense to pass around 'mm' when
there is only one call path and that path passes current->mm in
all sitautions.
Remove 'mm' from one such path in uprobes.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
---
b/kernel/events/uprobes.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff -puN kernel/events/uprobes.c~uprobes-dont-pass-around-current-mm kernel/events/uprobes.c
--- a/kernel/events/uprobes.c~uprobes-dont-pass-around-current-mm 2015-11-16 12:35:34.870150592 -0800
+++ b/kernel/events/uprobes.c 2015-11-16 12:35:34.874150773 -0800
@@ -1685,7 +1685,7 @@ static void mmf_recalc_uprobes(struct mm
clear_bit(MMF_HAS_UPROBES, &mm->flags);
}
-static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr)
+static int is_trap_at_addr(unsigned long vaddr)
{
struct page *page;
uprobe_opcode_t opcode;
@@ -1699,7 +1699,7 @@ static int is_trap_at_addr(struct mm_str
if (likely(result == 0))
goto out;
- result = get_user_pages(NULL, mm, vaddr, 1, 0, 1, &page, NULL);
+ result = get_user_pages(NULL, current->mm, vaddr, 1, 0, 1, &page, NULL);
if (result < 0)
return result;
@@ -1727,7 +1727,7 @@ static struct uprobe *find_active_uprobe
}
if (!uprobe)
- *is_swbp = is_trap_at_addr(mm, bp_vaddr);
+ *is_swbp = is_trap_at_addr(bp_vaddr);
} else {
*is_swbp = -EFAULT;
}
_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web