Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 673a774a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Revert "netfilter: nf_tables: don't write table validation state without mutex"



This reverts commit 3b9960e2.

Change-Id: I23ce9c168af92febbc7d5d1dfc60b6d8fe1a483d
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 88ac2d91
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ struct nfnetlink_subsystem {
	int (*commit)(struct net *net, struct sk_buff *skb);
	int (*abort)(struct net *net, struct sk_buff *skb,
		     enum nfnl_abort_action action);
	void (*cleanup)(struct net *net);
	bool (*valid_genid)(struct net *net, u32 genid);
};

+6 −2
Original line number Diff line number Diff line
@@ -6503,8 +6503,6 @@ static int nf_tables_validate(struct net *net)
			if (nft_table_validate(net, table) < 0)
				return -EAGAIN;
		}

		nft_validate_state_update(net, NFT_VALIDATE_SKIP);
		break;
	}

@@ -7186,6 +7184,11 @@ static int __nf_tables_abort(struct net *net, enum nfnl_abort_action action)
	return 0;
}

static void nf_tables_cleanup(struct net *net)
{
	nft_validate_state_update(net, NFT_VALIDATE_SKIP);
}

static int nf_tables_abort(struct net *net, struct sk_buff *skb,
			   enum nfnl_abort_action action)
{
@@ -7217,6 +7220,7 @@ static const struct nfnetlink_subsystem nf_tables_subsys = {
	.cb		= nf_tables_cb,
	.commit		= nf_tables_commit,
	.abort		= nf_tables_abort,
	.cleanup	= nf_tables_cleanup,
	.valid_genid	= nf_tables_valid_genid,
	.owner		= THIS_MODULE,
};
+2 −0
Original line number Diff line number Diff line
@@ -512,6 +512,8 @@ static void nfnetlink_rcv_batch(struct sk_buff *skb, struct nlmsghdr *nlh,
			goto replay_abort;
		}
	}
	if (ss->cleanup)
		ss->cleanup(net);

	nfnl_err_deliver(&err_list, oskb);
	kfree_skb(skb);