netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: kaber@trash.net, xiaosuo@gmail.com, eric.dumazet@gmail.com
Subject: Re: [PATCH] netfilter: add extended accounting infrastructure over nfnetlink
Date: Sat, 24 Dec 2011 02:33:51 +0100	[thread overview]
Message-ID: <20111224013351.GA12788@1984> (raw)
In-Reply-To: <1324689946-20269-2-git-send-email-pablo@netfilter.org>

In case you notice:

On Sat, Dec 24, 2011 at 02:25:46AM +0100, pablo@netfilter.org wrote:
> +struct nf_acct *nfnl_acct_find_get(const char *acct_name)
> +{
> +	struct nf_acct *cur, *acct = NULL;
> +
> +	rcu_read_lock();
> +	list_for_each_entry_rcu(cur, &nfnl_acct_list, head) {
> +		if (strncmp(cur->name, acct_name, NFACCT_NAME_MAX)!= 0)
> +			continue;
> +
> +		if (!try_module_get(THIS_MODULE))
> +			goto err;
> +
> +		if (!atomic_inc_not_zero(&cur->refcnt)) {
> +			module_put(THIS_MODULE);
> +			goto err;
> +		}
> +
> +		acct = cur;
> +		break;
> +	}
> +	rcu_read_unlock();
> +err:

I've fixed this here. Now the err label goes before the rcu_read_unlock ;-)

  reply	other threads:[~2011-12-24  1:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-24  1:25 [PATCH] nfacct infrastructure (version 3) pablo
2011-12-24  1:25 ` [PATCH] netfilter: add extended accounting infrastructure over nfnetlink pablo
2011-12-24  1:33   ` Pablo Neira Ayuso [this message]
2011-12-24  4:04   ` Eric Dumazet
  -- strict thread matches above, loose matches on Subject: below --
2011-12-24 12:49 [PATCH] nfacct infrastructure (version 4) pablo
2011-12-24 12:49 ` [PATCH] netfilter: add extended accounting infrastructure over nfnetlink pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111224013351.GA12788@1984 \
    --to=pablo@netfilter.org \
    --cc=eric.dumazet@gmail.com \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=xiaosuo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).