Unverified Commit 1a402e69 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3863 linux-4.19.y inclusion(4.19.299..4.19.303) part2

Merge Pull Request from: @LiuYongQiang0816 
 
linux-4.19.y inclusion(4.19.299..4.19.303) part2  
 
Link:https://gitee.com/openeuler/kernel/pulls/3863

 

Reviewed-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parents 8377dd14 ff206ede
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -768,7 +768,7 @@ static void macvlan_change_rx_flags(struct net_device *dev, int change)
	if (dev->flags & IFF_UP) {
		if (change & IFF_ALLMULTI)
			dev_set_allmulti(lowerdev, dev->flags & IFF_ALLMULTI ? 1 : -1);
		if (change & IFF_PROMISC)
		if (!macvlan_passthru(vlan->port) && change & IFF_PROMISC)
			dev_set_promiscuity(lowerdev,
					    dev->flags & IFF_PROMISC ? 1 : -1);

+5 −1
Original line number Diff line number Diff line
@@ -467,6 +467,10 @@ ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
	case PPPIOCSMRU:
		if (get_user(val, (int __user *) argp))
			break;
		if (val > U16_MAX) {
			err = -EINVAL;
			break;
		}
		if (val < PPP_MRU)
			val = PPP_MRU;
		ap->mru = val;
@@ -702,7 +706,7 @@ ppp_sync_input(struct syncppp *ap, const unsigned char *buf,

	/* strip address/control field if present */
	p = skb->data;
	if (p[0] == PPP_ALLSTATIONS && p[1] == PPP_UI) {
	if (skb->len >= 2 && p[0] == PPP_ALLSTATIONS && p[1] == PPP_UI) {
		/* chop off address/control */
		if (skb->len < 3)
			goto err;
+3 −1
Original line number Diff line number Diff line
@@ -291,8 +291,10 @@ static int __team_options_register(struct team *team,
	return 0;

inst_rollback:
	for (i--; i >= 0; i--)
	for (i--; i >= 0; i--) {
		__team_option_inst_del_option(team, dst_opts[i]);
		list_del(&dst_opts[i]->list);
	}

	i = option_count - 1;
alloc_rollback:
+19 −7
Original line number Diff line number Diff line
@@ -1806,21 +1806,33 @@ static inline void sk_tx_queue_set(struct sock *sk, int tx_queue)
	/* sk_tx_queue_mapping accept only upto a 16-bit value */
	if (WARN_ON_ONCE((unsigned short)tx_queue >= USHRT_MAX))
		return;
	sk->sk_tx_queue_mapping = tx_queue;
	/* Paired with READ_ONCE() in sk_tx_queue_get() and
	 * other WRITE_ONCE() because socket lock might be not held.
	 */
	WRITE_ONCE(sk->sk_tx_queue_mapping, tx_queue);
}

#define NO_QUEUE_MAPPING	USHRT_MAX

static inline void sk_tx_queue_clear(struct sock *sk)
{
	sk->sk_tx_queue_mapping = NO_QUEUE_MAPPING;
	/* Paired with READ_ONCE() in sk_tx_queue_get() and
	 * other WRITE_ONCE() because socket lock might be not held.
	 */
	WRITE_ONCE(sk->sk_tx_queue_mapping, NO_QUEUE_MAPPING);
}

static inline int sk_tx_queue_get(const struct sock *sk)
{
	if (sk && sk->sk_tx_queue_mapping != NO_QUEUE_MAPPING)
		return sk->sk_tx_queue_mapping;
	if (sk) {
		/* Paired with WRITE_ONCE() in sk_tx_queue_clear()
		 * and sk_tx_queue_set().
		 */
		int val = READ_ONCE(sk->sk_tx_queue_mapping);

		if (val != NO_QUEUE_MAPPING)
			return val;
	}
	return -1;
}

@@ -1953,7 +1965,7 @@ static inline void dst_negative_advice(struct sock *sk)
		if (ndst != dst) {
			rcu_assign_pointer(sk->sk_dst_cache, ndst);
			sk_tx_queue_clear(sk);
			sk->sk_dst_pending_confirm = 0;
			WRITE_ONCE(sk->sk_dst_pending_confirm, 0);
		}
	}
}
@@ -1964,7 +1976,7 @@ __sk_dst_set(struct sock *sk, struct dst_entry *dst)
	struct dst_entry *old_dst;

	sk_tx_queue_clear(sk);
	sk->sk_dst_pending_confirm = 0;
	WRITE_ONCE(sk->sk_dst_pending_confirm, 0);
	old_dst = rcu_dereference_protected(sk->sk_dst_cache,
					    lockdep_sock_is_held(sk));
	rcu_assign_pointer(sk->sk_dst_cache, dst);
@@ -1977,7 +1989,7 @@ sk_dst_set(struct sock *sk, struct dst_entry *dst)
	struct dst_entry *old_dst;

	sk_tx_queue_clear(sk);
	sk->sk_dst_pending_confirm = 0;
	WRITE_ONCE(sk->sk_dst_pending_confirm, 0);
	old_dst = xchg((__force struct dst_entry **)&sk->sk_dst_cache, dst);
	dst_release(old_dst);
}
+1 −1
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)

	if (dst && dst->obsolete && dst->ops->check(dst, cookie) == NULL) {
		sk_tx_queue_clear(sk);
		sk->sk_dst_pending_confirm = 0;
		WRITE_ONCE(sk->sk_dst_pending_confirm, 0);
		RCU_INIT_POINTER(sk->sk_dst_cache, NULL);
		dst_release(dst);
		return NULL;
Loading