diff options
author | David S. Miller <davem@davemloft.net> | 2016-03-19 21:05:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-19 21:05:24 -0400 |
commit | c78a85a8430e35aecd53e190a2f6b999062b1037 (patch) | |
tree | fbd69827579db437492fb77b5faa53814114bed3 /include/net/ipv6.h | |
parent | 133800d1f0288b9ddfc0d0aded10d9efa82d5b8c (diff) | |
parent | de06dbfa7861c9019eedefc0c356ba86e5098f1b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r-- | include/net/ipv6.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 6570f379aba2..f3c9857c645d 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -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)) - opt = NULL; + if (opt) { + if (!atomic_inc_not_zero(&opt->refcnt)) + opt = NULL; + else + opt = rcu_pointer_handoff(opt); + } rcu_read_unlock(); return opt; } |