Unverified Commit c95ae4e1 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6428 net/sched: flower: Fix unable to handle page fault bug in fl_init

parents e958f17a a9b6772d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1397,7 +1397,7 @@ void tcf_block_put(struct tcf_block *block)

EXPORT_SYMBOL(tcf_block_put);

void (* const tmplt_reoffload)(struct tcf_chain *chain, bool add,
void (*tmplt_reoffload)(struct tcf_chain *chain, bool add,
			flow_setup_cb_t *cb, void *cb_priv);
EXPORT_SYMBOL(tmplt_reoffload);

+1 −4
Original line number Diff line number Diff line
@@ -356,8 +356,6 @@ static int fl_init(struct tcf_proto *tp)
	rcu_assign_pointer(tp->root, head);
	idr_init(&head->handle_idr);

	tmplt_reoffload = &fl_tmplt_reoffload;

	return rhashtable_init(&head->ht, &mask_ht_params);
}

@@ -596,8 +594,6 @@ static void fl_destroy(struct tcf_proto *tp, bool rtnl_held,

	__module_get(THIS_MODULE);
	tcf_queue_work(&head->rwork, fl_destroy_sleepable);

	tmplt_reoffload = NULL;
}

static void fl_put(struct tcf_proto *tp, void *arg)
@@ -3250,6 +3246,7 @@ static struct tcf_proto_ops cls_fl_ops __read_mostly = {

static int __init cls_fl_init(void)
{
	tmplt_reoffload = &fl_tmplt_reoffload;
	return register_tcf_proto_ops(&cls_fl_ops);
}