All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: kaber@trash.net
Subject: [PATCH 2/3] [PATCH] fix sleep in read-side lock section
Date: Thu, 07 Aug 2008 12:08:25 +0200	[thread overview]
Message-ID: <20080807100825.8036.88782.stgit@Decadence> (raw)
In-Reply-To: <20080807100803.8036.8684.stgit@Decadence>

Fix allocation with GFP_KERNEL in ctnetlink_create_conntrack() under
read-side lock sections.

This problem was introduced in 2.6.25.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---

 net/netfilter/nf_conntrack_netlink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index a984b1c..7707cbb 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1142,7 +1142,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
 	rcu_read_lock();
 	helper = __nf_ct_helper_find(rtuple);
 	if (helper) {
-		help = nf_ct_helper_ext_add(ct, GFP_KERNEL);
+		help = nf_ct_helper_ext_add(ct, GFP_ATOMIC);
 		if (help == NULL) {
 			rcu_read_unlock();
 			err = -ENOMEM;


  reply	other threads:[~2008-08-07 15:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 10:08 [PATCH 1/3] [PATCH] fix double helper assignation for NAT'ed conntracks Pablo Neira Ayuso
2008-08-07 10:08 ` Pablo Neira Ayuso [this message]
2008-08-13 13:28   ` [PATCH 2/3] [PATCH] fix sleep in read-side lock section Patrick McHardy
2008-08-07 10:08 ` [PATCH 3/3] [PATCH] fix sleepable allocation with spin lock bh Pablo Neira Ayuso
2008-08-13 13:29   ` Patrick McHardy
2008-08-13 14:35     ` Pablo Neira Ayuso
2008-08-13 13:26 ` [PATCH 1/3] [PATCH] fix double helper assignation for NAT'ed conntracks Patrick McHardy

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=20080807100825.8036.88782.stgit@Decadence \
    --to=pablo@netfilter.org \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.