diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/net/addrconf.h | 3 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 1 | ||||
-rw-r--r-- | include/net/tcp.h | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 8d90fb9184e8..880e609b7352 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -399,6 +399,9 @@ static inline bool ip6_ignore_linkdown(const struct net_device *dev) { const struct inet6_dev *idev = __in6_dev_get(dev); + if (unlikely(!idev)) + return true; + return !!idev->cnf.ignore_routes_with_linkdown; } diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 8efc2419a815..b2046b02d11d 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h @@ -802,6 +802,7 @@ enum { }; void l2cap_chan_hold(struct l2cap_chan *c); +struct l2cap_chan *l2cap_chan_hold_unless_zero(struct l2cap_chan *c); void l2cap_chan_put(struct l2cap_chan *c); static inline void l2cap_chan_lock(struct l2cap_chan *chan) diff --git a/include/net/tcp.h b/include/net/tcp.h index aaf1d5d5a13b..8459145497b7 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1389,7 +1389,7 @@ void tcp_select_initial_window(const struct sock *sk, int __space, static inline int tcp_win_from_space(const struct sock *sk, int space) { - int tcp_adv_win_scale = sock_net(sk)->ipv4.sysctl_tcp_adv_win_scale; + int tcp_adv_win_scale = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_adv_win_scale); return tcp_adv_win_scale <= 0 ? (space>>(-tcp_adv_win_scale)) : |