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

Commit 6df2a9ae authored by Paras Singh Jain's avatar Paras Singh Jain
Browse files

net: core: Release neigh lock when neigh_probe is enabled



Release the neighbor lock when timer expires for a neighbor entry
when neigh_probe flag is enabled.

Change-Id: I25aa82bfbba32908b093b53fff85a52d1fd894b2
Signed-off-by: default avatarParas Singh Jain <parassin@codeaurora.org>
parent 5b4c8cc3
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -1087,12 +1087,20 @@ static void neigh_timer_handler(struct timer_list *t)
		if (!mod_timer(&neigh->timer, next))
			neigh_hold(neigh);
	}

	if (neigh_probe_enable) {
		if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE | NUD_STALE))
			neigh_probe(neigh);
		else
			write_unlock(&neigh->lock);
	} else {
		if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) {
			neigh_probe(neigh);
		} else {
out:
			write_unlock(&neigh->lock);
		}
	}

	if (notify)
		neigh_update_notify(neigh, 0);