netfilter: remove comments that predate rcu days
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 3 Nov 2016 09:56:05 +0000 (10:56 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 3 Nov 2016 09:56:05 +0000 (10:56 +0100)
We cannot block/sleep on nf_iterate because netfilter runs under rcu
read lock these days, where blocking is well-known to be illegal. So
let's remove these old comments.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/core.c

index 3d4aa96cb2197c3a2ff9eee4aa4f9140b5feabd1..76014ad72ec5df43d677e161cff042a0a5da7f72 100644 (file)
@@ -308,18 +308,11 @@ unsigned int nf_iterate(struct sk_buff *skb,
 {
        unsigned int verdict;
 
-       /*
-        * The caller must not block between calls to this
-        * function because of risk of continuing from deleted element.
-        */
        while (*entryp) {
                if (state->thresh > (*entryp)->ops.priority) {
                        *entryp = rcu_dereference((*entryp)->next);
                        continue;
                }
-
-               /* Optimization: we don't need to hold module
-                  reference here, since function can't sleep. --RR */
 repeat:
                verdict = (*entryp)->ops.hook((*entryp)->ops.priv, skb, state);
                if (verdict != NF_ACCEPT) {