Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54782
b: refs/heads/master
c: b0bb501
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed May 8, 2007
1 parent d76d07f commit 7ad7cbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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: 41ac8df9d5b731a4dd8f1f4e5a9de6ef8768383d
refs/heads/master: b0bb501651b467096723dcfcf4565d910a2aadf8
9 changes: 3 additions & 6 deletions trunk/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ kprobe_opcode_t __kprobes *get_insn_slot(void)
struct hlist_node *pos;

retry:
hlist_for_each(pos, &kprobe_insn_pages) {
kip = hlist_entry(pos, struct kprobe_insn_page, hlist);
hlist_for_each_entry(kip, pos, &kprobe_insn_pages, hlist) {
if (kip->nused < INSNS_PER_PAGE) {
int i;
for (i = 0; i < INSNS_PER_PAGE; i++) {
Expand Down Expand Up @@ -214,9 +213,8 @@ static int __kprobes collect_garbage_slots(void)
if (check_safety() != 0)
return -EAGAIN;

hlist_for_each_safe(pos, next, &kprobe_insn_pages) {
hlist_for_each_entry_safe(kip, pos, next, &kprobe_insn_pages, hlist) {
int i;
kip = hlist_entry(pos, struct kprobe_insn_page, hlist);
if (kip->ngarbage == 0)
continue;
kip->ngarbage = 0; /* we will collect all garbages */
Expand All @@ -235,8 +233,7 @@ void __kprobes free_insn_slot(kprobe_opcode_t * slot, int dirty)
struct kprobe_insn_page *kip;
struct hlist_node *pos;

hlist_for_each(pos, &kprobe_insn_pages) {
kip = hlist_entry(pos, struct kprobe_insn_page, hlist);
hlist_for_each_entry(kip, pos, &kprobe_insn_pages, hlist) {
if (kip->insns <= slot &&
slot < kip->insns + (INSNS_PER_PAGE * MAX_INSN_SIZE)) {
int i = (slot - kip->insns) / MAX_INSN_SIZE;
Expand Down

0 comments on commit 7ad7cbc

Please sign in to comment.