Skip to content

Commit 4a16df5

Browse files
committed
Merge tag 'net-5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from xfrm, bpf, netfilter, and wireless. Current release - regressions: - xfrm: fix XFRM_MSG_MAPPING ABI breakage caused by inserting a new value in the middle of an enum - unix: fix an issue in unix_shutdown causing the other end read/write failures - phy: mdio: fix memory leak Current release - new code bugs: - mlx5e: improve MQPRIO resiliency against bad configs Previous releases - regressions: - bpf: fix integer overflow leading to OOB access in map element pre-allocation - stmmac: dwmac-rk: fix ethernet on rk3399 based devices - netfilter: conntrack: fix boot failure with nf_conntrack.enable_hooks=1 - brcmfmac: revert using ISO3166 country code and 0 rev as fallback - i40e: fix freeing of uninitialized misc IRQ vector - iavf: fix double unlock of crit_lock Previous releases - always broken: - bpf, arm: fix register clobbering in div/mod implementation - netfilter: nf_tables: correct issues in netlink rule change event notifications - dsa: tag_dsa: fix mask for trunked packets - usb: r8152: don't resubmit rx immediately to avoid soft lockup on device unplug - i40e: fix endless loop under rtnl if FW fails to correctly respond to capability query - mlx5e: fix rx checksum offload coexistence with ipsec offload - mlx5: force round second at 1PPS out start time and allow it only in supported clock modes - phy: pcs: xpcs: fix incorrect CL37 AN sequence, EEE disable sequence Misc: - xfrm: slightly rejig the new policy uAPI to make it less cryptic" * tag 'net-5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (66 commits) net: prefer socket bound to interface when not in VRF iavf: fix double unlock of crit_lock i40e: Fix freeing of uninitialized misc IRQ vector i40e: fix endless loop under rtnl dt-bindings: net: dsa: marvell: fix compatible in example ionic: move filter sync_needed bit set gve: report 64bit tx_bytes counter from gve_handle_report_stats() gve: fix gve_get_stats() rtnetlink: fix if_nlmsg_stats_size() under estimation gve: Properly handle errors in gve_assign_qpl gve: Avoid freeing NULL pointer gve: Correct available tx qpl check unix: Fix an issue in unix_shutdown causing the other end read/write failures net: stmmac: trigger PCS EEE to turn off on link down net: pcs: xpcs: fix incorrect steps on disable EEE netlink: annotate data races around nlk->bound net: pcs: xpcs: fix incorrect CL37 AN sequence net: sfp: Fix typo in state machine debug string net/sched: sch_taprio: properly cancel timer from taprio_destroy() net: bridge: fix under estimation in br_get_linkxstats_size() ...
2 parents 52bf803 + 8d6c414 commit 4a16df5

File tree

73 files changed

+566
-298
lines changed

Some content is hidden

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

73 files changed

+566
-298
lines changed

CREDITS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,7 @@ D: PowerPC
971971
N: Daniel Drake
972972
973973
D: USBAT02 CompactFlash support in usb-storage
974+
D: ZD1211RW wireless driver
974975
S: UK
975976

976977
N: Oleg Drokin

Documentation/devicetree/bindings/net/dsa/marvell.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Example:
8383
#interrupt-cells = <2>;
8484

8585
switch0: switch@0 {
86-
compatible = "marvell,mv88e6390";
86+
compatible = "marvell,mv88e6190";
8787
reg = <0>;
8888
reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
8989

MAINTAINERS

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8609,9 +8609,8 @@ F: Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml
86098609
F: drivers/iio/humidity/hts221*
86108610

86118611
HUAWEI ETHERNET DRIVER
8612-
M: Bin Luo <[email protected]>
86138612
8614-
S: Supported
8613+
S: Orphan
86158614
F: Documentation/networking/device_drivers/ethernet/huawei/hinic.rst
86168615
F: drivers/net/ethernet/huawei/hinic/
86178616

@@ -17794,7 +17793,6 @@ F: drivers/staging/nvec/
1779417793

1779517794
STAGING - OLPC SECONDARY DISPLAY CONTROLLER (DCON)
1779617795
M: Jens Frederich <[email protected]>
17797-
M: Daniel Drake <[email protected]>
1779817796
M: Jon Nettleton <[email protected]>
1779917797
S: Maintained
1780017798
W: http://wiki.laptop.org/go/DCON
@@ -20700,7 +20698,6 @@ S: Maintained
2070020698
F: mm/zbud.c
2070120699

2070220700
ZD1211RW WIRELESS DRIVER
20703-
M: Daniel Drake <[email protected]>
2070420701
M: Ulrich Kunitz <[email protected]>
2070520702
2070620703
L: [email protected] (subscribers-only)

arch/arm/net/bpf_jit_32.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
* +-----+
3737
* |RSVD | JIT scratchpad
3838
* current ARM_SP => +-----+ <= (BPF_FP - STACK_SIZE + SCRATCH_SIZE)
39+
* | ... | caller-saved registers
40+
* +-----+
41+
* | ... | arguments passed on stack
42+
* ARM_SP during call => +-----|
3943
* | |
4044
* | ... | Function call stack
4145
* | |
@@ -63,13 +67,21 @@
6367
*
6468
* When popping registers off the stack at the end of a BPF function, we
6569
* reference them via the current ARM_FP register.
70+
*
71+
* Some eBPF operations are implemented via a call to a helper function.
72+
* Such calls are "invisible" in the eBPF code, so it is up to the calling
73+
* program to preserve any caller-saved ARM registers during the call. The
74+
* JIT emits code to push and pop those registers onto the stack, immediately
75+
* above the callee stack frame.
6676
*/
6777
#define CALLEE_MASK (1 << ARM_R4 | 1 << ARM_R5 | 1 << ARM_R6 | \
6878
1 << ARM_R7 | 1 << ARM_R8 | 1 << ARM_R9 | \
6979
1 << ARM_FP)
7080
#define CALLEE_PUSH_MASK (CALLEE_MASK | 1 << ARM_LR)
7181
#define CALLEE_POP_MASK (CALLEE_MASK | 1 << ARM_PC)
7282

83+
#define CALLER_MASK (1 << ARM_R0 | 1 << ARM_R1 | 1 << ARM_R2 | 1 << ARM_R3)
84+
7385
enum {
7486
/* Stack layout - these are offsets from (top of stack - 4) */
7587
BPF_R2_HI,
@@ -464,6 +476,7 @@ static inline int epilogue_offset(const struct jit_ctx *ctx)
464476

465477
static inline void emit_udivmod(u8 rd, u8 rm, u8 rn, struct jit_ctx *ctx, u8 op)
466478
{
479+
const int exclude_mask = BIT(ARM_R0) | BIT(ARM_R1);
467480
const s8 *tmp = bpf2a32[TMP_REG_1];
468481

469482
#if __LINUX_ARM_ARCH__ == 7
@@ -495,11 +508,17 @@ static inline void emit_udivmod(u8 rd, u8 rm, u8 rn, struct jit_ctx *ctx, u8 op)
495508
emit(ARM_MOV_R(ARM_R0, rm), ctx);
496509
}
497510

511+
/* Push caller-saved registers on stack */
512+
emit(ARM_PUSH(CALLER_MASK & ~exclude_mask), ctx);
513+
498514
/* Call appropriate function */
499515
emit_mov_i(ARM_IP, op == BPF_DIV ?
500516
(u32)jit_udiv32 : (u32)jit_mod32, ctx);
501517
emit_blx_r(ARM_IP, ctx);
502518

519+
/* Restore caller-saved registers from stack */
520+
emit(ARM_POP(CALLER_MASK & ~exclude_mask), ctx);
521+
503522
/* Save return value */
504523
if (rd != ARM_R0)
505524
emit(ARM_MOV_R(rd, ARM_R0), ctx);

arch/powerpc/boot/dts/fsl/t1023rdb.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154

155155
fm1mac3: ethernet@e4000 {
156156
phy-handle = <&sgmii_aqr_phy3>;
157-
phy-connection-type = "sgmii-2500";
157+
phy-connection-type = "2500base-x";
158158
sleep = <&rcpm 0x20000000>;
159159
};
160160

drivers/net/ethernet/google/gve/gve.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ struct gve_queue_page_list *gve_assign_rx_qpl(struct gve_priv *priv)
780780
gve_num_tx_qpls(priv));
781781

782782
/* we are out of rx qpls */
783-
if (id == priv->qpl_cfg.qpl_map_size)
783+
if (id == gve_num_tx_qpls(priv) + gve_num_rx_qpls(priv))
784784
return NULL;
785785

786786
set_bit(id, priv->qpl_cfg.qpl_id_map);

drivers/net/ethernet/google/gve/gve_main.c

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,33 @@ static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
4141
{
4242
struct gve_priv *priv = netdev_priv(dev);
4343
unsigned int start;
44+
u64 packets, bytes;
4445
int ring;
4546

4647
if (priv->rx) {
4748
for (ring = 0; ring < priv->rx_cfg.num_queues; ring++) {
4849
do {
4950
start =
5051
u64_stats_fetch_begin(&priv->rx[ring].statss);
51-
s->rx_packets += priv->rx[ring].rpackets;
52-
s->rx_bytes += priv->rx[ring].rbytes;
52+
packets = priv->rx[ring].rpackets;
53+
bytes = priv->rx[ring].rbytes;
5354
} while (u64_stats_fetch_retry(&priv->rx[ring].statss,
5455
start));
56+
s->rx_packets += packets;
57+
s->rx_bytes += bytes;
5558
}
5659
}
5760
if (priv->tx) {
5861
for (ring = 0; ring < priv->tx_cfg.num_queues; ring++) {
5962
do {
6063
start =
6164
u64_stats_fetch_begin(&priv->tx[ring].statss);
62-
s->tx_packets += priv->tx[ring].pkt_done;
63-
s->tx_bytes += priv->tx[ring].bytes_done;
65+
packets = priv->tx[ring].pkt_done;
66+
bytes = priv->tx[ring].bytes_done;
6467
} while (u64_stats_fetch_retry(&priv->tx[ring].statss,
6568
start));
69+
s->tx_packets += packets;
70+
s->tx_bytes += bytes;
6671
}
6772
}
6873
}
@@ -82,6 +87,9 @@ static int gve_alloc_counter_array(struct gve_priv *priv)
8287

8388
static void gve_free_counter_array(struct gve_priv *priv)
8489
{
90+
if (!priv->counter_array)
91+
return;
92+
8593
dma_free_coherent(&priv->pdev->dev,
8694
priv->num_event_counters *
8795
sizeof(*priv->counter_array),
@@ -142,6 +150,9 @@ static int gve_alloc_stats_report(struct gve_priv *priv)
142150

143151
static void gve_free_stats_report(struct gve_priv *priv)
144152
{
153+
if (!priv->stats_report)
154+
return;
155+
145156
del_timer_sync(&priv->stats_report_timer);
146157
dma_free_coherent(&priv->pdev->dev, priv->stats_report_len,
147158
priv->stats_report, priv->stats_report_bus);
@@ -370,18 +381,19 @@ static void gve_free_notify_blocks(struct gve_priv *priv)
370381
{
371382
int i;
372383

373-
if (priv->msix_vectors) {
374-
/* Free the irqs */
375-
for (i = 0; i < priv->num_ntfy_blks; i++) {
376-
struct gve_notify_block *block = &priv->ntfy_blocks[i];
377-
int msix_idx = i;
384+
if (!priv->msix_vectors)
385+
return;
378386

379-
irq_set_affinity_hint(priv->msix_vectors[msix_idx].vector,
380-
NULL);
381-
free_irq(priv->msix_vectors[msix_idx].vector, block);
382-
}
383-
free_irq(priv->msix_vectors[priv->mgmt_msix_idx].vector, priv);
387+
/* Free the irqs */
388+
for (i = 0; i < priv->num_ntfy_blks; i++) {
389+
struct gve_notify_block *block = &priv->ntfy_blocks[i];
390+
int msix_idx = i;
391+
392+
irq_set_affinity_hint(priv->msix_vectors[msix_idx].vector,
393+
NULL);
394+
free_irq(priv->msix_vectors[msix_idx].vector, block);
384395
}
396+
free_irq(priv->msix_vectors[priv->mgmt_msix_idx].vector, priv);
385397
dma_free_coherent(&priv->pdev->dev,
386398
priv->num_ntfy_blks * sizeof(*priv->ntfy_blocks),
387399
priv->ntfy_blocks, priv->ntfy_block_bus);
@@ -1185,9 +1197,10 @@ static void gve_handle_reset(struct gve_priv *priv)
11851197

11861198
void gve_handle_report_stats(struct gve_priv *priv)
11871199
{
1188-
int idx, stats_idx = 0, tx_bytes;
1189-
unsigned int start = 0;
11901200
struct stats *stats = priv->stats_report->stats;
1201+
int idx, stats_idx = 0;
1202+
unsigned int start = 0;
1203+
u64 tx_bytes;
11911204

11921205
if (!gve_get_report_stats(priv))
11931206
return;

drivers/net/ethernet/google/gve/gve_rx.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,14 @@ static int gve_prefill_rx_pages(struct gve_rx_ring *rx)
104104
if (!rx->data.page_info)
105105
return -ENOMEM;
106106

107-
if (!rx->data.raw_addressing)
107+
if (!rx->data.raw_addressing) {
108108
rx->data.qpl = gve_assign_rx_qpl(priv);
109+
if (!rx->data.qpl) {
110+
kvfree(rx->data.page_info);
111+
rx->data.page_info = NULL;
112+
return -ENOMEM;
113+
}
114+
}
109115
for (i = 0; i < slots; i++) {
110116
if (!rx->data.raw_addressing) {
111117
struct page *page = rx->data.qpl->pages[i];

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4871,7 +4871,8 @@ static void i40e_clear_interrupt_scheme(struct i40e_pf *pf)
48714871
{
48724872
int i;
48734873

4874-
i40e_free_misc_vector(pf);
4874+
if (test_bit(__I40E_MISC_IRQ_REQUESTED, pf->state))
4875+
i40e_free_misc_vector(pf);
48754876

48764877
i40e_put_lump(pf->irq_pile, pf->iwarp_base_vector,
48774878
I40E_IWARP_IRQ_PILE_ID);
@@ -10113,7 +10114,7 @@ static int i40e_get_capabilities(struct i40e_pf *pf,
1011310114
if (pf->hw.aq.asq_last_status == I40E_AQ_RC_ENOMEM) {
1011410115
/* retry with a larger buffer */
1011510116
buf_len = data_size;
10116-
} else if (pf->hw.aq.asq_last_status != I40E_AQ_RC_OK) {
10117+
} else if (pf->hw.aq.asq_last_status != I40E_AQ_RC_OK || err) {
1011710118
dev_info(&pf->pdev->dev,
1011810119
"capability discovery failed, err %s aq_err %s\n",
1011910120
i40e_stat_str(&pf->hw, err),

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1965,7 +1965,6 @@ static void iavf_watchdog_task(struct work_struct *work)
19651965
}
19661966
adapter->aq_required = 0;
19671967
adapter->current_op = VIRTCHNL_OP_UNKNOWN;
1968-
mutex_unlock(&adapter->crit_lock);
19691968
queue_delayed_work(iavf_wq,
19701969
&adapter->watchdog_task,
19711970
msecs_to_jiffies(10));

0 commit comments

Comments
 (0)