Skip to content

Commit 628ae75

Browse files
authored
Merge pull request torvalds#133 from zandrey/5.4-2.1.x-imx
Update 5.4-2.1.x-imx to v5.4.65 from stable
2 parents ad794f8 + 4762b1d commit 628ae75

File tree

10 files changed

+78
-53
lines changed

10 files changed

+78
-53
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 4
4-
SUBLEVEL = 64
4+
SUBLEVEL = 65
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

drivers/net/usb/dm9601.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,10 @@ static const struct usb_device_id products[] = {
625625
USB_DEVICE(0x0a46, 0x1269), /* DM9621A USB to Fast Ethernet Adapter */
626626
.driver_info = (unsigned long)&dm9601_info,
627627
},
628+
{
629+
USB_DEVICE(0x0586, 0x3427), /* ZyXEL Keenetic Plus DSL xDSL modem */
630+
.driver_info = (unsigned long)&dm9601_info,
631+
},
628632
{}, // END
629633
};
630634

net/core/dev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6231,12 +6231,13 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
62316231
netdev_err_once(dev, "%s() called with weight %d\n", __func__,
62326232
weight);
62336233
napi->weight = weight;
6234-
list_add(&napi->dev_list, &dev->napi_list);
62356234
napi->dev = dev;
62366235
#ifdef CONFIG_NETPOLL
62376236
napi->poll_owner = -1;
62386237
#endif
62396238
set_bit(NAPI_STATE_SCHED, &napi->state);
6239+
set_bit(NAPI_STATE_NPSVC, &napi->state);
6240+
list_add_rcu(&napi->dev_list, &dev->napi_list);
62406241
napi_hash_add(napi);
62416242
}
62426243
EXPORT_SYMBOL(netif_napi_add);

net/core/netpoll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static void poll_napi(struct net_device *dev)
161161
struct napi_struct *napi;
162162
int cpu = smp_processor_id();
163163

164-
list_for_each_entry(napi, &dev->napi_list, dev_list) {
164+
list_for_each_entry_rcu(napi, &dev->napi_list, dev_list) {
165165
if (cmpxchg(&napi->poll_owner, -1, cpu) == -1) {
166166
poll_one_napi(napi);
167167
smp_store_release(&napi->poll_owner, -1);

net/ipv4/fib_trie.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,8 @@ void fib_info_notify_update(struct net *net, struct nl_info *info)
20102010
struct hlist_head *head = &net->ipv4.fib_table_hash[h];
20112011
struct fib_table *tb;
20122012

2013-
hlist_for_each_entry_rcu(tb, head, tb_hlist)
2013+
hlist_for_each_entry_rcu(tb, head, tb_hlist,
2014+
lockdep_rtnl_is_held())
20142015
__fib_info_notify_update(net, tb, info);
20152016
}
20162017
}

net/ipv6/sysctl_net_ipv6.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <net/calipso.h>
2222
#endif
2323

24+
static int two = 2;
2425
static int flowlabel_reflect_max = 0x7;
2526
static int auto_flowlabels_min;
2627
static int auto_flowlabels_max = IP6_AUTO_FLOW_LABEL_MAX;
@@ -151,7 +152,7 @@ static struct ctl_table ipv6_table_template[] = {
151152
.mode = 0644,
152153
.proc_handler = proc_rt6_multipath_hash_policy,
153154
.extra1 = SYSCTL_ZERO,
154-
.extra2 = SYSCTL_ONE,
155+
.extra2 = &two,
155156
},
156157
{
157158
.procname = "seg6_flowlabel",

net/netlabel/netlabel_domainhash.c

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ static void netlbl_domhsh_free_entry(struct rcu_head *entry)
8585
kfree(netlbl_domhsh_addr6_entry(iter6));
8686
}
8787
#endif /* IPv6 */
88+
kfree(ptr->def.addrsel);
8889
}
8990
kfree(ptr->domain);
9091
kfree(ptr);
@@ -536,6 +537,8 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry,
536537
goto add_return;
537538
}
538539
#endif /* IPv6 */
540+
/* cleanup the new entry since we've moved everything over */
541+
netlbl_domhsh_free_entry(&entry->rcu);
539542
} else
540543
ret_val = -EINVAL;
541544

@@ -579,6 +582,12 @@ int netlbl_domhsh_remove_entry(struct netlbl_dom_map *entry,
579582
{
580583
int ret_val = 0;
581584
struct audit_buffer *audit_buf;
585+
struct netlbl_af4list *iter4;
586+
struct netlbl_domaddr4_map *map4;
587+
#if IS_ENABLED(CONFIG_IPV6)
588+
struct netlbl_af6list *iter6;
589+
struct netlbl_domaddr6_map *map6;
590+
#endif /* IPv6 */
582591

583592
if (entry == NULL)
584593
return -ENOENT;
@@ -596,6 +605,9 @@ int netlbl_domhsh_remove_entry(struct netlbl_dom_map *entry,
596605
ret_val = -ENOENT;
597606
spin_unlock(&netlbl_domhsh_lock);
598607

608+
if (ret_val)
609+
return ret_val;
610+
599611
audit_buf = netlbl_audit_start_common(AUDIT_MAC_MAP_DEL, audit_info);
600612
if (audit_buf != NULL) {
601613
audit_log_format(audit_buf,
@@ -605,40 +617,29 @@ int netlbl_domhsh_remove_entry(struct netlbl_dom_map *entry,
605617
audit_log_end(audit_buf);
606618
}
607619

608-
if (ret_val == 0) {
609-
struct netlbl_af4list *iter4;
610-
struct netlbl_domaddr4_map *map4;
611-
#if IS_ENABLED(CONFIG_IPV6)
612-
struct netlbl_af6list *iter6;
613-
struct netlbl_domaddr6_map *map6;
614-
#endif /* IPv6 */
615-
616-
switch (entry->def.type) {
617-
case NETLBL_NLTYPE_ADDRSELECT:
618-
netlbl_af4list_foreach_rcu(iter4,
619-
&entry->def.addrsel->list4) {
620-
map4 = netlbl_domhsh_addr4_entry(iter4);
621-
cipso_v4_doi_putdef(map4->def.cipso);
622-
}
620+
switch (entry->def.type) {
621+
case NETLBL_NLTYPE_ADDRSELECT:
622+
netlbl_af4list_foreach_rcu(iter4, &entry->def.addrsel->list4) {
623+
map4 = netlbl_domhsh_addr4_entry(iter4);
624+
cipso_v4_doi_putdef(map4->def.cipso);
625+
}
623626
#if IS_ENABLED(CONFIG_IPV6)
624-
netlbl_af6list_foreach_rcu(iter6,
625-
&entry->def.addrsel->list6) {
626-
map6 = netlbl_domhsh_addr6_entry(iter6);
627-
calipso_doi_putdef(map6->def.calipso);
628-
}
627+
netlbl_af6list_foreach_rcu(iter6, &entry->def.addrsel->list6) {
628+
map6 = netlbl_domhsh_addr6_entry(iter6);
629+
calipso_doi_putdef(map6->def.calipso);
630+
}
629631
#endif /* IPv6 */
630-
break;
631-
case NETLBL_NLTYPE_CIPSOV4:
632-
cipso_v4_doi_putdef(entry->def.cipso);
633-
break;
632+
break;
633+
case NETLBL_NLTYPE_CIPSOV4:
634+
cipso_v4_doi_putdef(entry->def.cipso);
635+
break;
634636
#if IS_ENABLED(CONFIG_IPV6)
635-
case NETLBL_NLTYPE_CALIPSO:
636-
calipso_doi_putdef(entry->def.calipso);
637-
break;
637+
case NETLBL_NLTYPE_CALIPSO:
638+
calipso_doi_putdef(entry->def.calipso);
639+
break;
638640
#endif /* IPv6 */
639-
}
640-
call_rcu(&entry->rcu, netlbl_domhsh_free_entry);
641641
}
642+
call_rcu(&entry->rcu, netlbl_domhsh_free_entry);
642643

643644
return ret_val;
644645
}

net/sched/sch_taprio.c

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,9 +1177,27 @@ static void taprio_offload_config_changed(struct taprio_sched *q)
11771177
spin_unlock(&q->current_entry_lock);
11781178
}
11791179

1180-
static void taprio_sched_to_offload(struct taprio_sched *q,
1180+
static u32 tc_map_to_queue_mask(struct net_device *dev, u32 tc_mask)
1181+
{
1182+
u32 i, queue_mask = 0;
1183+
1184+
for (i = 0; i < dev->num_tc; i++) {
1185+
u32 offset, count;
1186+
1187+
if (!(tc_mask & BIT(i)))
1188+
continue;
1189+
1190+
offset = dev->tc_to_txq[i].offset;
1191+
count = dev->tc_to_txq[i].count;
1192+
1193+
queue_mask |= GENMASK(offset + count - 1, offset);
1194+
}
1195+
1196+
return queue_mask;
1197+
}
1198+
1199+
static void taprio_sched_to_offload(struct net_device *dev,
11811200
struct sched_gate_list *sched,
1182-
const struct tc_mqprio_qopt *mqprio,
11831201
struct tc_taprio_qopt_offload *offload)
11841202
{
11851203
struct sched_entry *entry;
@@ -1194,15 +1212,15 @@ static void taprio_sched_to_offload(struct taprio_sched *q,
11941212

11951213
e->command = entry->command;
11961214
e->interval = entry->interval;
1197-
e->gate_mask = entry->gate_mask;
1215+
e->gate_mask = tc_map_to_queue_mask(dev, entry->gate_mask);
1216+
11981217
i++;
11991218
}
12001219

12011220
offload->num_entries = i;
12021221
}
12031222

12041223
static int taprio_enable_offload(struct net_device *dev,
1205-
struct tc_mqprio_qopt *mqprio,
12061224
struct taprio_sched *q,
12071225
struct sched_gate_list *sched,
12081226
struct netlink_ext_ack *extack)
@@ -1224,7 +1242,7 @@ static int taprio_enable_offload(struct net_device *dev,
12241242
return -ENOMEM;
12251243
}
12261244
offload->enable = 1;
1227-
taprio_sched_to_offload(q, sched, mqprio, offload);
1245+
taprio_sched_to_offload(dev, sched, offload);
12281246

12291247
err = ops->ndo_setup_tc(dev, TC_SETUP_QDISC_TAPRIO, offload);
12301248
if (err < 0) {
@@ -1486,7 +1504,7 @@ static int taprio_change(struct Qdisc *sch, struct nlattr *opt,
14861504
}
14871505

14881506
if (FULL_OFFLOAD_IS_ENABLED(q->flags))
1489-
err = taprio_enable_offload(dev, mqprio, q, new_admin, extack);
1507+
err = taprio_enable_offload(dev, q, new_admin, extack);
14901508
else
14911509
err = taprio_disable_offload(dev, q, extack);
14921510
if (err)

net/sctp/socket.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8176,8 +8176,6 @@ static int sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
81768176

81778177
pr_debug("%s: begins, snum:%d\n", __func__, snum);
81788178

8179-
local_bh_disable();
8180-
81818179
if (snum == 0) {
81828180
/* Search for an available port. */
81838181
int low, high, remaining, index;
@@ -8196,20 +8194,21 @@ static int sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
81968194
continue;
81978195
index = sctp_phashfn(sock_net(sk), rover);
81988196
head = &sctp_port_hashtable[index];
8199-
spin_lock(&head->lock);
8197+
spin_lock_bh(&head->lock);
82008198
sctp_for_each_hentry(pp, &head->chain)
82018199
if ((pp->port == rover) &&
82028200
net_eq(sock_net(sk), pp->net))
82038201
goto next;
82048202
break;
82058203
next:
8206-
spin_unlock(&head->lock);
8204+
spin_unlock_bh(&head->lock);
8205+
cond_resched();
82078206
} while (--remaining > 0);
82088207

82098208
/* Exhausted local port range during search? */
82108209
ret = 1;
82118210
if (remaining <= 0)
8212-
goto fail;
8211+
return ret;
82138212

82148213
/* OK, here is the one we will use. HEAD (the port
82158214
* hash table list entry) is non-NULL and we hold it's
@@ -8224,7 +8223,7 @@ static int sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
82248223
* port iterator, pp being NULL.
82258224
*/
82268225
head = &sctp_port_hashtable[sctp_phashfn(sock_net(sk), snum)];
8227-
spin_lock(&head->lock);
8226+
spin_lock_bh(&head->lock);
82288227
sctp_for_each_hentry(pp, &head->chain) {
82298228
if ((pp->port == snum) && net_eq(pp->net, sock_net(sk)))
82308229
goto pp_found;
@@ -8324,10 +8323,7 @@ static int sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
83248323
ret = 0;
83258324

83268325
fail_unlock:
8327-
spin_unlock(&head->lock);
8328-
8329-
fail:
8330-
local_bh_enable();
8326+
spin_unlock_bh(&head->lock);
83318327
return ret;
83328328
}
83338329

net/tipc/socket.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,18 +2616,21 @@ static int tipc_shutdown(struct socket *sock, int how)
26162616

26172617
trace_tipc_sk_shutdown(sk, NULL, TIPC_DUMP_ALL, " ");
26182618
__tipc_shutdown(sock, TIPC_CONN_SHUTDOWN);
2619-
sk->sk_shutdown = SEND_SHUTDOWN;
2619+
if (tipc_sk_type_connectionless(sk))
2620+
sk->sk_shutdown = SHUTDOWN_MASK;
2621+
else
2622+
sk->sk_shutdown = SEND_SHUTDOWN;
26202623

26212624
if (sk->sk_state == TIPC_DISCONNECTING) {
26222625
/* Discard any unreceived messages */
26232626
__skb_queue_purge(&sk->sk_receive_queue);
26242627

2625-
/* Wake up anyone sleeping in poll */
2626-
sk->sk_state_change(sk);
26272628
res = 0;
26282629
} else {
26292630
res = -ENOTCONN;
26302631
}
2632+
/* Wake up anyone sleeping in poll. */
2633+
sk->sk_state_change(sk);
26312634

26322635
release_sock(sk);
26332636
return res;

0 commit comments

Comments
 (0)