diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ethtool/netlink.h | 26 | ||||
-rw-r--r-- | net/netrom/nr_timer.c | 1 | ||||
-rw-r--r-- | net/sched/sch_taprio.c | 1 | ||||
-rw-r--r-- | net/sctp/bind_addr.c | 6 |
4 files changed, 7 insertions, 27 deletions
diff --git a/net/ethtool/netlink.h b/net/ethtool/netlink.h index 744b3ab966b0..3753787ba233 100644 --- a/net/ethtool/netlink.h +++ b/net/ethtool/netlink.h @@ -112,32 +112,6 @@ static inline void ethnl_update_u8(u8 *dst, const struct nlattr *attr, } /** - * ethnl_update_bool() - update bool from NLA_U8 attribute - * @dst: value to update - * @attr: netlink attribute with new value or null - * @mod: pointer to bool for modification tracking - * - * Use the u8 value from NLA_U8 netlink attribute @attr to set bool variable - * pointed to by @dst to false (if zero) or 1 (if not); do nothing if @attr is - * null. Bool pointed to by @mod is set to true if this function changed the - * logical value of *dst, otherwise it is left as is. - */ -static inline void ethnl_update_bool(bool *dst, const struct nlattr *attr, - bool *mod) -{ - u8 val; - - if (!attr) - return; - val = !!nla_get_u8(attr); - if (*dst == val) - return; - - *dst = val; - *mod = true; -} - -/** * ethnl_update_bool32() - update u32 used as bool from NLA_U8 attribute * @dst: value to update * @attr: netlink attribute with new value or null diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c index a8da88db7893..4e7c968cde2d 100644 --- a/net/netrom/nr_timer.c +++ b/net/netrom/nr_timer.c @@ -121,6 +121,7 @@ static void nr_heartbeat_expiry(struct timer_list *t) is accepted() it isn't 'dead' so doesn't get removed. */ if (sock_flag(sk, SOCK_DESTROY) || (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) { + sock_hold(sk); bh_unlock_sock(sk); nr_destroy_socket(sk); goto out; diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 9a11a499ea2d..c322a61eaeea 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -1700,7 +1700,6 @@ static void taprio_reset(struct Qdisc *sch) int i; hrtimer_cancel(&q->advance_timer); - qdisc_synchronize(sch); if (q->qdiscs) { for (i = 0; i < dev->num_tx_queues; i++) diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index 59e653b528b1..6b95d3ba8fe1 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c @@ -73,6 +73,12 @@ int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, } } + /* If somehow no addresses were found that can be used with this + * scope, it's an error. + */ + if (list_empty(&dest->address_list)) + error = -ENETUNREACH; + out: if (error) sctp_bind_addr_clean(dest); |