aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2016-03-02 10:09:19 -0500
committerJohannes Berg <johannes.berg@intel.com>2016-04-05 10:56:32 +0200
commit8f6fd83c6c5ec66a4a70c728535ddcdfef4f3697 (patch)
tree5b5a00794c61ddd351c11b2a928e1796290896c7 /net/netfilter
parentmac80211: mesh: embed known gates list in struct mesh_path (diff)
downloadlinux-dev-8f6fd83c6c5ec66a4a70c728535ddcdfef4f3697.tar.xz
linux-dev-8f6fd83c6c5ec66a4a70c728535ddcdfef4f3697.zip
rhashtable: accept GFP flags in rhashtable_walk_init
In certain cases, the 802.11 mesh pathtable code wants to iterate over all of the entries in the forwarding table from the receive path, which is inside an RCU read-side critical section. Enable walks inside atomic sections by allowing GFP_ATOMIC allocations for the walker state. Change all existing callsites to pass in GFP_KERNEL. Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Bob Copeland <me@bobcopeland.com> [also adjust gfs2/glock.c and rhashtable tests] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nft_hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nft_hash.c b/net/netfilter/nft_hash.c
index 3f9d45d3d9b7..6fa016564f90 100644
--- a/net/netfilter/nft_hash.c
+++ b/net/netfilter/nft_hash.c
@@ -192,7 +192,7 @@ static void nft_hash_walk(const struct nft_ctx *ctx, const struct nft_set *set,
u8 genmask = nft_genmask_cur(read_pnet(&set->pnet));
int err;
- err = rhashtable_walk_init(&priv->ht, &hti);
+ err = rhashtable_walk_init(&priv->ht, &hti, GFP_KERNEL);
iter->err = err;
if (err)
return;
@@ -248,7 +248,7 @@ static void nft_hash_gc(struct work_struct *work)
priv = container_of(work, struct nft_hash, gc_work.work);
set = nft_set_container_of(priv);
- err = rhashtable_walk_init(&priv->ht, &hti);
+ err = rhashtable_walk_init(&priv->ht, &hti, GFP_KERNEL);
if (err)
goto schedule;