Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327582
b: refs/heads/master
c: 6705e86
h: refs/heads/master
v: v3
  • Loading branch information
Michael Wang authored and Pablo Neira Ayuso committed Aug 22, 2012
1 parent d0f86b8 commit b74cf10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 2834a6386b86a5dd20380aadb01897c525448aa7
refs/heads/master: 6705e86724f1ac83394592be7dbfc0c07ac25aa2
10 changes: 6 additions & 4 deletions trunk/net/netfilter/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,13 @@ unsigned int nf_iterate(struct list_head *head,
int hook_thresh)
{
unsigned int verdict;
struct nf_hook_ops *elem = list_entry_rcu(*i, struct nf_hook_ops, list);

/*
* The caller must not block between calls to this
* function because of risk of continuing from deleted element.
*/
list_for_each_continue_rcu(*i, head) {
struct nf_hook_ops *elem = (struct nf_hook_ops *)*i;

list_for_each_entry_continue_rcu(elem, head, list) {
if (hook_thresh > elem->priority)
continue;

Expand All @@ -155,11 +154,14 @@ unsigned int nf_iterate(struct list_head *head,
continue;
}
#endif
if (verdict != NF_REPEAT)
if (verdict != NF_REPEAT) {
*i = &elem->list;
return verdict;
}
goto repeat;
}
}
*i = &elem->list;
return NF_ACCEPT;
}

Expand Down

0 comments on commit b74cf10

Please sign in to comment.