Skip to content

Commit 50fb587

Browse files
committed
Merge tag 'net-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from bluetooth and bpf. Current release - regressions: - net: fix skb leak in __skb_tstamp_tx() - eth: mtk_eth_soc: fix QoS on DSA MAC on non MTK_NETSYS_V2 SoCs Current release - new code bugs: - handshake: - fix sock->file allocation - fix handshake_dup() ref counting - bluetooth: - fix potential double free caused by hci_conn_unlink - fix UAF in hci_conn_hash_flush Previous releases - regressions: - core: fix stack overflow when LRO is disabled for virtual interfaces - tls: fix strparser rx issues - bpf: - fix many sockmap/TCP related issues - fix a memory leak in the LRU and LRU_PERCPU hash maps - init the offload table earlier - eth: mlx5e: - do as little as possible in napi poll when budget is 0 - fix using eswitch mapping in nic mode - fix deadlock in tc route query code Previous releases - always broken: - udplite: fix NULL pointer dereference in __sk_mem_raise_allocated() - raw: fix output xfrm lookup wrt protocol - smc: reset connection when trying to use SMCRv2 fails - phy: mscc: enable VSC8501/2 RGMII RX clock - eth: octeontx2-pf: fix TSOv6 offload - eth: cdc_ncm: deal with too low values of dwNtbOutMaxSize" * tag 'net-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (79 commits) udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated(). net: phy: mscc: enable VSC8501/2 RGMII RX clock net: phy: mscc: remove unnecessary phydev locking net: phy: mscc: add support for VSC8501 net: phy: mscc: add VSC8502 to MODULE_DEVICE_TABLE net/handshake: Enable the SNI extension to work properly net/handshake: Unpin sock->file if a handshake is cancelled net/handshake: handshake_genl_notify() shouldn't ignore @flags net/handshake: Fix uninitialized local variable net/handshake: Fix handshake_dup() ref counting net/handshake: Remove unneeded check from handshake_dup() ipv6: Fix out-of-bounds access in ipv6_find_tlv() net: ethernet: mtk_eth_soc: fix QoS on DSA MAC on non MTK_NETSYS_V2 SoCs docs: netdev: document the existence of the mail bot net: fix skb leak in __skb_tstamp_tx() r8169: Use a raw_spinlock_t for the register locks. page_pool: fix inconsistency for page_pool_ring_[un]lock() bpf, sockmap: Test progs verifier error with latest clang bpf, sockmap: Test FIONREAD returns correct bytes in rx buffer with drops bpf, sockmap: Test FIONREAD returns correct bytes in rx buffer ...
2 parents eb03e31 + ad42a35 commit 50fb587

Some content is hidden

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

88 files changed

+1488
-792
lines changed

Documentation/netlink/specs/handshake.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ attribute-sets:
6868
type: nest
6969
nested-attributes: x509
7070
multi-attr: true
71+
-
72+
name: peername
73+
type: string
7174
-
7275
name: done
7376
attributes:
@@ -105,6 +108,7 @@ operations:
105108
- auth-mode
106109
- peer-identity
107110
- certificate
111+
- peername
108112
-
109113
name: done
110114
doc: Handler reports handshake completion

Documentation/networking/tls-handshake.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ fills in a structure that contains the parameters of the request:
5353
struct socket *ta_sock;
5454
tls_done_func_t ta_done;
5555
void *ta_data;
56+
const char *ta_peername;
5657
unsigned int ta_timeout_ms;
5758
key_serial_t ta_keyring;
5859
key_serial_t ta_my_cert;
@@ -71,6 +72,10 @@ instantiated a struct file in sock->file.
7172
has completed. Further explanation of this function is in the "Handshake
7273
Completion" sesction below.
7374

75+
The consumer can provide a NUL-terminated hostname in the @ta_peername
76+
field that is sent as part of ClientHello. If no peername is provided,
77+
the DNS hostname associated with the server's IP address is used instead.
78+
7479
The consumer can fill in the @ta_timeout_ms field to force the servicing
7580
handshake agent to exit after a number of milliseconds. This enables the
7681
socket to be fully closed once both the kernel and the handshake agent

Documentation/process/maintainer-netdev.rst

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,32 @@ the value of ``Message-ID`` to the URL above.
127127
Updating patch status
128128
~~~~~~~~~~~~~~~~~~~~~
129129

130-
It may be tempting to help the maintainers and update the state of your
131-
own patches when you post a new version or spot a bug. Please **do not**
132-
do that.
133-
Interfering with the patch status on patchwork will only cause confusion. Leave
134-
it to the maintainer to figure out what is the most recent and current
135-
version that should be applied. If there is any doubt, the maintainer
136-
will reply and ask what should be done.
130+
Contributors and reviewers do not have the permissions to update patch
131+
state directly in patchwork. Patchwork doesn't expose much information
132+
about the history of the state of patches, therefore having multiple
133+
people update the state leads to confusion.
134+
135+
Instead of delegating patchwork permissions netdev uses a simple mail
136+
bot which looks for special commands/lines within the emails sent to
137+
the mailing list. For example to mark a series as Changes Requested
138+
one needs to send the following line anywhere in the email thread::
139+
140+
pw-bot: changes-requested
141+
142+
As a result the bot will set the entire series to Changes Requested.
143+
This may be useful when author discovers a bug in their own series
144+
and wants to prevent it from getting applied.
145+
146+
The use of the bot is entirely optional, if in doubt ignore its existence
147+
completely. Maintainers will classify and update the state of the patches
148+
themselves. No email should ever be sent to the list with the main purpose
149+
of communicating with the bot, the bot commands should be seen as metadata.
150+
151+
The use of the bot is restricted to authors of the patches (the ``From:``
152+
header on patch submission and command must match!), maintainers themselves
153+
and a handful of senior reviewers. Bot records its activity here:
154+
155+
https://patchwork.hopto.org/pw-bot.html
137156

138157
Review timelines
139158
~~~~~~~~~~~~~~~~

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8153,6 +8153,7 @@ F: include/linux/spi/spi-fsl-dspi.h
81538153

81548154
FREESCALE ENETC ETHERNET DRIVERS
81558155
M: Claudiu Manoil <[email protected]>
8156+
M: Vladimir Oltean <[email protected]>
81568157
81578158
S: Maintained
81588159
F: drivers/net/ethernet/freescale/enetc/

drivers/bluetooth/btnxpuart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,17 +1319,17 @@ static void nxp_serdev_remove(struct serdev_device *serdev)
13191319
hci_free_dev(hdev);
13201320
}
13211321

1322-
static struct btnxpuart_data w8987_data = {
1322+
static struct btnxpuart_data w8987_data __maybe_unused = {
13231323
.helper_fw_name = NULL,
13241324
.fw_name = FIRMWARE_W8987,
13251325
};
13261326

1327-
static struct btnxpuart_data w8997_data = {
1327+
static struct btnxpuart_data w8997_data __maybe_unused = {
13281328
.helper_fw_name = FIRMWARE_HELPER,
13291329
.fw_name = FIRMWARE_W8997,
13301330
};
13311331

1332-
static const struct of_device_id nxpuart_of_match_table[] = {
1332+
static const struct of_device_id nxpuart_of_match_table[] __maybe_unused = {
13331333
{ .compatible = "nxp,88w8987-bt", .data = &w8987_data },
13341334
{ .compatible = "nxp,88w8997-bt", .data = &w8997_data },
13351335
{ }

drivers/net/bonding/bond_main.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3947,7 +3947,11 @@ static int bond_slave_netdev_event(unsigned long event,
39473947
unblock_netpoll_tx();
39483948
break;
39493949
case NETDEV_FEAT_CHANGE:
3950-
bond_compute_features(bond);
3950+
if (!bond->notifier_ctx) {
3951+
bond->notifier_ctx = true;
3952+
bond_compute_features(bond);
3953+
bond->notifier_ctx = false;
3954+
}
39513955
break;
39523956
case NETDEV_RESEND_IGMP:
39533957
/* Propagate to master device */
@@ -6342,6 +6346,8 @@ static int bond_init(struct net_device *bond_dev)
63426346
if (!bond->wq)
63436347
return -ENOMEM;
63446348

6349+
bond->notifier_ctx = false;
6350+
63456351
spin_lock_init(&bond->stats_lock);
63466352
netdev_lockdep_set_classes(bond_dev);
63476353

drivers/net/ethernet/3com/3c589_cs.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ static int tc589_probe(struct pcmcia_device *link)
195195
{
196196
struct el3_private *lp;
197197
struct net_device *dev;
198+
int ret;
198199

199200
dev_dbg(&link->dev, "3c589_attach()\n");
200201

@@ -218,7 +219,15 @@ static int tc589_probe(struct pcmcia_device *link)
218219

219220
dev->ethtool_ops = &netdev_ethtool_ops;
220221

221-
return tc589_config(link);
222+
ret = tc589_config(link);
223+
if (ret)
224+
goto err_free_netdev;
225+
226+
return 0;
227+
228+
err_free_netdev:
229+
free_netdev(dev);
230+
return ret;
222231
}
223232

224233
static void tc589_detach(struct pcmcia_device *link)

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3834,6 +3834,11 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
38343834
index = fec_enet_get_bd_index(last_bdp, &txq->bd);
38353835
txq->tx_skbuff[index] = NULL;
38363836

3837+
/* Make sure the updates to rest of the descriptor are performed before
3838+
* transferring ownership.
3839+
*/
3840+
dma_wmb();
3841+
38373842
/* Send it on its way. Tell FEC it's ready, interrupt when done,
38383843
* it's the last BD of the frame, and to put the CRC on the end.
38393844
*/
@@ -3843,8 +3848,14 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
38433848
/* If this was the last BD in the ring, start at the beginning again. */
38443849
bdp = fec_enet_get_nextdesc(last_bdp, &txq->bd);
38453850

3851+
/* Make sure the update to bdp are performed before txq->bd.cur. */
3852+
dma_wmb();
3853+
38463854
txq->bd.cur = bdp;
38473855

3856+
/* Trigger transmission start */
3857+
writel(0, txq->bd.reg_desc_active);
3858+
38483859
return 0;
38493860
}
38503861

@@ -3873,12 +3884,6 @@ static int fec_enet_xdp_xmit(struct net_device *dev,
38733884
sent_frames++;
38743885
}
38753886

3876-
/* Make sure the update to bdp and tx_skbuff are performed. */
3877-
wmb();
3878-
3879-
/* Trigger transmission start */
3880-
writel(0, txq->bd.reg_desc_active);
3881-
38823887
__netif_tx_unlock(nq);
38833888

38843889
return sent_frames;

drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,7 @@ static void otx2_sqe_add_ext(struct otx2_nic *pfvf, struct otx2_snd_queue *sq,
652652
htons(ext->lso_sb - skb_network_offset(skb));
653653
} else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6) {
654654
ext->lso_format = pfvf->hw.lso_tsov6_idx;
655-
656-
ipv6_hdr(skb)->payload_len =
657-
htons(ext->lso_sb - skb_network_offset(skb));
655+
ipv6_hdr(skb)->payload_len = htons(tcp_hdrlen(skb));
658656
} else if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4) {
659657
__be16 l3_proto = vlan_get_protocol(skb);
660658
struct udphdr *udph = udp_hdr(skb);

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,18 +3269,14 @@ static int mtk_open(struct net_device *dev)
32693269
eth->dsa_meta[i] = md_dst;
32703270
}
32713271
} else {
3272-
/* Hardware special tag parsing needs to be disabled if at least
3273-
* one MAC does not use DSA.
3272+
/* Hardware DSA untagging and VLAN RX offloading need to be
3273+
* disabled if at least one MAC does not use DSA.
32743274
*/
32753275
u32 val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
32763276

32773277
val &= ~MTK_CDMP_STAG_EN;
32783278
mtk_w32(eth, val, MTK_CDMP_IG_CTRL);
32793279

3280-
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
3281-
val &= ~MTK_CDMQ_STAG_EN;
3282-
mtk_w32(eth, val, MTK_CDMQ_IG_CTRL);
3283-
32843280
mtk_w32(eth, 0, MTK_CDMP_EG_CTRL);
32853281
}
32863282

0 commit comments

Comments
 (0)