The following commit has been merged in the master branch:
commit 8f21b6b1752b7106591b482669f0eebf5719d27e
Merge: ef781f8e482f9a0f826615d76d20931d8db3521c
cebba694d26d29467615c641a8fefd5b2cd4a1aa
Author: Stephen Rothwell <[email protected]>
Date: Wed Oct 29 10:22:23 2025 +1100
Merge branch 'main' of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
diff --combined Documentation/devicetree/bindings/vendor-prefixes.yaml
index 003cc91fb02f8,424aa7b911a77..fa303ee1fe1fa
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@@ -20,7 -20,7 +20,7 @@@ patternProperties
"^(keypad|m25p|max8952|max8997|max8998|mpmc),.*": true
"^(pciclass|pinctrl-single|#pinctrl-single|PowerPC),.*": true
"^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*": true
- "^(simple-audio-card|st-plgpio|st-spics|ts),.*": true
+ "^(simple-audio-card|st-plgpio|st-spics|ts|vsc8531),.*": true
"^pool[0-3],.*": true
# Keep list in alphabetical order.
@@@ -907,8 -907,6 +907,8 @@@
description: Lincoln Technology Solutions
"^lineartechnology,.*":
description: Linear Technology
+ "^linkease,.*":
+ description: Shenzhen LinkEase Network Technology Co., Ltd.
"^linksprite,.*":
description: LinkSprite Technologies, Inc.
"^linksys,.*":
diff --combined MAINTAINERS
index 8464cedfe24de,d652f4f27756e..ae595737e2be9
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@@ -1997,10 -1997,6 +1997,10 @@@ F: include/uapi/linux/if_arcnet.
ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)
M: Arnd Bergmann <[email protected]>
+M: Krzysztof Kozlowski <[email protected]>
+M: Alexandre Belloni <[email protected]>
+M: Linus Walleij <[email protected]>
+R: Drew Fustini <[email protected]>
L: [email protected] (moderated for non-subscribers)
L: [email protected]
S: Maintained
@@@ -3300,6 -3296,7 +3300,7 @@@ F: drivers/*/*/*rockchip
F: drivers/*/*rockchip*
F: drivers/clk/rockchip/
F: drivers/i2c/busses/i2c-rk3x.c
+ F: drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
F: sound/soc/rockchip/
N: rockchip
@@@ -3441,6 -3438,7 +3442,6 @@@ F: drivers/clocksource/clksrc_st_lpc.
F: drivers/cpufreq/sti-cpufreq.c
F: drivers/dma/st_fdma*
F: drivers/i2c/busses/i2c-st.c
-F: drivers/media/platform/st/sti/c8sectpfe/
F: drivers/media/rc/st_rc.c
F: drivers/mmc/host/sdhci-st.c
F: drivers/phy/st/phy-miphy28lp.c
@@@ -5128,7 -5126,6 +5129,6 @@@ F: Documentation/devicetree/bindings/ne
F: drivers/net/ethernet/broadcom/genet/
F: drivers/net/ethernet/broadcom/unimac.h
F: drivers/net/mdio/mdio-bcm-unimac.c
- F: include/linux/platform_data/bcmgenet.h
F: include/linux/platform_data/mdio-bcm-unimac.h
BROADCOM IPROC ARM ARCHITECTURE
@@@ -7416,6 -7413,7 +7416,6 @@@ S: Maintaine
P: Documentation/doc-guide/maintainer-profile.rst
T: git git://git.lwn.net/linux.git docs-next
F: Documentation/
-F: scripts/check-variable-fonts.sh
F: scripts/checktransupdate.py
F: scripts/documentation-file-ref-check
F: scripts/get_abi.py
@@@ -7424,6 -7422,7 +7424,6 @@@ F: scripts/lib/abi/
F: scripts/lib/kdoc/*
F: tools/docs/*
F: tools/net/ynl/pyynl/lib/doc_generator.py
-F: scripts/sphinx-pre-install
X: Documentation/ABI/
X: Documentation/admin-guide/media/
X: Documentation/devicetree/
@@@ -7458,7 -7457,7 +7458,7 @@@ L: [email protected]
S: Maintained
F: Documentation/sphinx/parse-headers.pl
F: scripts/documentation-file-ref-check
-F: scripts/sphinx-pre-install
+F: tools/docs/sphinx-pre-install
DOCUMENTATION/ITALIAN
M: Federico Vaga <[email protected]>
@@@ -9183,9 -9182,6 +9183,9 @@@ S: Maintaine
F: kernel/power/energy_model.c
F: include/linux/energy_model.h
F: Documentation/power/energy-model.rst
+F: Documentation/netlink/specs/em.yaml
+F: include/uapi/linux/energy_model.h
+F: kernel/power/em_netlink*.*
EPAPR HYPERVISOR BYTE CHANNEL DEVICE DRIVER
M: Laurentiu Tudor <[email protected]>
@@@ -10533,7 -10529,7 +10533,7 @@@ L: [email protected]
S: Supported
B:
https://bugzilla.kernel.org/enter_bug.cgi?product=File%20System&component=gfs2
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
-F: Documentation/filesystems/gfs2*
+F: Documentation/filesystems/gfs2/
F: fs/gfs2/
F: include/uapi/linux/gfs2_ondisk.h
@@@ -10606,9 -10602,8 +10606,9 @@@ F: Documentation/devicetree/bindings/cl
F:
Documentation/devicetree/bindings/soc/google/google,gs101-pmu-intr-gen.yaml
F: arch/arm64/boot/dts/exynos/google/
F: drivers/clk/samsung/clk-gs101.c
+F: drivers/soc/samsung/gs101-pmu.c
F: drivers/phy/samsung/phy-gs101-ufs.c
-F: include/dt-bindings/clock/google,gs101.h
+F: include/dt-bindings/clock/google,gs101*
K: [gG]oogle.?[tT]ensor
GPD FAN DRIVER
@@@ -11581,7 -11576,7 +11581,7 @@@ T: git git://linuxtv.org/media.gi
F: drivers/media/i2c/hi556.c
HYNIX HI846 SENSOR DRIVER
-M: Martin Kepplinger <[email protected]>
+M: Martin Kepplinger-Novakovic <[email protected]>
L: [email protected]
S: Maintained
F: drivers/media/i2c/hi846.c
@@@ -13117,15 -13112,6 +13117,15 @@@ F: include/uapi/linux/io_uring.
F: include/uapi/linux/io_uring/
F: io_uring/
+IO_URING ZCRX
+M: Pavel Begunkov <[email protected]>
+L: [email protected]
+L: [email protected]
+T: git https://github.com/isilence/linux.git zcrx/for-next
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git
+S: Maintained
+F: io_uring/zcrx.*
+
IPMI SUBSYSTEM
M: Corey Minyard <[email protected]>
L: [email protected] (moderated for non-subscribers)
@@@ -13261,8 -13247,10 +13261,8 @@@ T: git git://git.kernel.org/pub/scm/lin
F: drivers/infiniband/ulp/isert
ISDN/CMTP OVER BLUETOOTH
-M: Karsten Keil <[email protected]>
-L: [email protected] (subscribers-only)
L: [email protected]
-S: Odd Fixes
+S: Orphan
W: http://www.isdn4linux.de
F: Documentation/isdn/
F: drivers/isdn/capi/
@@@ -13271,8 -13259,10 +13271,8 @@@ F: include/uapi/linux/isdn
F: net/bluetooth/cmtp/
ISDN/mISDN SUBSYSTEM
-M: Karsten Keil <[email protected]>
-L: [email protected] (subscribers-only)
L: [email protected]
-S: Maintained
+S: Orphan
W: http://www.isdn4linux.de
F: drivers/isdn/Kconfig
F: drivers/isdn/Makefile
@@@ -13426,12 -13416,9 +13426,12 @@@ F: mm/kasan
F: scripts/Makefile.kasan
KCONFIG
+M: Nathan Chancellor <[email protected]>
+M: Nicolas Schier <[email protected]>
L: [email protected]
-S: Orphan
+S: Odd Fixes
Q: https://patchwork.kernel.org/project/linux-kbuild/list/
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git
F: Documentation/kbuild/kconfig*
F: scripts/Kconfig.include
F: scripts/kconfig/
@@@ -13497,7 -13484,7 +13497,7 @@@ F: fs/autofs
KERNEL BUILD + files below scripts/ (unless maintained elsewhere)
M: Nathan Chancellor <[email protected]>
-M: Nicolas Schier <[email protected]>
+M: Nicolas Schier <[email protected]>
L: [email protected]
S: Odd Fixes
Q: https://patchwork.kernel.org/project/linux-kbuild/list/
@@@ -14408,7 -14395,6 +14408,7 @@@ F: tools/memory-model
LINUX-NEXT TREE
M: Stephen Rothwell <[email protected]>
+M: Mark Brown <[email protected]>
L: [email protected]
S: Supported
B: mailto:[email protected] and the appropriate development tree
@@@ -15181,15 -15167,6 +15181,15 @@@ S: Maintaine
F: Documentation/hwmon/max15301.rst
F: drivers/hwmon/pmbus/max15301.c
+MAX17616 HARDWARE MONITOR DRIVER
+M: Kim Seer Paller <[email protected]>
+L: [email protected]
+S: Supported
+W: https://ez.analog.com/linux-software-drivers
+F: Documentation/devicetree/bindings/hwmon/pmbus/adi,max17616.yaml
+F: Documentation/hwmon/max17616.rst
+F: drivers/hwmon/pmbus/max17616.c
+
MAX2175 SDR TUNER DRIVER
M: Ramesh Shanmugasundaram <[email protected]>
L: [email protected]
@@@ -15560,7 -15537,7 +15560,7 @@@ F: include/media/imx.
MEDIA DRIVERS FOR FREESCALE IMX7/8
M: Rui Miguel Silva <[email protected]>
M: Laurent Pinchart <[email protected]>
-M: Martin Kepplinger <[email protected]>
+M: Martin Kepplinger-Novakovic <[email protected]>
R: Purism Kernel Team <[email protected]>
L: [email protected]
S: Maintained
@@@ -16211,7 -16188,7 +16211,7 @@@ MEMORY CONTROLLER DRIVER
M: Krzysztof Kozlowski <[email protected]>
L: [email protected]
S: Maintained
-B: mailto:[email protected]
+B: mailto:[email protected]
T: git
git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git
F: Documentation/devicetree/bindings/memory-controllers/
F: drivers/memory/
@@@ -16273,7 -16250,6 +16273,7 @@@ F: include/linux/mmzone.
F: include/linux/mmdebug.h
F: include/linux/mmu_notifier.h
F: include/linux/pagewalk.h
+F: include/linux/pgalloc.h
F: include/linux/pgtable.h
F: include/linux/ptdump.h
F: include/linux/vmpressure.h
@@@ -17461,6 -17437,14 +17461,14 @@@ S: Maintaine
F: Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml
F: drivers/net/phy/motorcomm.c
+ MOTORCOMM YT921X ETHERNET SWITCH DRIVER
+ M: David Yang <[email protected]>
+ L: [email protected]
+ S: Maintained
+ F: Documentation/devicetree/bindings/net/dsa/motorcomm,yt921x.yaml
+ F: drivers/net/dsa/yt921x.*
+ F: net/dsa/tag_yt921x.c
+
MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD
M: Jiri Slaby <[email protected]>
S: Maintained
@@@ -17488,13 -17472,6 +17496,13 @@@ S: Maintaine
F: Documentation/hwmon/mp2891.rst
F: drivers/hwmon/pmbus/mp2891.c
+MPS MP2925 DRIVER
+M: Noah Wang <[email protected]>
+L: [email protected]
+S: Maintained
+F: Documentation/hwmon/mp2925.rst
+F: drivers/hwmon/pmbus/mp2925.c
+
MPS MP29502 DRIVER
M: Wensheng Wang <[email protected]>
L: [email protected]
@@@ -17516,13 -17493,6 +17524,13 @@@ S: Maintaine
F: Documentation/hwmon/mp9941.rst
F: drivers/hwmon/pmbus/mp9941.c
+MPS MP9945 DRIVER
+M: Cosmo Chou <[email protected]>
+L: [email protected]
+S: Maintained
+F: Documentation/hwmon/mp9945.rst
+F: drivers/hwmon/pmbus/mp9945.c
+
MR800 AVERMEDIA USB FM RADIO DRIVER
M: Alexey Klimov <[email protected]>
L: [email protected]
@@@ -21198,7 -21168,7 +21206,7 @@@ F: Documentation/devicetree/bindings/i2
F: drivers/i2c/busses/i2c-qcom-cci.c
QUALCOMM INTERCONNECT BWMON DRIVER
-M: Krzysztof Kozlowski <[email protected]>
+M: Krzysztof Kozlowski <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
@@@ -21356,7 -21326,6 +21364,7 @@@ F: drivers/media/platform/qcom/venus
QUALCOMM WCN36XX WIRELESS DRIVER
M: Loic Poulain <[email protected]>
L: [email protected]
+L: [email protected]
S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
F: drivers/net/wireless/ath/wcn36xx/
@@@ -22812,7 -22781,6 +22820,7 @@@ L: [email protected]
L: [email protected]
S: Supported
F: Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
+F: drivers/clk/samsung/clk-acpm.c
F: drivers/firmware/samsung/exynos-acpm*
F: include/linux/firmware/samsung/exynos-acpm-protocol.h
@@@ -24946,7 -24914,7 +24954,7 @@@ F: drivers/net/pcs/pcs-xpcs.
F: include/linux/pcs/pcs-xpcs.h
SYNOPSYS DESIGNWARE HDMI RX CONTROLLER DRIVER
-M: Shreeya Patel <[email protected]>
+M: Dmitry Osipenko <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
diff --combined drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 782bb48c9f3d7,81d3bdc098e63..cf8abbe018402
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@@ -9429,7 -9429,8 +9429,7 @@@ static int hclge_mii_ioctl(struct hclge
/* this command reads phy id and register at the same time */
fallthrough;
case SIOCGMIIREG:
- data->val_out = hclge_read_phy_reg(hdev, data->reg_num);
- return 0;
+ return hclge_read_phy_reg(hdev, data->reg_num, &data->val_out);
case SIOCSMIIREG:
return hclge_write_phy_reg(hdev, data->reg_num, data->val_in);
@@@ -9444,15 -9445,8 +9444,8 @@@ static int hclge_do_ioctl(struct hnae3_
struct hclge_vport *vport = hclge_get_vport(handle);
struct hclge_dev *hdev = vport->back;
- switch (cmd) {
- case SIOCGHWTSTAMP:
- return hclge_ptp_get_cfg(hdev, ifr);
- case SIOCSHWTSTAMP:
- return hclge_ptp_set_cfg(hdev, ifr);
- default:
- if (!hdev->hw.mac.phydev)
- return hclge_mii_ioctl(hdev, ifr, cmd);
- }
+ if (!hdev->hw.mac.phydev)
+ return hclge_mii_ioctl(hdev, ifr, cmd);
return phy_mii_ioctl(hdev->hw.mac.phydev, ifr, cmd);
}
@@@ -12900,6 -12894,8 +12893,8 @@@ static const struct hnae3_ae_ops hclge_
.get_dscp_prio = hclge_get_dscp_prio,
.get_wol = hclge_get_wol,
.set_wol = hclge_set_wol,
+ .hwtstamp_get = hclge_ptp_get_cfg,
+ .hwtstamp_set = hclge_ptp_set_cfg,
};
static struct hnae3_ae_algo ae_algo = {
diff --combined drivers/net/usb/usbnet.c
index 697cd9d866d3d,62a85dbad31a5..f3087fb62f4f8
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@@ -189,7 -189,7 +189,7 @@@ static bool usbnet_needs_usb_name_forma
is_local_ether_addr(net->dev_addr));
}
- static void intr_complete (struct urb *urb)
+ static void intr_complete(struct urb *urb)
{
struct usbnet *dev = urb->context;
int status = urb->status;
@@@ -221,7 -221,7 +221,7 @@@
"intr resubmit --> %d\n", status);
}
- static int init_status (struct usbnet *dev, struct usb_interface *intf)
+ static int init_status(struct usbnet *dev, struct usb_interface *intf)
{
char *buf = NULL;
unsigned pipe = 0;
@@@ -326,7 -326,7 +326,7 @@@ static void __usbnet_status_stop_force(
* Some link protocols batch packets, so their rx_fixup paths
* can return clones as well as just modify the original skb.
*/
- void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
+ void usbnet_skb_return(struct usbnet *dev, struct sk_buff *skb)
{
struct pcpu_sw_netstats *stats64 = this_cpu_ptr(dev->net->tstats);
unsigned long flags;
@@@ -396,7 -396,7 +396,7 @@@ EXPORT_SYMBOL_GPL(usbnet_update_max_qle
*
*-------------------------------------------------------------------------*/
- int usbnet_change_mtu (struct net_device *net, int new_mtu)
+ int usbnet_change_mtu(struct net_device *net, int new_mtu)
{
struct usbnet *dev = netdev_priv(net);
int ll_mtu = new_mtu + net->hard_header_len;
@@@ -472,7 -472,7 +472,7 @@@ static enum skb_state defer_bh(struct u
* NOTE: annoying asymmetry: if it's active, schedule_work() fails,
* but tasklet_schedule() doesn't. hope the failure is rare.
*/
- void usbnet_defer_kevent (struct usbnet *dev, int work)
+ void usbnet_defer_kevent(struct usbnet *dev, int work)
{
set_bit (work, &dev->flags);
if (!usbnet_going_away(dev)) {
@@@ -489,9 -489,9 +489,9 @@@ EXPORT_SYMBOL_GPL(usbnet_defer_kevent)
/*-------------------------------------------------------------------------*/
- static void rx_complete (struct urb *urb);
+ static void rx_complete(struct urb *urb);
- static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
+ static int rx_submit(struct usbnet *dev, struct urb *urb, gfp_t flags)
{
struct sk_buff *skb;
struct skb_data *entry;
@@@ -597,7 -597,7 +597,7 @@@ static inline int rx_process(struct usb
/*-------------------------------------------------------------------------*/
- static void rx_complete (struct urb *urb)
+ static void rx_complete(struct urb *urb)
{
struct sk_buff *skb = (struct sk_buff *) urb->context;
struct skb_data *entry = (struct skb_data *) skb->cb;
@@@ -728,7 -728,7 +728,7 @@@ EXPORT_SYMBOL_GPL(usbnet_purge_paused_r
// unlink pending rx/tx; completion handlers do all other cleanup
- static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
+ static int unlink_urbs(struct usbnet *dev, struct sk_buff_head *q)
{
unsigned long flags;
struct sk_buff *skb;
@@@ -823,7 -823,7 +823,7 @@@ static void usbnet_terminate_urbs(struc
remove_wait_queue(&dev->wait, &wait);
}
- int usbnet_stop (struct net_device *net)
+ int usbnet_stop(struct net_device *net)
{
struct usbnet *dev = netdev_priv(net);
const struct driver_info *info = dev->driver_info;
@@@ -892,7 -892,7 +892,7 @@@ EXPORT_SYMBOL_GPL(usbnet_stop)
// precondition: never called in_interrupt
- int usbnet_open (struct net_device *net)
+ int usbnet_open(struct net_device *net)
{
struct usbnet *dev = netdev_priv(net);
int retval;
@@@ -1048,7 -1048,7 +1048,7 @@@ int usbnet_set_link_ksettings_mii(struc
}
EXPORT_SYMBOL_GPL(usbnet_set_link_ksettings_mii);
- u32 usbnet_get_link (struct net_device *net)
+ u32 usbnet_get_link(struct net_device *net)
{
struct usbnet *dev = netdev_priv(net);
@@@ -1076,7 -1076,7 +1076,7 @@@ int usbnet_nway_reset(struct net_devic
}
EXPORT_SYMBOL_GPL(usbnet_nway_reset);
- void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
+ void usbnet_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info)
{
struct usbnet *dev = netdev_priv(net);
@@@ -1087,7 -1087,7 +1087,7 @@@
}
EXPORT_SYMBOL_GPL(usbnet_get_drvinfo);
- u32 usbnet_get_msglevel (struct net_device *net)
+ u32 usbnet_get_msglevel(struct net_device *net)
{
struct usbnet *dev = netdev_priv(net);
@@@ -1095,7 -1095,7 +1095,7 @@@
}
EXPORT_SYMBOL_GPL(usbnet_get_msglevel);
- void usbnet_set_msglevel (struct net_device *net, u32 level)
+ void usbnet_set_msglevel(struct net_device *net, u32 level)
{
struct usbnet *dev = netdev_priv(net);
@@@ -1166,7 -1166,7 +1166,7 @@@ static void __handle_set_rx_mode(struc
* especially now that control transfers can be queued.
*/
static void
- usbnet_deferred_kevent (struct work_struct *work)
+ usbnet_deferred_kevent(struct work_struct *work)
{
struct usbnet *dev =
container_of(work, struct usbnet, kevent);
@@@ -1277,7 -1277,7 +1277,7 @@@ skip_reset
/*-------------------------------------------------------------------------*/
- static void tx_complete (struct urb *urb)
+ static void tx_complete(struct urb *urb)
{
struct sk_buff *skb = (struct sk_buff *) urb->context;
struct skb_data *entry = (struct skb_data *) skb->cb;
@@@ -1332,7 -1332,7 +1332,7 @@@
/*-------------------------------------------------------------------------*/
- void usbnet_tx_timeout (struct net_device *net, unsigned int txqueue)
+ void usbnet_tx_timeout(struct net_device *net, unsigned int txqueue)
{
struct usbnet *dev = netdev_priv(net);
@@@ -1382,8 -1382,7 +1382,7 @@@ static int build_dma_sg(const struct sk
return 1;
}
- netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
- struct net_device *net)
+ netdev_tx_t usbnet_start_xmit(struct sk_buff *skb, struct net_device *net)
{
struct usbnet *dev = netdev_priv(net);
unsigned int length;
@@@ -1561,7 -1560,7 +1560,7 @@@ static inline void usb_free_skb(struct
// work (work deferred from completions, in_irq) or timer
- static void usbnet_bh (struct timer_list *t)
+ static void usbnet_bh(struct timer_list *t)
{
struct usbnet *dev = timer_container_of(dev, t, delay);
struct sk_buff *skb;
@@@ -1636,7 -1635,7 +1635,7 @@@ static void usbnet_bh_work(struct work_
// precondition: never called in_interrupt
- void usbnet_disconnect (struct usb_interface *intf)
+ void usbnet_disconnect(struct usb_interface *intf)
{
struct usbnet *dev;
struct usb_device *xdev;
@@@ -1659,8 -1658,6 +1658,8 @@@
net = dev->net;
unregister_netdev (net);
+ cancel_work_sync(&dev->kevent);
+
while ((urb = usb_get_from_anchor(&dev->deferred))) {
dev_kfree_skb(urb->context);
kfree(urb->sg);
@@@ -1702,7 -1699,7 +1701,7 @@@ static const struct device_type wwan_ty
};
int
- usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
+ usbnet_probe(struct usb_interface *udev, const struct usb_device_id *prod)
{
struct usbnet *dev;
struct net_device *net;
@@@ -1909,7 -1906,7 +1908,7 @@@ EXPORT_SYMBOL_GPL(usbnet_probe)
* resume only when the last interface is resumed
*/
- int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
+ int usbnet_suspend(struct usb_interface *intf, pm_message_t message)
{
struct usbnet *dev = usb_get_intfdata(intf);
@@@ -1942,7 -1939,7 +1941,7 @@@
}
EXPORT_SYMBOL_GPL(usbnet_suspend);
- int usbnet_resume (struct usb_interface *intf)
+ int usbnet_resume(struct usb_interface *intf)
{
struct usbnet *dev = usb_get_intfdata(intf);
struct sk_buff *skb;
diff --combined include/net/sock.h
index ff7d49af16193,c7e58b8e8a907..384a97248dc93
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@@ -118,6 -118,7 +118,7 @@@ typedef __u64 __bitwise __addrpair
* @skc_reuseport: %SO_REUSEPORT setting
* @skc_ipv6only: socket is IPV6 only
* @skc_net_refcnt: socket is using net ref counting
+ * @skc_bypass_prot_mem: bypass the per-protocol memory accounting for skb
* @skc_bound_dev_if: bound device index if != 0
* @skc_bind_node: bind hash linkage for various protocol lookup tables
* @skc_portaddr_node: second hash linkage for UDP/UDP-Lite protocol
@@@ -174,6 -175,7 +175,7 @@@ struct sock_common
unsigned char skc_reuseport:1;
unsigned char skc_ipv6only:1;
unsigned char skc_net_refcnt:1;
+ unsigned char skc_bypass_prot_mem:1;
int skc_bound_dev_if;
union {
struct hlist_node skc_bind_node;
@@@ -313,6 -315,7 +315,7 @@@ struct sk_filter
* @sk_bind_phc: SO_TIMESTAMPING bind PHC index of PTP virtual clock
* for timestamping
* @sk_tskey: counter to disambiguate concurrent tstamp requests
+ * @sk_tx_queue_mapping_jiffies: time in jiffies of last
@sk_tx_queue_mapping refresh.
* @sk_zckey: counter to order MSG_ZEROCOPY notifications
* @sk_socket: Identd and reporting IO signals
* @sk_user_data: RPC layer private data. Write-protected by
@sk_callback_lock.
@@@ -380,6 -383,7 +383,7 @@@ struct sock
#define sk_reuseport __sk_common.skc_reuseport
#define sk_ipv6only __sk_common.skc_ipv6only
#define sk_net_refcnt __sk_common.skc_net_refcnt
+ #define sk_bypass_prot_mem __sk_common.skc_bypass_prot_mem
#define sk_bound_dev_if __sk_common.skc_bound_dev_if
#define sk_bind_node __sk_common.skc_bind_node
#define sk_prot __sk_common.skc_prot
@@@ -485,6 -489,7 +489,7 @@@
unsigned long sk_pacing_rate; /* bytes per second */
atomic_t sk_zckey;
atomic_t sk_tskey;
+ unsigned long sk_tx_queue_mapping_jiffies;
__cacheline_group_end(sock_write_tx);
__cacheline_group_begin(sock_read_tx);
@@@ -828,11 -833,9 +833,9 @@@ static inline bool sk_del_node_init(str
{
bool rc = __sk_del_node_init(sk);
- if (rc) {
- /* paranoid for a while -acme */
- WARN_ON(refcount_read(&sk->sk_refcnt) == 1);
+ if (rc)
__sock_put(sk);
- }
+
return rc;
}
#define sk_del_node_init_rcu(sk) sk_del_node_init(sk)
@@@ -850,14 -853,25 +853,25 @@@ static inline bool sk_nulls_del_node_in
{
bool rc = __sk_nulls_del_node_init_rcu(sk);
- if (rc) {
- /* paranoid for a while -acme */
- WARN_ON(refcount_read(&sk->sk_refcnt) == 1);
+ if (rc)
__sock_put(sk);
- }
+
return rc;
}
+ static inline bool sk_nulls_replace_node_init_rcu(struct sock *old,
+ struct sock *new)
+ {
+ if (sk_hashed(old)) {
+ hlist_nulls_replace_init_rcu(&old->sk_nulls_node,
+ &new->sk_nulls_node);
+ __sock_put(old);
+ return true;
+ }
+
+ return false;
+ }
+
static inline void __sk_add_node(struct sock *sk, struct hlist_head *list)
{
hlist_add_head(&sk->sk_node, list);
@@@ -1808,7 -1822,12 +1822,12 @@@ struct sock *sk_alloc(struct net *net,
void sk_free(struct sock *sk);
void sk_net_refcnt_upgrade(struct sock *sk);
void sk_destruct(struct sock *sk);
- struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority);
+ struct sock *sk_clone(const struct sock *sk, const gfp_t priority, bool lock);
+
+ static inline struct sock *sk_clone_lock(const struct sock *sk, const gfp_t
priority)
+ {
+ return sk_clone(sk, priority, true);
+ }
struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,
gfp_t priority);
@@@ -1992,7 -2011,15 +2011,15 @@@ static inline void sk_tx_queue_set(stru
/* 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);
+ if (READ_ONCE(sk->sk_tx_queue_mapping) != tx_queue) {
+ WRITE_ONCE(sk->sk_tx_queue_mapping, tx_queue);
+ WRITE_ONCE(sk->sk_tx_queue_mapping_jiffies, jiffies);
+ return;
+ }
+
+ /* Refresh sk_tx_queue_mapping_jiffies if too old. */
+ if (time_is_before_jiffies(READ_ONCE(sk->sk_tx_queue_mapping_jiffies) +
HZ))
+ WRITE_ONCE(sk->sk_tx_queue_mapping_jiffies, jiffies);
}
#define NO_QUEUE_MAPPING USHRT_MAX
@@@ -2005,19 -2032,7 +2032,7 @@@ static inline void sk_tx_queue_clear(st
WRITE_ONCE(sk->sk_tx_queue_mapping, NO_QUEUE_MAPPING);
}
- static inline int sk_tx_queue_get(const struct sock *sk)
- {
- 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;
- }
+ int sk_tx_queue_get(const struct sock *sk);
static inline void __sk_rx_queue_set(struct sock *sk,
const struct sk_buff *skb,
@@@ -2303,6 -2318,7 +2318,7 @@@ static inline int skb_copy_to_page_noca
return 0;
}
+ #define SK_WMEM_ALLOC_BIAS 1
/**
* sk_wmem_alloc_get - returns write allocations
* @sk: socket
@@@ -2311,7 -2327,7 +2327,7 @@@
*/
static inline int sk_wmem_alloc_get(const struct sock *sk)
{
- return refcount_read(&sk->sk_wmem_alloc) - 1;
+ return refcount_read(&sk->sk_wmem_alloc) - SK_WMEM_ALLOC_BIAS;
}
/**
@@@ -2596,12 -2612,16 +2612,16 @@@ static inline struct page_frag *sk_page
bool sk_page_frag_refill(struct sock *sk, struct page_frag *pfrag);
+ static inline bool __sock_writeable(const struct sock *sk, int wmem_alloc)
+ {
+ return wmem_alloc < (READ_ONCE(sk->sk_sndbuf) >> 1);
+ }
/*
* Default write policy as shown to user space via poll/select/SIGIO
*/
static inline bool sock_writeable(const struct sock *sk)
{
- return refcount_read(&sk->sk_wmem_alloc) < (READ_ONCE(sk->sk_sndbuf) >>
1);
+ return __sock_writeable(sk, refcount_read(&sk->sk_wmem_alloc));
}
static inline gfp_t gfp_any(void)
@@@ -2635,12 -2655,8 +2655,12 @@@ static inline bool mem_cgroup_sk_under_
#endif /* CONFIG_MEMCG_V1 */
do {
- if (time_before64(get_jiffies_64(),
mem_cgroup_get_socket_pressure(memcg)))
+ if (time_before64(get_jiffies_64(),
+ mem_cgroup_get_socket_pressure(memcg))) {
+ memcg_memory_event(mem_cgroup_from_sk(sk),
+ MEMCG_SOCK_THROTTLED);
return true;
+ }
} while ((memcg = parent_mem_cgroup(memcg)));
return false;
diff --combined tools/testing/selftests/net/netlink-dumps.c
index faa4455815f8c,679b6c77ace7c..51129c564d0a6
--- a/tools/testing/selftests/net/netlink-dumps.c
+++ b/tools/testing/selftests/net/netlink-dumps.c
@@@ -18,7 -18,7 +18,7 @@@
#include <linux/mqueue.h>
#include <linux/rtnetlink.h>
-#include "../kselftest_harness.h"
+#include "kselftest_harness.h"
#include <ynl.h>
@@@ -143,6 -143,7 +143,7 @@@ TEST(dump_extack
EXPECT_EQ(n, -1);
EXPECT_EQ(errno, ENOBUFS);
+ ret = NO_CTRL;
for (i = 0; i < cnt; i++) {
struct ext_ack ea = {};
diff --combined tools/testing/selftests/net/tls.c
index 2b6590c0e13c1,da1b50b307194..a3ef4b57eb5f8
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@@ -21,7 -21,7 +21,7 @@@
#include <sys/socket.h>
#include <sys/stat.h>
-#include "../kselftest_harness.h"
+#include "kselftest_harness.h"
#define TLS_PAYLOAD_MAX_LEN 16384
#define SOL_TLS 282
@@@ -2856,6 -2856,147 +2856,147 @@@ TEST_F(tls_err, oob_pressure
EXPECT_EQ(send(self->fd2, buf, 5, MSG_OOB), 5);
}
+ /*
+ * Parse a stream of TLS records and ensure that each record respects
+ * the specified @max_payload_len.
+ */
+ static size_t parse_tls_records(struct __test_metadata *_metadata,
+ const __u8 *rx_buf, int rx_len, int overhead,
+ __u16 max_payload_len)
+ {
+ const __u8 *rec = rx_buf;
+ size_t total_plaintext_rx = 0;
+ const __u8 rec_header_len = 5;
+
+ while (rec < rx_buf + rx_len) {
+ __u16 record_payload_len;
+ __u16 plaintext_len;
+
+ /* Sanity check that it's a TLS header for application data */
+ ASSERT_EQ(rec[0], 23);
+ ASSERT_EQ(rec[1], 0x3);
+ ASSERT_EQ(rec[2], 0x3);
+
+ memcpy(&record_payload_len, rec + 3, 2);
+ record_payload_len = ntohs(record_payload_len);
+ ASSERT_GE(record_payload_len, overhead);
+
+ plaintext_len = record_payload_len - overhead;
+ total_plaintext_rx += plaintext_len;
+
+ /* Plaintext must not exceed the specified limit */
+ ASSERT_LE(plaintext_len, max_payload_len);
+ rec += rec_header_len + record_payload_len;
+ }
+
+ return total_plaintext_rx;
+ }
+
+ TEST(tls_12_tx_max_payload_len)
+ {
+ struct tls_crypto_info_keys tls12;
+ int cfd, ret, fd, overhead;
+ size_t total_plaintext_rx = 0;
+ __u8 tx[1024], rx[2000];
+ __u16 limit = 128;
+ __u16 opt = 0;
+ unsigned int optlen = sizeof(opt);
+ bool notls;
+
+ tls_crypto_info_init(TLS_1_2_VERSION, TLS_CIPHER_AES_CCM_128,
+ &tls12, 0);
+
+ ulp_sock_pair(_metadata, &fd, &cfd, ¬ls);
+
+ if (notls)
+ exit(KSFT_SKIP);
+
+ /* Don't install keys on fd, we'll parse raw records */
+ ret = setsockopt(cfd, SOL_TLS, TLS_TX, &tls12, tls12.len);
+ ASSERT_EQ(ret, 0);
+
+ ret = setsockopt(cfd, SOL_TLS, TLS_TX_MAX_PAYLOAD_LEN, &limit,
+ sizeof(limit));
+ ASSERT_EQ(ret, 0);
+
+ ret = getsockopt(cfd, SOL_TLS, TLS_TX_MAX_PAYLOAD_LEN, &opt, &optlen);
+ EXPECT_EQ(ret, 0);
+ EXPECT_EQ(limit, opt);
+ EXPECT_EQ(optlen, sizeof(limit));
+
+ memset(tx, 0, sizeof(tx));
+ ASSERT_EQ(send(cfd, tx, sizeof(tx), 0), sizeof(tx));
+ close(cfd);
+
+ ret = recv(fd, rx, sizeof(rx), 0);
+
+ /*
+ * 16B tag + 8B IV -- record header (5B) is not counted but we'll
+ * need it to walk the record stream
+ */
+ overhead = 16 + 8;
+ total_plaintext_rx = parse_tls_records(_metadata, rx, ret, overhead,
+ limit);
+
+ ASSERT_EQ(total_plaintext_rx, sizeof(tx));
+ close(fd);
+ }
+
+ TEST(tls_12_tx_max_payload_len_open_rec)
+ {
+ struct tls_crypto_info_keys tls12;
+ int cfd, ret, fd, overhead;
+ size_t total_plaintext_rx = 0;
+ __u8 tx[1024], rx[2000];
+ __u16 tx_partial = 256;
+ __u16 og_limit = 512, limit = 128;
+ bool notls;
+
+ tls_crypto_info_init(TLS_1_2_VERSION, TLS_CIPHER_AES_CCM_128,
+ &tls12, 0);
+
+ ulp_sock_pair(_metadata, &fd, &cfd, ¬ls);
+
+ if (notls)
+ exit(KSFT_SKIP);
+
+ /* Don't install keys on fd, we'll parse raw records */
+ ret = setsockopt(cfd, SOL_TLS, TLS_TX, &tls12, tls12.len);
+ ASSERT_EQ(ret, 0);
+
+ ret = setsockopt(cfd, SOL_TLS, TLS_TX_MAX_PAYLOAD_LEN, &og_limit,
+ sizeof(og_limit));
+ ASSERT_EQ(ret, 0);
+
+ memset(tx, 0, sizeof(tx));
+ ASSERT_EQ(send(cfd, tx, tx_partial, MSG_MORE), tx_partial);
+
+ /*
+ * Changing the payload limit with a pending open record should
+ * not be allowed.
+ */
+ ret = setsockopt(cfd, SOL_TLS, TLS_TX_MAX_PAYLOAD_LEN, &limit,
+ sizeof(limit));
+ ASSERT_EQ(ret, -1);
+ ASSERT_EQ(errno, EBUSY);
+
+ ASSERT_EQ(send(cfd, tx + tx_partial, sizeof(tx) - tx_partial, MSG_EOR),
+ sizeof(tx) - tx_partial);
+ close(cfd);
+
+ ret = recv(fd, rx, sizeof(rx), 0);
+
+ /*
+ * 16B tag + 8B IV -- record header (5B) is not counted but we'll
+ * need it to walk the record stream
+ */
+ overhead = 16 + 8;
+ total_plaintext_rx = parse_tls_records(_metadata, rx, ret, overhead,
+ og_limit);
+ ASSERT_EQ(total_plaintext_rx, sizeof(tx));
+ close(fd);
+ }
+
TEST(non_established) {
struct tls12_crypto_info_aes_gcm_256 tls12;
struct sockaddr_in addr;
--
LinuxNextTracking