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

!10094 net/sched: act_api: fix possible infinite loop in tcf_idr_check_alloc()

parents af839afc d6e26d67
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -440,7 +440,6 @@ int tcf_idr_check_alloc(struct tc_action_net *tn, u32 *index,
	struct tc_action *p;
	int ret;

again:
	spin_lock(&idrinfo->lock);
	if (*index) {
		p = idr_find(&idrinfo->action_idr, *index);
@@ -449,7 +448,7 @@ int tcf_idr_check_alloc(struct tc_action_net *tn, u32 *index,
			 * index but did not assign the pointer yet.
			 */
			spin_unlock(&idrinfo->lock);
			goto again;
			return -EAGAIN;
		}

		if (p) {