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

Commit e550785c authored by Benjamin Poirier's avatar Benjamin Poirier Committed by David S. Miller
Browse files

ipv6: Annotate change of locking mechanism for np->opt



follows up commit 45f6fad8 ("ipv6: add complete rcu protection around
np->opt") which added mixed rcu/refcount protection to np->opt.

Given the current implementation of rcu_pointer_handoff(), this has no
effect at runtime.

Signed-off-by: default avatarBenjamin Poirier <bpoirier@suse.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f0a40450
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -259,8 +259,12 @@ static inline struct ipv6_txoptions *txopt_get(const struct ipv6_pinfo *np)

	rcu_read_lock();
	opt = rcu_dereference(np->opt);
	if (opt && !atomic_inc_not_zero(&opt->refcnt))
	if (opt) {
		if (!atomic_inc_not_zero(&opt->refcnt))
			opt = NULL;
		else
			opt = rcu_pointer_handoff(opt);
	}
	rcu_read_unlock();
	return opt;
}