Skip to content

Commit 7ebfc85

Browse files
committed
Merge tag 'net-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth, bpf, can and netfilter. A little larger than usual but it's all fixes, no late features. It's large partially because of timing, and partially because of follow ups to stuff that got merged a week or so before the merge window and wasn't as widely tested. Maybe the Bluetooth fixes are a little alarming so we'll address that, but the rest seems okay and not scary. Notably we're including a fix for the netfilter Kconfig [1], your WiFi warning [2] and a bluetooth fix which should unblock syzbot [3]. Current release - regressions: - Bluetooth: - don't try to cancel uninitialized works [3] - L2CAP: fix use-after-free caused by l2cap_chan_put - tls: rx: fix device offload after recent rework - devlink: fix UAF on failed reload and leftover locks in mlxsw Current release - new code bugs: - netfilter: - flowtable: fix incorrect Kconfig dependencies [1] - nf_tables: fix crash when nf_trace is enabled - bpf: - use proper target btf when exporting attach_btf_obj_id - arm64: fixes for bpf trampoline support - Bluetooth: - ISO: unlock on error path in iso_sock_setsockopt() - ISO: fix info leak in iso_sock_getsockopt() - ISO: fix iso_sock_getsockopt for BT_DEFER_SETUP - ISO: fix memory corruption on iso_pinfo.base - ISO: fix not using the correct QoS - hci_conn: fix updating ISO QoS PHY - phy: dp83867: fix get nvmem cell fail Previous releases - regressions: - wifi: cfg80211: fix validating BSS pointers in __cfg80211_connect_result [2] - atm: bring back zatm uAPI after ATM had been removed - properly fix old bug making bonding ARP monitor mode not being able to work with software devices with lockless Tx - tap: fix null-deref on skb->dev in dev_parse_header_protocol - revert "net: usb: ax88179_178a needs FLAG_SEND_ZLP" it helps some devices and breaks others - netfilter: - nf_tables: many fixes rejecting cross-object linking which may lead to UAFs - nf_tables: fix null deref due to zeroed list head - nf_tables: validate variable length element extension - bgmac: fix a BUG triggered by wrong bytes_compl - bcmgenet: indicate MAC is in charge of PHY PM Previous releases - always broken: - bpf: - fix bad pointer deref in bpf_sys_bpf() injected via test infra - disallow non-builtin bpf programs calling the prog_run command - don't reinit map value in prealloc_lru_pop - fix UAFs during the read of map iterator fd - fix invalidity check for values in sk local storage map - reject sleepable program for non-resched map iterator - mptcp: - move subflow cleanup in mptcp_destroy_common() - do not queue data on closed subflows - virtio_net: fix memory leak inside XDP_TX with mergeable - vsock: fix memory leak when multiple threads try to connect() - rework sk_user_data sharing to prevent psock leaks - geneve: fix TOS inheriting for ipv4 - tunnels & drivers: do not use RT_TOS for IPv6 flowlabel - phy: c45 baset1: do not skip aneg configuration if clock role is not specified - rose: avoid overflow when /proc displays timer information - x25: fix call timeouts in blocking connects - can: mcp251x: fix race condition on receive interrupt - can: j1939: - replace user-reachable WARN_ON_ONCE() with netdev_warn_once() - fix memory leak of skbs in j1939_session_destroy() Misc: - docs: bpf: clarify that many things are not uAPI - seg6: initialize induction variable to first valid array index (to silence clang vs objtool warning) - can: ems_usb: fix clang 14's -Wunaligned-access warning" * tag 'net-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (117 commits) net: atm: bring back zatm uAPI dpaa2-eth: trace the allocated address instead of page struct net: add missing kdoc for struct genl_multicast_group::flags nfp: fix use-after-free in area_cache_get() MAINTAINERS: use my korg address for mt7601u mlxsw: minimal: Fix deadlock in ports creation bonding: fix reference count leak in balance-alb mode net: usb: qmi_wwan: Add support for Cinterion MV32 bpf: Shut up kern_sys_bpf warning. net/tls: Use RCU API to access tls_ctx->netdev tls: rx: device: don't try to copy too much on detach tls: rx: device: bound the frag walk net_sched: cls_route: remove from list when handle is 0 selftests: forwarding: Fix failing tests with old libnet net: refactor bpf_sk_reuseport_detach() net: fix refcount bug in sk_psock_get (2) selftests/bpf: Ensure sleepable program is rejected by hash map iter selftests/bpf: Add write tests for sk local storage map iterator selftests/bpf: Add tests for reading a dangling map iter fd bpf: Only allow sleepable program for resched-able iterator ...
2 parents e091ba5 + c2e7563 commit 7ebfc85

116 files changed

Lines changed: 1865 additions & 646 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/bpf/bpf_design_QA.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ A: NO. Tracepoints are tied to internal implementation details hence they are
214214
subject to change and can break with newer kernels. BPF programs need to change
215215
accordingly when this happens.
216216

217+
Q: Are places where kprobes can attach part of the stable ABI?
218+
--------------------------------------------------------------
219+
A: NO. The places to which kprobes can attach are internal implementation
220+
details, which means that they are subject to change and can break with
221+
newer kernels. BPF programs need to change accordingly when this happens.
222+
217223
Q: How much stack space a BPF program uses?
218224
-------------------------------------------
219225
A: Currently all program types are limited to 512 bytes of stack
@@ -273,3 +279,22 @@ cc (congestion-control) implementations. If any of these kernel
273279
functions has changed, both the in-tree and out-of-tree kernel tcp cc
274280
implementations have to be changed. The same goes for the bpf
275281
programs and they have to be adjusted accordingly.
282+
283+
Q: Attaching to arbitrary kernel functions is an ABI?
284+
-----------------------------------------------------
285+
Q: BPF programs can be attached to many kernel functions. Do these
286+
kernel functions become part of the ABI?
287+
288+
A: NO.
289+
290+
The kernel function prototypes will change, and BPF programs attaching to
291+
them will need to change. The BPF compile-once-run-everywhere (CO-RE)
292+
should be used in order to make it easier to adapt your BPF programs to
293+
different versions of the kernel.
294+
295+
Q: Marking a function with BTF_ID makes that function an ABI?
296+
-------------------------------------------------------------
297+
A: NO.
298+
299+
The BTF_ID macro does not cause a function to become part of the ABI
300+
any more than does the EXPORT_SYMBOL_GPL macro.

Documentation/networking/bonding.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,15 +1982,6 @@ uses the response as an indication that the link is operating. This
19821982
gives some assurance that traffic is actually flowing to and from one
19831983
or more peers on the local network.
19841984

1985-
The ARP monitor relies on the device driver itself to verify
1986-
that traffic is flowing. In particular, the driver must keep up to
1987-
date the last receive time, dev->last_rx. Drivers that use NETIF_F_LLTX
1988-
flag must also update netdev_queue->trans_start. If they do not, then the
1989-
ARP monitor will immediately fail any slaves using that driver, and
1990-
those slaves will stay down. If networking monitoring (tcpdump, etc)
1991-
shows the ARP requests and replies on the network, then it may be that
1992-
your device driver is not updating last_rx and trans_start.
1993-
19941985
7.2 Configuring Multiple ARP Targets
19951986
------------------------------------
19961987

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9694,7 +9694,7 @@ F: arch/powerpc/platforms/powernv/copy-paste.h
96949694
F: arch/powerpc/platforms/powernv/vas*
96959695

96969696
IBM Power Virtual Ethernet Device Driver
9697-
M: Cristobal Forno <cforno12@linux.ibm.com>
9697+
M: Nick Child <nnac123@linux.ibm.com>
96989698
L: netdev@vger.kernel.org
96999699
S: Supported
97009700
F: drivers/net/ethernet/ibm/ibmveth.*
@@ -12843,7 +12843,7 @@ F: Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
1284312843
F: drivers/net/wireless/mediatek/mt76/
1284412844

1284512845
MEDIATEK MT7601U WIRELESS LAN DRIVER
12846-
M: Jakub Kicinski <kubakici@wp.pl>
12846+
M: Jakub Kicinski <kuba@kernel.org>
1284712847
L: linux-wireless@vger.kernel.org
1284812848
S: Maintained
1284912849
F: drivers/net/wireless/mediatek/mt7601u/

arch/arm64/net/bpf_jit_comp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
14961496
memset(&ctx, 0, sizeof(ctx));
14971497
ctx.prog = prog;
14981498

1499-
ctx.offset = kcalloc(prog->len + 1, sizeof(int), GFP_KERNEL);
1499+
ctx.offset = kvcalloc(prog->len + 1, sizeof(int), GFP_KERNEL);
15001500
if (ctx.offset == NULL) {
15011501
prog = orig_prog;
15021502
goto out_off;
@@ -1601,7 +1601,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
16011601
ctx.offset[i] *= AARCH64_INSN_SIZE;
16021602
bpf_prog_fill_jited_linfo(prog, ctx.offset + 1);
16031603
out_off:
1604-
kfree(ctx.offset);
1604+
kvfree(ctx.offset);
16051605
kfree(jit_data);
16061606
prog->aux->jit_data = NULL;
16071607
}
@@ -1643,7 +1643,7 @@ static void invoke_bpf_prog(struct jit_ctx *ctx, struct bpf_tramp_link *l,
16431643
int args_off, int retval_off, int run_ctx_off,
16441644
bool save_ret)
16451645
{
1646-
u32 *branch;
1646+
__le32 *branch;
16471647
u64 enter_prog;
16481648
u64 exit_prog;
16491649
struct bpf_prog *p = l->link.prog;
@@ -1698,7 +1698,7 @@ static void invoke_bpf_prog(struct jit_ctx *ctx, struct bpf_tramp_link *l,
16981698

16991699
if (ctx->image) {
17001700
int offset = &ctx->image[ctx->idx] - branch;
1701-
*branch = A64_CBZ(1, A64_R(0), offset);
1701+
*branch = cpu_to_le32(A64_CBZ(1, A64_R(0), offset));
17021702
}
17031703

17041704
/* arg1: prog */
@@ -1713,7 +1713,7 @@ static void invoke_bpf_prog(struct jit_ctx *ctx, struct bpf_tramp_link *l,
17131713

17141714
static void invoke_bpf_mod_ret(struct jit_ctx *ctx, struct bpf_tramp_links *tl,
17151715
int args_off, int retval_off, int run_ctx_off,
1716-
u32 **branches)
1716+
__le32 **branches)
17171717
{
17181718
int i;
17191719

@@ -1784,7 +1784,7 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
17841784
struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT];
17851785
struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN];
17861786
bool save_ret;
1787-
u32 **branches = NULL;
1787+
__le32 **branches = NULL;
17881788

17891789
/* trampoline stack layout:
17901790
* [ parent ip ]
@@ -1892,7 +1892,7 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
18921892
flags & BPF_TRAMP_F_RET_FENTRY_RET);
18931893

18941894
if (fmod_ret->nr_links) {
1895-
branches = kcalloc(fmod_ret->nr_links, sizeof(u32 *),
1895+
branches = kcalloc(fmod_ret->nr_links, sizeof(__le32 *),
18961896
GFP_KERNEL);
18971897
if (!branches)
18981898
return -ENOMEM;
@@ -1916,7 +1916,7 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
19161916
/* update the branches saved in invoke_bpf_mod_ret with cbnz */
19171917
for (i = 0; i < fmod_ret->nr_links && ctx->image != NULL; i++) {
19181918
int offset = &ctx->image[ctx->idx] - branches[i];
1919-
*branches[i] = A64_CBNZ(1, A64_R(10), offset);
1919+
*branches[i] = cpu_to_le32(A64_CBNZ(1, A64_R(10), offset));
19201920
}
19211921

19221922
for (i = 0; i < fexit->nr_links; i++)

drivers/atm/idt77252.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3752,6 +3752,7 @@ static void __exit idt77252_exit(void)
37523752
card = idt77252_chain;
37533753
dev = card->atmdev;
37543754
idt77252_chain = card->next;
3755+
del_timer_sync(&card->tst_timer);
37553756

37563757
if (dev->phy->stop)
37573758
dev->phy->stop(dev);

drivers/net/bonding/bond_alb.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb,
653653
static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
654654
{
655655
struct slave *tx_slave = NULL;
656+
struct net_device *dev;
656657
struct arp_pkt *arp;
657658

658659
if (!pskb_network_may_pull(skb, sizeof(*arp)))
@@ -665,6 +666,15 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
665666
if (!bond_slave_has_mac_rx(bond, arp->mac_src))
666667
return NULL;
667668

669+
dev = ip_dev_find(dev_net(bond->dev), arp->ip_src);
670+
if (dev) {
671+
if (netif_is_bridge_master(dev)) {
672+
dev_put(dev);
673+
return NULL;
674+
}
675+
dev_put(dev);
676+
}
677+
668678
if (arp->op_code == htons(ARPOP_REPLY)) {
669679
/* the arp must be sent on the selected rx channel */
670680
tx_slave = rlb_choose_channel(skb, bond, arp);

drivers/net/bonding/bond_main.c

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
20012001
for (i = 0; i < BOND_MAX_ARP_TARGETS; i++)
20022002
new_slave->target_last_arp_rx[i] = new_slave->last_rx;
20032003

2004+
new_slave->last_tx = new_slave->last_rx;
2005+
20042006
if (bond->params.miimon && !bond->params.use_carrier) {
20052007
link_reporting = bond_check_dev_link(bond, slave_dev, 1);
20062008

@@ -2884,8 +2886,11 @@ static void bond_arp_send(struct slave *slave, int arp_op, __be32 dest_ip,
28842886
return;
28852887
}
28862888

2887-
if (bond_handle_vlan(slave, tags, skb))
2889+
if (bond_handle_vlan(slave, tags, skb)) {
2890+
slave_update_last_tx(slave);
28882891
arp_xmit(skb);
2892+
}
2893+
28892894
return;
28902895
}
28912896

@@ -3074,8 +3079,7 @@ static int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
30743079
curr_active_slave->last_link_up))
30753080
bond_validate_arp(bond, slave, tip, sip);
30763081
else if (curr_arp_slave && (arp->ar_op == htons(ARPOP_REPLY)) &&
3077-
bond_time_in_interval(bond,
3078-
dev_trans_start(curr_arp_slave->dev), 1))
3082+
bond_time_in_interval(bond, slave_last_tx(curr_arp_slave), 1))
30793083
bond_validate_arp(bond, slave, sip, tip);
30803084

30813085
out_unlock:
@@ -3103,8 +3107,10 @@ static void bond_ns_send(struct slave *slave, const struct in6_addr *daddr,
31033107
}
31043108

31053109
addrconf_addr_solict_mult(daddr, &mcaddr);
3106-
if (bond_handle_vlan(slave, tags, skb))
3110+
if (bond_handle_vlan(slave, tags, skb)) {
3111+
slave_update_last_tx(slave);
31073112
ndisc_send_skb(skb, &mcaddr, saddr);
3113+
}
31083114
}
31093115

31103116
static void bond_ns_send_all(struct bonding *bond, struct slave *slave)
@@ -3246,8 +3252,7 @@ static int bond_na_rcv(const struct sk_buff *skb, struct bonding *bond,
32463252
curr_active_slave->last_link_up))
32473253
bond_validate_ns(bond, slave, saddr, daddr);
32483254
else if (curr_arp_slave &&
3249-
bond_time_in_interval(bond,
3250-
dev_trans_start(curr_arp_slave->dev), 1))
3255+
bond_time_in_interval(bond, slave_last_tx(curr_arp_slave), 1))
32513256
bond_validate_ns(bond, slave, saddr, daddr);
32523257

32533258
out:
@@ -3335,12 +3340,12 @@ static void bond_loadbalance_arp_mon(struct bonding *bond)
33353340
* so it can wait
33363341
*/
33373342
bond_for_each_slave_rcu(bond, slave, iter) {
3338-
unsigned long trans_start = dev_trans_start(slave->dev);
3343+
unsigned long last_tx = slave_last_tx(slave);
33393344

33403345
bond_propose_link_state(slave, BOND_LINK_NOCHANGE);
33413346

33423347
if (slave->link != BOND_LINK_UP) {
3343-
if (bond_time_in_interval(bond, trans_start, 1) &&
3348+
if (bond_time_in_interval(bond, last_tx, 1) &&
33443349
bond_time_in_interval(bond, slave->last_rx, 1)) {
33453350

33463351
bond_propose_link_state(slave, BOND_LINK_UP);
@@ -3365,7 +3370,7 @@ static void bond_loadbalance_arp_mon(struct bonding *bond)
33653370
* when the source ip is 0, so don't take the link down
33663371
* if we don't know our ip yet
33673372
*/
3368-
if (!bond_time_in_interval(bond, trans_start, bond->params.missed_max) ||
3373+
if (!bond_time_in_interval(bond, last_tx, bond->params.missed_max) ||
33693374
!bond_time_in_interval(bond, slave->last_rx, bond->params.missed_max)) {
33703375

33713376
bond_propose_link_state(slave, BOND_LINK_DOWN);
@@ -3431,7 +3436,7 @@ static void bond_loadbalance_arp_mon(struct bonding *bond)
34313436
*/
34323437
static int bond_ab_arp_inspect(struct bonding *bond)
34333438
{
3434-
unsigned long trans_start, last_rx;
3439+
unsigned long last_tx, last_rx;
34353440
struct list_head *iter;
34363441
struct slave *slave;
34373442
int commit = 0;
@@ -3482,9 +3487,9 @@ static int bond_ab_arp_inspect(struct bonding *bond)
34823487
* - (more than missed_max*delta since receive AND
34833488
* the bond has an IP address)
34843489
*/
3485-
trans_start = dev_trans_start(slave->dev);
3490+
last_tx = slave_last_tx(slave);
34863491
if (bond_is_active_slave(slave) &&
3487-
(!bond_time_in_interval(bond, trans_start, bond->params.missed_max) ||
3492+
(!bond_time_in_interval(bond, last_tx, bond->params.missed_max) ||
34883493
!bond_time_in_interval(bond, last_rx, bond->params.missed_max))) {
34893494
bond_propose_link_state(slave, BOND_LINK_DOWN);
34903495
commit++;
@@ -3501,8 +3506,8 @@ static int bond_ab_arp_inspect(struct bonding *bond)
35013506
*/
35023507
static void bond_ab_arp_commit(struct bonding *bond)
35033508
{
3504-
unsigned long trans_start;
35053509
struct list_head *iter;
3510+
unsigned long last_tx;
35063511
struct slave *slave;
35073512

35083513
bond_for_each_slave(bond, slave, iter) {
@@ -3511,10 +3516,10 @@ static void bond_ab_arp_commit(struct bonding *bond)
35113516
continue;
35123517

35133518
case BOND_LINK_UP:
3514-
trans_start = dev_trans_start(slave->dev);
3519+
last_tx = slave_last_tx(slave);
35153520
if (rtnl_dereference(bond->curr_active_slave) != slave ||
35163521
(!rtnl_dereference(bond->curr_active_slave) &&
3517-
bond_time_in_interval(bond, trans_start, 1))) {
3522+
bond_time_in_interval(bond, last_tx, 1))) {
35183523
struct slave *current_arp_slave;
35193524

35203525
current_arp_slave = rtnl_dereference(bond->current_arp_slave);
@@ -5333,8 +5338,14 @@ static struct net_device *bond_sk_get_lower_dev(struct net_device *dev,
53335338
static netdev_tx_t bond_tls_device_xmit(struct bonding *bond, struct sk_buff *skb,
53345339
struct net_device *dev)
53355340
{
5336-
if (likely(bond_get_slave_by_dev(bond, tls_get_ctx(skb->sk)->netdev)))
5337-
return bond_dev_queue_xmit(bond, skb, tls_get_ctx(skb->sk)->netdev);
5341+
struct net_device *tls_netdev = rcu_dereference(tls_get_ctx(skb->sk)->netdev);
5342+
5343+
/* tls_netdev might become NULL, even if tls_is_sk_tx_device_offloaded
5344+
* was true, if tls_device_down is running in parallel, but it's OK,
5345+
* because bond_get_slave_by_dev has a NULL check.
5346+
*/
5347+
if (likely(bond_get_slave_by_dev(bond, tls_netdev)))
5348+
return bond_dev_queue_xmit(bond, skb, tls_netdev);
53385349
return bond_tx_drop(dev, skb);
53395350
}
53405351
#endif

drivers/net/can/spi/mcp251x.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,9 +1070,6 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
10701070

10711071
mcp251x_read_2regs(spi, CANINTF, &intf, &eflag);
10721072

1073-
/* mask out flags we don't care about */
1074-
intf &= CANINTF_RX | CANINTF_TX | CANINTF_ERR;
1075-
10761073
/* receive buffer 0 */
10771074
if (intf & CANINTF_RX0IF) {
10781075
mcp251x_hw_rx(spi, 0);
@@ -1082,6 +1079,18 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
10821079
if (mcp251x_is_2510(spi))
10831080
mcp251x_write_bits(spi, CANINTF,
10841081
CANINTF_RX0IF, 0x00);
1082+
1083+
/* check if buffer 1 is already known to be full, no need to re-read */
1084+
if (!(intf & CANINTF_RX1IF)) {
1085+
u8 intf1, eflag1;
1086+
1087+
/* intf needs to be read again to avoid a race condition */
1088+
mcp251x_read_2regs(spi, CANINTF, &intf1, &eflag1);
1089+
1090+
/* combine flags from both operations for error handling */
1091+
intf |= intf1;
1092+
eflag |= eflag1;
1093+
}
10851094
}
10861095

10871096
/* receive buffer 1 */
@@ -1092,6 +1101,9 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
10921101
clear_intf |= CANINTF_RX1IF;
10931102
}
10941103

1104+
/* mask out flags we don't care about */
1105+
intf &= CANINTF_RX | CANINTF_TX | CANINTF_ERR;
1106+
10951107
/* any error or tx interrupt we need to clear? */
10961108
if (intf & (CANINTF_ERR | CANINTF_TX))
10971109
clear_intf |= intf & (CANINTF_ERR | CANINTF_TX);

drivers/net/can/usb/ems_usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ struct __packed ems_cpc_msg {
195195
__le32 ts_sec; /* timestamp in seconds */
196196
__le32 ts_nsec; /* timestamp in nano seconds */
197197

198-
union {
198+
union __packed {
199199
u8 generic[64];
200200
struct cpc_can_msg can_msg;
201201
struct cpc_can_params can_params;

drivers/net/dsa/ocelot/felix.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,9 @@ static int felix_change_tag_protocol(struct dsa_switch *ds,
610610

611611
old_proto_ops = felix->tag_proto_ops;
612612

613+
if (proto_ops == old_proto_ops)
614+
return 0;
615+
613616
err = proto_ops->setup(ds);
614617
if (err)
615618
goto setup_failed;

0 commit comments

Comments
 (0)