Skip to contentSkip to conversation

6.1.159-rc1 review

PATCH In review Greg Kroah-Hartman 14 participants 588 messages Dec 3, 2025 – Dec 6, 2025 Page 5 of 5

Subsystems (4)
lore
Share & tools
lore
author maintainer
#567 lore raw

PATCH 561/568 staging: rtl8712: Remove driver using deprecated API wext

In reply to Greg Kroah-Hartman

6.1-stable review patch. If anyone has any objections, please let me know.

------------------

From: Philipp Hortmann <[email protected]>

commit e8785404de06a69d89dcdd1e9a0b6ea42dc6d327 upstream.

This driver is in the staging area since 2010.

The following reasons lead to the removal:
- This driver generates maintenance workload for itself and for API wext
- A MAC80211 driver was available in 2016 time frame; This driver does not compile anymore but would be a better starting point than the current driver. Here the note from the TODO file:
A replacement for this driver with MAC80211 support is available at https://github.com/chunkeey/rtl8192su
- no progress changing to mac80211
- Using this hardware is security wise not state of the art as WPA3 is not supported.

Find further discussions in the Link below.

---
 MAINTAINERS                                          |    6 
 drivers/staging/Kconfig                              |    2 
 drivers/staging/Makefile                             |    1 
 drivers/staging/rtl8712/Kconfig                      |   21 
 drivers/staging/rtl8712/Makefile                     |   35 
 drivers/staging/rtl8712/TODO                         |   13 
 drivers/staging/rtl8712/basic_types.h                |   28 
 drivers/staging/rtl8712/drv_types.h                  |  175 -
 drivers/staging/rtl8712/ethernet.h                   |   21 
 drivers/staging/rtl8712/hal_init.c                   |  401 ---
 drivers/staging/rtl8712/ieee80211.c                  |  415 ---
 drivers/staging/rtl8712/ieee80211.h                  |  165 -
 drivers/staging/rtl8712/mlme_linux.c                 |  160 -
 drivers/staging/rtl8712/mlme_osdep.h                 |   31 
 drivers/staging/rtl8712/mp_custom_oid.h              |  287 --
 drivers/staging/rtl8712/os_intfs.c                   |  465 ---
 drivers/staging/rtl8712/osdep_intf.h                 |   32 
 drivers/staging/rtl8712/osdep_service.h              |   60 
 drivers/staging/rtl8712/recv_linux.c                 |  139 -
 drivers/staging/rtl8712/recv_osdep.h                 |   39 
 drivers/staging/rtl8712/rtl8712_bitdef.h             |   26 
 drivers/staging/rtl8712/rtl8712_cmd.c                |  409 ---
 drivers/staging/rtl8712/rtl8712_cmd.h                |  231 -
 drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h     |   95 
 drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h     |   19 
 drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h   |   41 
 drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h   |   32 
 drivers/staging/rtl8712/rtl8712_edcasetting_bitdef.h |   65 
 drivers/staging/rtl8712/rtl8712_edcasetting_regdef.h |   24 
 drivers/staging/rtl8712/rtl8712_efuse.c              |  564 ----
 drivers/staging/rtl8712/rtl8712_efuse.h              |   43 
 drivers/staging/rtl8712/rtl8712_event.h              |   86 
 drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h    |  131 -
 drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h    |   61 
 drivers/staging/rtl8712/rtl8712_gp_bitdef.h          |   68 
 drivers/staging/rtl8712/rtl8712_gp_regdef.h          |   29 
 drivers/staging/rtl8712/rtl8712_hal.h                |  142 -
 drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h   |   44 
 drivers/staging/rtl8712/rtl8712_io.c                 |   99 
 drivers/staging/rtl8712/rtl8712_led.c                | 1830 --------------
 drivers/staging/rtl8712/rtl8712_macsetting_bitdef.h  |   31 
 drivers/staging/rtl8712/rtl8712_macsetting_regdef.h  |   20 
 drivers/staging/rtl8712/rtl8712_powersave_bitdef.h   |   39 
 drivers/staging/rtl8712/rtl8712_powersave_regdef.h   |   26 
 drivers/staging/rtl8712/rtl8712_ratectrl_bitdef.h    |   36 
 drivers/staging/rtl8712/rtl8712_ratectrl_regdef.h    |   43 
 drivers/staging/rtl8712/rtl8712_recv.c               | 1079 --------
 drivers/staging/rtl8712/rtl8712_recv.h               |  145 -
 drivers/staging/rtl8712/rtl8712_regdef.h             |   32 
 drivers/staging/rtl8712/rtl8712_security_bitdef.h    |   34 
 drivers/staging/rtl8712/rtl8712_spec.h               |  121 
 drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h      |  163 -
 drivers/staging/rtl8712/rtl8712_syscfg_regdef.h      |   42 
 drivers/staging/rtl8712/rtl8712_timectrl_bitdef.h    |   49 
 drivers/staging/rtl8712/rtl8712_timectrl_regdef.h    |   26 
 drivers/staging/rtl8712/rtl8712_wmac_bitdef.h        |   49 
 drivers/staging/rtl8712/rtl8712_wmac_regdef.h        |   36 
 drivers/staging/rtl8712/rtl8712_xmit.c               |  745 ------
 drivers/staging/rtl8712/rtl8712_xmit.h               |  108 
 drivers/staging/rtl8712/rtl871x_cmd.c                |  796 ------
 drivers/staging/rtl8712/rtl871x_cmd.h                |  761 ------
 drivers/staging/rtl8712/rtl871x_debug.h              |  130 -
 drivers/staging/rtl8712/rtl871x_eeprom.c             |  220 -
 drivers/staging/rtl8712/rtl871x_eeprom.h             |   88 
 drivers/staging/rtl8712/rtl871x_event.h              |  109 
 drivers/staging/rtl8712/rtl871x_ht.h                 |   33 
 drivers/staging/rtl8712/rtl871x_io.c                 |  147 -
 drivers/staging/rtl8712/rtl871x_io.h                 |  236 -
 drivers/staging/rtl8712/rtl871x_ioctl.h              |   94 
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c        | 2330 -------------------
 drivers/staging/rtl8712/rtl871x_ioctl_rtl.c          |  519 ----
 drivers/staging/rtl8712/rtl871x_ioctl_rtl.h          |  109 
 drivers/staging/rtl8712/rtl871x_ioctl_set.c          |  354 --
 drivers/staging/rtl8712/rtl871x_ioctl_set.h          |   45 
 drivers/staging/rtl8712/rtl871x_led.h                |  118 
 drivers/staging/rtl8712/rtl871x_mlme.c               | 1709 -------------
 drivers/staging/rtl8712/rtl871x_mlme.h               |  205 -
 drivers/staging/rtl8712/rtl871x_mp.c                 |  724 -----
 drivers/staging/rtl8712/rtl871x_mp.h                 |  275 --
 drivers/staging/rtl8712/rtl871x_mp_ioctl.c           |  883 -------
 drivers/staging/rtl8712/rtl871x_mp_ioctl.h           |  328 --
 drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h      | 1034 --------
 drivers/staging/rtl8712/rtl871x_pwrctrl.c            |  234 -
 drivers/staging/rtl8712/rtl871x_pwrctrl.h            |  113 
 drivers/staging/rtl8712/rtl871x_recv.c               |  669 -----
 drivers/staging/rtl8712/rtl871x_recv.h               |  208 -
 drivers/staging/rtl8712/rtl871x_rf.h                 |   55 
 drivers/staging/rtl8712/rtl871x_security.c           | 1386 -----------
 drivers/staging/rtl8712/rtl871x_security.h           |  218 -
 drivers/staging/rtl8712/rtl871x_sta_mgt.c            |  263 --
 drivers/staging/rtl8712/rtl871x_wlan_sme.h           |   35 
 drivers/staging/rtl8712/rtl871x_xmit.c               | 1059 --------
 drivers/staging/rtl8712/rtl871x_xmit.h               |  288 --
 drivers/staging/rtl8712/sta_info.h                   |  132 -
 drivers/staging/rtl8712/usb_halinit.c                |  307 --
 drivers/staging/rtl8712/usb_intf.c                   |  638 -----
 drivers/staging/rtl8712/usb_ops.c                    |  195 -
 drivers/staging/rtl8712/usb_ops.h                    |   38 
 drivers/staging/rtl8712/usb_ops_linux.c              |  515 ----
 drivers/staging/rtl8712/usb_osintf.h                 |   35 
 drivers/staging/rtl8712/wifi.h                       |  196 -
 drivers/staging/rtl8712/wlan_bssdef.h                |  223 -
 drivers/staging/rtl8712/xmit_linux.c                 |  181 -
 drivers/staging/rtl8712/xmit_osdep.h                 |   52 
 104 files changed, 27646 deletions(-)
 delete mode 100644 drivers/staging/rtl8712/Kconfig
 delete mode 100644 drivers/staging/rtl8712/Makefile
 delete mode 100644 drivers/staging/rtl8712/TODO
 delete mode 100644 drivers/staging/rtl8712/basic_types.h
 delete mode 100644 drivers/staging/rtl8712/drv_types.h
 delete mode 100644 drivers/staging/rtl8712/ethernet.h
 delete mode 100644 drivers/staging/rtl8712/hal_init.c
 delete mode 100644 drivers/staging/rtl8712/ieee80211.c
 delete mode 100644 drivers/staging/rtl8712/ieee80211.h
 delete mode 100644 drivers/staging/rtl8712/mlme_linux.c
 delete mode 100644 drivers/staging/rtl8712/mlme_osdep.h
 delete mode 100644 drivers/staging/rtl8712/mp_custom_oid.h
 delete mode 100644 drivers/staging/rtl8712/os_intfs.c
 delete mode 100644 drivers/staging/rtl8712/osdep_intf.h
 delete mode 100644 drivers/staging/rtl8712/osdep_service.h
 delete mode 100644 drivers/staging/rtl8712/recv_linux.c
 delete mode 100644 drivers/staging/rtl8712/recv_osdep.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_cmd.c
 delete mode 100644 drivers/staging/rtl8712/rtl8712_cmd.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_edcasetting_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_edcasetting_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_efuse.c
 delete mode 100644 drivers/staging/rtl8712/rtl8712_efuse.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_event.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_gp_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_gp_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_hal.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_io.c
 delete mode 100644 drivers/staging/rtl8712/rtl8712_led.c
 delete mode 100644 drivers/staging/rtl8712/rtl8712_macsetting_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_macsetting_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_powersave_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_powersave_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_ratectrl_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_ratectrl_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_recv.c
 delete mode 100644 drivers/staging/rtl8712/rtl8712_recv.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_security_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_spec.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_syscfg_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_timectrl_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_timectrl_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_wmac_bitdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_wmac_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl8712_xmit.c
 delete mode 100644 drivers/staging/rtl8712/rtl8712_xmit.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_cmd.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_cmd.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_debug.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_eeprom.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_eeprom.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_event.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_ht.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_io.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_io.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_ioctl.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_ioctl_linux.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_ioctl_rtl.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_ioctl_rtl.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_ioctl_set.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_ioctl_set.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_led.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_mlme.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_mlme.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_mp.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_mp.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_mp_ioctl.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_mp_ioctl.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_pwrctrl.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_pwrctrl.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_recv.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_recv.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_rf.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_security.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_security.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_sta_mgt.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_wlan_sme.h
 delete mode 100644 drivers/staging/rtl8712/rtl871x_xmit.c
 delete mode 100644 drivers/staging/rtl8712/rtl871x_xmit.h
 delete mode 100644 drivers/staging/rtl8712/sta_info.h
 delete mode 100644 drivers/staging/rtl8712/usb_halinit.c
 delete mode 100644 drivers/staging/rtl8712/usb_intf.c
 delete mode 100644 drivers/staging/rtl8712/usb_ops.c
 delete mode 100644 drivers/staging/rtl8712/usb_ops.h
 delete mode 100644 drivers/staging/rtl8712/usb_ops_linux.c
 delete mode 100644 drivers/staging/rtl8712/usb_osintf.h
 delete mode 100644 drivers/staging/rtl8712/wifi.h
 delete mode 100644 drivers/staging/rtl8712/wlan_bssdef.h
 delete mode 100644 drivers/staging/rtl8712/xmit_linux.c
 delete mode 100644 drivers/staging/rtl8712/xmit_osdep.h
MAINTAINERS +0 -6
@@ -19602,12 +19602,6 @@ R:	Pavel Skripkin <[email protected]>
 S:	Supported
 F:	drivers/staging/r8188eu/
 
-STAGING - REALTEK RTL8712U DRIVERS
-M:	Larry Finger <[email protected]>
-M:	Florian Schilhabel <[email protected]>.
-S:	Odd Fixes
-F:	drivers/staging/rtl8712/
-
 STAGING - SEPS525 LCD CONTROLLER DRIVERS
 M:	Michael Hennerich <[email protected]>
 L:	[email protected]
drivers/staging/Kconfig +0 -2
@@ -34,8 +34,6 @@ source "drivers/staging/rtl8192e/Kconfig
 
 source "drivers/staging/rtl8723bs/Kconfig"
 
-source "drivers/staging/rtl8712/Kconfig"
-
 source "drivers/staging/r8188eu/Kconfig"
 
 source "drivers/staging/rts5208/Kconfig"
drivers/staging/Makefile +0 -1
@@ -7,7 +7,6 @@ obj-$(CONFIG_FB_OLPC_DCON)	+= olpc_dcon/
 obj-$(CONFIG_RTL8192U)		+= rtl8192u/
 obj-$(CONFIG_RTL8192E)		+= rtl8192e/
 obj-$(CONFIG_RTL8723BS)		+= rtl8723bs/
-obj-$(CONFIG_R8712U)		+= rtl8712/
 obj-$(CONFIG_R8188EU)		+= r8188eu/
 obj-$(CONFIG_RTS5208)		+= rts5208/
 obj-$(CONFIG_OCTEON_ETHERNET)	+= octeon/
drivers/staging/rtl8712/Kconfig deleted +0 -21
@@ -1,21 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-config R8712U
-	tristate "RealTek RTL8712U (RTL8192SU) Wireless LAN NIC driver"
-	depends on WLAN && USB && CFG80211
-	select WIRELESS_EXT
-	select WEXT_PRIV
-	select FW_LOADER
-	help
-	    This option adds the Realtek RTL8712 USB device such as the
-	    D-Link DWA-130.
-
-	    If built as a module, it will be called r8712u.
-
-config R8712_TX_AGGR
-	bool "Realtek RTL8712U Transmit Aggregation code"
-	depends on R8712U && BROKEN
-	help
-	    This option provides transmit aggregation for the Realtek
-	    RTL8712 USB device.
-
-
drivers/staging/rtl8712/Makefile deleted +0 -35
@@ -1,35 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-r8712u-y :=				\
-		rtl871x_cmd.o		\
-		rtl8712_cmd.o		\
-		rtl871x_security.o	\
-		rtl871x_eeprom.o	\
-		rtl8712_efuse.o		\
-		hal_init.o		\
-		usb_halinit.o		\
-		usb_ops.o		\
-		usb_ops_linux.o		\
-		rtl871x_io.o		\
-		rtl8712_io.o		\
-		rtl871x_ioctl_linux.o	\
-		rtl871x_ioctl_rtl.o	\
-		rtl871x_ioctl_set.o	\
-		rtl8712_led.o		\
-		rtl871x_mlme.o		\
-		ieee80211.o		\
-		rtl871x_mp_ioctl.o	\
-		rtl871x_mp.o		\
-		mlme_linux.o		\
-		recv_linux.o		\
-		xmit_linux.o		\
-		usb_intf.o		\
-		os_intfs.o		\
-		rtl871x_pwrctrl.o	\
-		rtl8712_recv.o		\
-		rtl871x_recv.o		\
-		rtl871x_sta_mgt.o	\
-		rtl871x_xmit.o		\
-		rtl8712_xmit.o
-
-obj-$(CONFIG_R8712U)	:= r8712u.o
-
drivers/staging/rtl8712/TODO deleted +0 -13
@@ -1,13 +0,0 @@
-TODO:
-- merge Realtek's bugfixes and new features into the driver
-- switch to use LIB80211
-- switch to use MAC80211
-- checkpatch.pl fixes - only a few remain
-
-A replacement for this driver with MAC80211 support is available
-at https://github.com/chunkeey/rtl8192su
-
-Please send any patches to Greg Kroah-Hartman <[email protected]>,
-Larry Finger <[email protected]>,
-Florian Schilhabel <[email protected]> and
-Linux Driver Project Developer List <[email protected]>.
drivers/staging/rtl8712/basic_types.h deleted +0 -28
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
- *
- * Modifications for inclusion into the Linux staging tree are
- * Copyright(c) 2010 Larry Finger. All rights reserved.
- *
- * Contact information:
- * WLAN FAE <[email protected]>
- * Larry Finger <[email protected]>
- *
- ******************************************************************************/
-#ifndef __BASIC_TYPES_H__
-#define __BASIC_TYPES_H__
-
-#include <linux/types.h>
-
-#define sint signed int
-
-/* Should we extend this to be host_addr_t and target_addr_t for case:
- *	host : x86_64
- *	target : mips64
- */
-#define addr_t unsigned long
-
-#endif /*__BASIC_TYPES_H__*/
-
drivers/staging/rtl8712/drv_types.h deleted +0 -175

175 lines not on this page · raw message

drivers/staging/rtl8712/ethernet.h deleted +0 -21
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
- *
- * Modifications for inclusion into the Linux staging tree are
- * Copyright(c) 2010 Larry Finger. All rights reserved.
- *
- * Contact information:
- * WLAN FAE <[email protected]>
- * Larry Finger <[email protected]>
- *
- ******************************************************************************/
-#ifndef __INC_ETHERNET_H
-#define __INC_ETHERNET_H
-
-#define ETHERNET_HEADER_SIZE		14	/*!< Ethernet Header Length*/
-#define LLC_HEADER_SIZE			6	/*!< LLC Header Length*/
-
-#endif /* #ifndef __INC_ETHERNET_H */
-
drivers/staging/rtl8712/hal_init.c deleted +0 -401

401 lines not on this page · raw message

drivers/staging/rtl8712/ieee80211.c deleted +0 -415

415 lines not on this page · raw message

drivers/staging/rtl8712/ieee80211.h deleted +0 -165

165 lines not on this page · raw message

drivers/staging/rtl8712/mlme_linux.c deleted +0 -160

160 lines not on this page · raw message

drivers/staging/rtl8712/mlme_osdep.h deleted +0 -31
@@ -1,31 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
- *
- * Modifications for inclusion into the Linux staging tree are
- * Copyright(c) 2010 Larry Finger. All rights reserved.
- *
- * Contact information:
- * WLAN FAE <[email protected]>
- * Larry Finger <[email protected]>
- *
- ******************************************************************************/
-#ifndef	__MLME_OSDEP_H_
-#define __MLME_OSDEP_H_
-
-#include "osdep_service.h"
-#include "drv_types.h"
-
-void r8712_init_mlme_timer(struct _adapter *padapter);
-void r8712_os_indicate_disconnect(struct _adapter *adapter);
-void r8712_os_indicate_connect(struct _adapter *adapter);
-void r8712_report_sec_ie(struct _adapter *adapter, u8 authmode, u8 *sec_ie);
-int r8712_recv_indicatepkts_in_order(struct _adapter *adapter,
-				     struct recv_reorder_ctrl *precvreorder_ctrl,
-				     int bforced);
-void r8712_indicate_wx_assoc_event(struct _adapter *padapter);
-void r8712_indicate_wx_disassoc_event(struct _adapter *padapter);
-
-#endif	/*_MLME_OSDEP_H_*/
-
drivers/staging/rtl8712/mp_custom_oid.h deleted +0 -287

287 lines not on this page · raw message

drivers/staging/rtl8712/os_intfs.c deleted +0 -465

465 lines not on this page · raw message

drivers/staging/rtl8712/osdep_intf.h deleted +0 -32
@@ -1,32 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
- *
- * Modifications for inclusion into the Linux staging tree are
- * Copyright(c) 2010 Larry Finger. All rights reserved.
- *
- * Contact information:
- * WLAN FAE <[email protected]>
- * Larry Finger <[email protected]>
- *
- ******************************************************************************/
-#ifndef __OSDEP_INTF_H_
-#define __OSDEP_INTF_H_
-
-#include "osdep_service.h"
-#include "drv_types.h"
-
-#define RND4(x)	(((x >> 2) + ((x & 3) != 0)) << 2)
-
-struct intf_priv {
-	u8 *intf_dev;
-	/* when in USB, IO is through interrupt in/out endpoints */
-	struct usb_device *udev;
-	struct urb *piorw_urb;
-	struct completion io_retevt_comp;
-};
-
-int r871x_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
-
-#endif	/*_OSDEP_INTF_H_*/
drivers/staging/rtl8712/osdep_service.h deleted +0 -60

60 lines not on this page · raw message

drivers/staging/rtl8712/recv_linux.c deleted +0 -139

139 lines not on this page · raw message

drivers/staging/rtl8712/recv_osdep.h deleted +0 -39
@@ -1,39 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
- *
- * Modifications for inclusion into the Linux staging tree are
- * Copyright(c) 2010 Larry Finger. All rights reserved.
- *
- * Contact information:
- * WLAN FAE <[email protected]>
- * Larry Finger <[email protected]>
- *
- ******************************************************************************/
-#ifndef __RECV_OSDEP_H_
-#define __RECV_OSDEP_H_
-
-#include "osdep_service.h"
-#include "drv_types.h"
-#include <linux/skbuff.h>
-
-void _r8712_init_recv_priv(struct recv_priv *precvpriv,
-			   struct _adapter *padapter);
-void _r8712_free_recv_priv(struct recv_priv *precvpriv);
-void r8712_recv_entry(union recv_frame *precv_frame);
-void r8712_recv_indicatepkt(struct _adapter *adapter,
-			    union recv_frame *precv_frame);
-void r8712_handle_tkip_mic_err(struct _adapter *padapter, u8 bgroup);
-void r8712_init_recv_priv(struct recv_priv *precvpriv,
-			  struct _adapter *padapter);
-void r8712_free_recv_priv(struct recv_priv *precvpriv);
-void r8712_os_recv_resource_alloc(struct _adapter *padapter,
-				  union recv_frame *precvframe);
-int r8712_os_recvbuf_resource_alloc(struct _adapter *padapter,
-				    struct recv_buf *precvbuf);
-void r8712_os_recvbuf_resource_free(struct _adapter *padapter,
-				    struct recv_buf *precvbuf);
-void r8712_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl);
-
-#endif
drivers/staging/rtl8712/rtl8712_bitdef.h deleted +0 -26
@@ -1,26 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
- *
- ******************************************************************************/
-
-#ifndef __RTL8712_BITDEF_H__
-#define __RTL8712_BITDEF_H__
-
-#include "rtl8712_cmdctrl_bitdef.h"
-#include "rtl8712_syscfg_bitdef.h"
-#include "rtl8712_macsetting_bitdef.h"
-#include "rtl8712_timectrl_bitdef.h"
-#include "rtl8712_fifoctrl_bitdef.h"
-#include "rtl8712_ratectrl_bitdef.h"
-#include "rtl8712_edcasetting_bitdef.h"
-#include "rtl8712_wmac_bitdef.h"
-#include "rtl8712_security_bitdef.h"
-#include "rtl8712_powersave_bitdef.h"
-#include "rtl8712_gp_bitdef.h"
-#include "rtl8712_interrupt_bitdef.h"
-#include "rtl8712_debugctrl_bitdef.h"
-
-#endif /* __RTL8712_BITDEF_H__ */
-
drivers/staging/rtl8712/rtl8712_cmd.c deleted +0 -409

409 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_cmd.h deleted +0 -231

51 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h deleted +0 -95

95 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_cmdctrl_regdef.h deleted +0 -19

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_debugctrl_bitdef.h deleted +0 -41

41 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_debugctrl_regdef.h deleted +0 -32

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_edcasetting_bitdef.h deleted +0 -65

65 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_edcasetting_regdef.h deleted +0 -24

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_efuse.c deleted +0 -564

564 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_efuse.h deleted +0 -43

43 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_event.h deleted +0 -86

86 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_fifoctrl_bitdef.h deleted +0 -131

131 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_fifoctrl_regdef.h deleted +0 -61

61 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_gp_bitdef.h deleted +0 -68

68 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_gp_regdef.h deleted +0 -29

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_hal.h deleted +0 -142

142 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_interrupt_bitdef.h deleted +0 -44

44 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_io.c deleted +0 -99

99 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_led.c deleted +0 -1830

1,830 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_macsetting_bitdef.h deleted +0 -31

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_macsetting_regdef.h deleted +0 -20

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_powersave_bitdef.h deleted +0 -39

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_powersave_regdef.h deleted +0 -26

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_ratectrl_bitdef.h deleted +0 -36

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_ratectrl_regdef.h deleted +0 -43

43 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_recv.c deleted +0 -1079

1,079 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_recv.h deleted +0 -145

145 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_regdef.h deleted +0 -32

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_security_bitdef.h deleted +0 -34

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_spec.h deleted +0 -121

121 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_syscfg_bitdef.h deleted +0 -163

163 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_syscfg_regdef.h deleted +0 -42

42 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_timectrl_bitdef.h deleted +0 -49

49 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_timectrl_regdef.h deleted +0 -26

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_wmac_bitdef.h deleted +0 -49

49 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_wmac_regdef.h deleted +0 -36

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl8712_xmit.c deleted +0 -745

745 lines not on this page · raw message

drivers/staging/rtl8712/rtl8712_xmit.h deleted +0 -108

108 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_cmd.c deleted +0 -796

796 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_cmd.h deleted +0 -761

761 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_debug.h deleted +0 -130

130 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_eeprom.c deleted +0 -220

220 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_eeprom.h deleted +0 -88

88 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_event.h deleted +0 -109

109 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_ht.h deleted +0 -33

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl871x_io.c deleted +0 -147

147 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_io.h deleted +0 -236

236 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_ioctl.h deleted +0 -94

94 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_ioctl_linux.c deleted +0 -2330

2,330 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_ioctl_rtl.c deleted +0 -519

519 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_ioctl_rtl.h deleted +0 -109

109 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_ioctl_set.c deleted +0 -354

354 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_ioctl_set.h deleted +0 -45

45 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_led.h deleted +0 -118

118 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_mlme.c deleted +0 -1709

1,709 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_mlme.h deleted +0 -205

205 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_mp.c deleted +0 -724

724 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_mp.h deleted +0 -275

275 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_mp_ioctl.c deleted +0 -883

883 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_mp_ioctl.h deleted +0 -328

328 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h deleted +0 -1034

1,034 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_pwrctrl.c deleted +0 -234

234 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_pwrctrl.h deleted +0 -113

113 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_recv.c deleted +0 -669

669 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_recv.h deleted +0 -208

208 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_rf.h deleted +0 -55

55 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_security.c deleted +0 -1386

1,386 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_security.h deleted +0 -218

218 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_sta_mgt.c deleted +0 -263

263 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_wlan_sme.h deleted +0 -35

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl871x_xmit.c deleted +0 -1059

1,059 lines not on this page · raw message

drivers/staging/rtl8712/rtl871x_xmit.h deleted +0 -288

288 lines not on this page · raw message

drivers/staging/rtl8712/sta_info.h deleted +0 -132

132 lines not on this page · raw message

drivers/staging/rtl8712/usb_halinit.c deleted +0 -307

307 lines not on this page · raw message

drivers/staging/rtl8712/usb_intf.c deleted +0 -638

638 lines not on this page · raw message

drivers/staging/rtl8712/usb_ops.c deleted +0 -195

195 lines not on this page · raw message

drivers/staging/rtl8712/usb_ops.h deleted +0 -38

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/usb_ops_linux.c deleted +0 -515

515 lines not on this page · raw message

drivers/staging/rtl8712/usb_osintf.h deleted +0 -35

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/wifi.h deleted +0 -196

196 lines not on this page · raw message

drivers/staging/rtl8712/wlan_bssdef.h deleted +0 -223

223 lines not on this page · raw message

drivers/staging/rtl8712/xmit_linux.c deleted +0 -181

181 lines not on this page · raw message

drivers/staging/rtl8712/xmit_osdep.h deleted +0 -52

52 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

author maintainer
#568 lore raw

PATCH 562/568 ksmbd: fix use-after-free in session logoff

In reply to Greg Kroah-Hartman

6.1-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Heelan <[email protected]>

commit 2fc9feff45d92a92cd5f96487655d5be23fb7e2b upstream.

The sess->user object can currently be in use by another thread, for example if another connection has sent a session setup request to bind to the session being free'd. The handler for that connection could be in the smb2_sess_setup function which makes use of sess->user.

---
v2: Fix duplicate From: header
Backport fix for CVE-2025-37899

 fs/smb/server/smb2pdu.c |    4 ----
 1 file changed, 4 deletions(-)
fs/smb/server/smb2pdu.c +0 -4
@@ -2253,10 +2253,6 @@ int smb2_session_logoff(struct ksmbd_wor
 	sess->state = SMB2_SESSION_EXPIRED;
 	up_write(&conn->session_lock);
 
-	if (sess->user) {
-		ksmbd_free_user(sess->user);
-		sess->user = NULL;
-	}
 	ksmbd_all_conn_set_status(sess_id, KSMBD_SESS_NEED_NEGOTIATE);
 
 	rsp->StructureSize = cpu_to_le16(4);
author maintainer
#569 lore raw

PATCH 563/568 usb: typec: ucsi: psy: Set max current to zero when disconnected

In reply to Greg Kroah-Hartman

6.1-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jameson Thies <[email protected]>

[ Upstream commit 23379a17334fc24c4a9cbd9967d33dcd9323cc7c ]

The ucsi_psy_get_current_max function defaults to 0.1A when it is not clear how much current the partner device can support. But this does not check the port is connected, and will report 0.1A max current when nothing is connected. Update ucsi_psy_get_current_max to report 0A when there is no connection.

Fixes af833e7f7db3 ("usb: typec: ucsi: psy: Set current max to 100mA for BC 1.2 and Default")

Rule: add

---
 drivers/usb/typec/ucsi/psy.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/usb/typec/ucsi/psy.c +5 -0
@@ -144,6 +144,11 @@ static int ucsi_psy_get_current_max(stru
 {
 	u32 pdo;
 
+	if (!(con->status.flags & UCSI_CONSTAT_CONNECTED)) {
+		val->intval = 0;
+		return 0;
+	}
+
 	switch (UCSI_CONSTAT_PWR_OPMODE(con->status.flags)) {
 	case UCSI_CONSTAT_PWR_OPMODE_PD:
 		if (con->num_pdos > 0) {
author maintainer
#570 lore raw

PATCH 564/568 usb: udc: Add trace event for usb_gadget_set_state

In reply to Greg Kroah-Hartman

6.1-stable review patch. If anyone has any objections, please let me know.

------------------

From: Kuen-Han Tsai <[email protected]>

[ Upstream commit 7bf1158514e410310aec975e630cec99d4e4092f ]

While the userspace program can be notified of gadget state changes, timing issue can lead to missed transitions when reading the state value.

Introduce a trace event for usb_gadget_set_state to reliably track state transitions.

Stable-dep-of: baeb66fbd420 ("usb: gadget: udc: fix use-after-free in usb_gadget_state_work")

---
 drivers/usb/gadget/udc/core.c  |    1 +
 drivers/usb/gadget/udc/trace.h |    5 +++++
 2 files changed, 6 insertions(+)
drivers/usb/gadget/udc/core.c +1 -0
@@ -1123,6 +1123,7 @@ void usb_gadget_set_state(struct usb_gad
 {
 	gadget->state = state;
 	schedule_work(&gadget->work);
+	trace_usb_gadget_set_state(gadget, 0);
 }
 EXPORT_SYMBOL_GPL(usb_gadget_set_state);
 
drivers/usb/gadget/udc/trace.h +5 -0
@@ -81,6 +81,11 @@ DECLARE_EVENT_CLASS(udc_log_gadget,
 		__entry->ret)
 );
 
+DEFINE_EVENT(udc_log_gadget, usb_gadget_set_state,
+	TP_PROTO(struct usb_gadget *g, int ret),
+	TP_ARGS(g, ret)
+);
+
 DEFINE_EVENT(udc_log_gadget, usb_gadget_frame_number,
 	TP_PROTO(struct usb_gadget *g, int ret),
 	TP_ARGS(g, ret)
author maintainer
#571 lore raw

PATCH 565/568 usb: gadget: udc: fix use-after-free in usb_gadget_state_work

In reply to Greg Kroah-Hartman

6.1-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jimmy Hu <[email protected]>

[ Upstream commit baeb66fbd4201d1c4325074e78b1f557dff89b5b ]

A race condition during gadget teardown can lead to a use-after-free in usb_gadget_state_work(), as reported by KASAN:

  BUG: KASAN: invalid-access in sysfs_notify+0x2c/0xd0
  Workqueue: events usb_gadget_state_work

The fundamental race occurs because a concurrent event (e.g., an interrupt) can call usb_gadget_set_state() and schedule gadget->work at any time during the cleanup process in usb_del_gadget().

Commit 399a45e5237c ("usb: gadget: core: flush gadget workqueue after device removal") attempted to fix this by moving flush_work() to after device_del(). However, this does not fully solve the race, as a new work item can still be scheduled *after* flush_work() completes but before the gadget's memory is freed, leading to the same use-after-free.

This patch fixes the race condition robustly by introducing a 'teardown' flag and a 'state_lock' spinlock to the usb_gadget struct. The flag is set during cleanup in usb_del_gadget() *before* calling flush_work() to prevent any new work from being scheduled once cleanup has commenced. The scheduling site, usb_gadget_set_state(), now checks this flag under the lock before queueing the work, thus safely closing the race window.

Fixes 5702f75375aa9 ("usb: gadget: udc-core: move sysfs_notify() to a workqueue")
Cc stable <[email protected]>
---
 drivers/usb/gadget/udc/core.c |   17 ++++++++++++++++-
 include/linux/usb/gadget.h    |    5 +++++
 2 files changed, 21 insertions(+), 1 deletion(-)
drivers/usb/gadget/udc/core.c +16 -1
@@ -1121,8 +1121,13 @@ static void usb_gadget_state_work(struct
 void usb_gadget_set_state(struct usb_gadget *gadget,
 		enum usb_device_state state)
 {
+	unsigned long flags;
+
+	spin_lock_irqsave(&gadget->state_lock, flags);
 	gadget->state = state;
-	schedule_work(&gadget->work);
+	if (!gadget->teardown)
+		schedule_work(&gadget->work);
+	spin_unlock_irqrestore(&gadget->state_lock, flags);
 	trace_usb_gadget_set_state(gadget, 0);
 }
 EXPORT_SYMBOL_GPL(usb_gadget_set_state);
@@ -1356,6 +1361,8 @@ static void usb_udc_nop_release(struct d
 void usb_initialize_gadget(struct device *parent, struct usb_gadget *gadget,
 		void (*release)(struct device *dev))
 {
+	spin_lock_init(&gadget->state_lock);
+	gadget->teardown = false;
 	INIT_WORK(&gadget->work, usb_gadget_state_work);
 	gadget->dev.parent = parent;
 
@@ -1530,6 +1537,7 @@ EXPORT_SYMBOL_GPL(usb_add_gadget_udc);
 void usb_del_gadget(struct usb_gadget *gadget)
 {
 	struct usb_udc *udc = gadget->udc;
+	unsigned long flags;
 
 	if (!udc)
 		return;
@@ -1543,6 +1551,13 @@ void usb_del_gadget(struct usb_gadget *g
 	kobject_uevent(&udc->dev.kobj, KOBJ_REMOVE);
 	sysfs_remove_link(&udc->dev.kobj, "gadget");
 	device_del(&gadget->dev);
+	/*
+	 * Set the teardown flag before flushing the work to prevent new work
+	 * from being scheduled while we are cleaning up.
+	 */
+	spin_lock_irqsave(&gadget->state_lock, flags);
+	gadget->teardown = true;
+	spin_unlock_irqrestore(&gadget->state_lock, flags);
 	flush_work(&gadget->work);
 	ida_free(&gadget_id_numbers, gadget->id_number);
 	cancel_work_sync(&udc->vbus_work);
include/linux/usb/gadget.h +5 -0
@@ -373,6 +373,9 @@ struct usb_gadget_ops {
  *	can handle. The UDC must support this and all slower speeds and lower
  *	number of lanes.
  * @state: the state we are now (attached, suspended, configured, etc)
+ * @state_lock: Spinlock protecting the `state` and `teardown` members.
+ * @teardown: True if the device is undergoing teardown, used to prevent
+ *	new work from being scheduled during cleanup.
  * @name: Identifies the controller hardware type.  Used in diagnostics
  *	and sometimes configuration.
  * @dev: Driver model state for this abstract device.
@@ -448,6 +451,8 @@ struct usb_gadget {
 	enum usb_ssp_rate		max_ssp_rate;
 
 	enum usb_device_state		state;
+	spinlock_t			state_lock;
+	bool				teardown;
 	const char			*name;
 	struct device			dev;
 	unsigned			isoch_delay;
author maintainer
#572 lore raw

PATCH 566/568 scsi: pm80xx: Set phy->enable_completion only when we

In reply to Greg Kroah-Hartman

6.1-stable review patch. If anyone has any objections, please let me know.

------------------

From: Igor Pylypiv <[email protected]>

[ Upstream commit e4f949ef1516c0d74745ee54a0f4882c1f6c7aea ]

pm8001_phy_control() populates the enable_completion pointer with a stack address, sends a PHY_LINK_RESET / PHY_HARD_RESET, waits 300 ms, and returns. The problem arises when a phy control response comes late. After 300 ms the pm8001_phy_control() function returns and the passed enable_completion stack address is no longer valid. Late phy control response invokes complete() on a dangling enable_completion pointer which leads to a kernel crash.

---
Backport fix for CVE-2024-47666

 drivers/scsi/pm8001/pm8001_sas.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/pm8001/pm8001_sas.c +3 -1
@@ -168,7 +168,6 @@ int pm8001_phy_control(struct asd_sas_ph
 	unsigned long flags;
 	pm8001_ha = sas_phy->ha->lldd_ha;
 	phy = &pm8001_ha->phy[phy_id];
-	pm8001_ha->phy[phy_id].enable_completion = &completion;
 	switch (func) {
 	case PHY_FUNC_SET_LINK_RATE:
 		rates = funcdata;
@@ -181,6 +180,7 @@ int pm8001_phy_control(struct asd_sas_ph
 				rates->maximum_linkrate;
 		}
 		if (pm8001_ha->phy[phy_id].phy_state ==  PHY_LINK_DISABLE) {
+			pm8001_ha->phy[phy_id].enable_completion = &completion;
 			PM8001_CHIP_DISP->phy_start_req(pm8001_ha, phy_id);
 			wait_for_completion(&completion);
 		}
@@ -189,6 +189,7 @@ int pm8001_phy_control(struct asd_sas_ph
 		break;
 	case PHY_FUNC_HARD_RESET:
 		if (pm8001_ha->phy[phy_id].phy_state == PHY_LINK_DISABLE) {
+			pm8001_ha->phy[phy_id].enable_completion = &completion;
 			PM8001_CHIP_DISP->phy_start_req(pm8001_ha, phy_id);
 			wait_for_completion(&completion);
 		}
@@ -197,6 +198,7 @@ int pm8001_phy_control(struct asd_sas_ph
 		break;
 	case PHY_FUNC_LINK_RESET:
 		if (pm8001_ha->phy[phy_id].phy_state == PHY_LINK_DISABLE) {
+			pm8001_ha->phy[phy_id].enable_completion = &completion;
 			PM8001_CHIP_DISP->phy_start_req(pm8001_ha, phy_id);
 			wait_for_completion(&completion);
 		}
author maintainer
#573 lore raw

PATCH 567/568 i2c: xgene-slimpro: Migrate to use generic PCC shmem related macros

In reply to Greg Kroah-Hartman

6.1-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sudeep Holla <[email protected]>

commit 89a4ad1f437c049534891c3d83cd96d7c7debd2a upstream.

Use the newly defined common and generic PCC shared memory region related macros in this driver to replace the locally defined ones.

---
 drivers/i2c/busses/i2c-xgene-slimpro.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/i2c/busses/i2c-xgene-slimpro.c +4 -12
@@ -91,14 +91,6 @@
 
 #define SLIMPRO_IIC_MSG_DWORD_COUNT			3
 
-/* PCC related defines */
-#define PCC_SIGNATURE			0x50424300
-#define PCC_STS_CMD_COMPLETE		BIT(0)
-#define PCC_STS_SCI_DOORBELL		BIT(1)
-#define PCC_STS_ERR			BIT(2)
-#define PCC_STS_PLAT_NOTIFY		BIT(3)
-#define PCC_CMD_GENERATE_DB_INT		BIT(15)
-
 struct slimpro_i2c_dev {
 	struct i2c_adapter adapter;
 	struct device *dev;
@@ -160,11 +152,11 @@ static void slimpro_i2c_pcc_rx_cb(struct
 
 	/* Check if platform sends interrupt */
 	if (!xgene_word_tst_and_clr(&generic_comm_base->status,
-				    PCC_STS_SCI_DOORBELL))
+				    PCC_STATUS_SCI_DOORBELL))
 		return;
 
 	if (xgene_word_tst_and_clr(&generic_comm_base->status,
-				   PCC_STS_CMD_COMPLETE)) {
+				   PCC_STATUS_CMD_COMPLETE)) {
 		msg = generic_comm_base + 1;
 
 		/* Response message msg[1] contains the return value. */
@@ -186,10 +178,10 @@ static void slimpro_i2c_pcc_tx_prepare(s
 		   cpu_to_le32(PCC_SIGNATURE | ctx->mbox_idx));
 
 	WRITE_ONCE(generic_comm_base->command,
-		   cpu_to_le16(SLIMPRO_MSG_TYPE(msg[0]) | PCC_CMD_GENERATE_DB_INT));
+		   cpu_to_le16(SLIMPRO_MSG_TYPE(msg[0]) | PCC_CMD_GENERATE_DB_INTR));
 
 	status = le16_to_cpu(READ_ONCE(generic_comm_base->status));
-	status &= ~PCC_STS_CMD_COMPLETE;
+	status &= ~PCC_STATUS_CMD_COMPLETE;
 	WRITE_ONCE(generic_comm_base->status, cpu_to_le16(status));
 
 	/* Copy the message to the PCC comm space */
author maintainer
#574 lore raw

PATCH 568/568 HID: core: Harden s32ton() against conversion to 0 bits

In reply to Greg Kroah-Hartman

6.1-stable review patch. If anyone has any objections, please let me know.

------------------

From: Alan Stern <[email protected]>

[ Upstream commit a6b87bfc2ab5bccb7ad953693c85d9062aef3fdd ]

Testing by the syzbot fuzzer showed that the HID core gets a shift-out-of-bounds exception when it tries to convert a 32-bit quantity to a 0-bit quantity. Ideally this should never occur, but there are buggy devices and some might have a report field with size set to zero; we shouldn't reject the report or the device just because of that.

Instead, harden the s32ton() routine so that it returns a reasonable result instead of crashing when it is called with the number of bits set to 0 -- the same as what snto32() does.

[ s32ton() was moved by c653ffc28340 ("HID: stop exporting hid_snto32()").
Minor context change fixed. ]

---
 drivers/hid/hid-core.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/hid/hid-core.c +6 -1
@@ -1354,7 +1354,12 @@ EXPORT_SYMBOL_GPL(hid_snto32);
 
 static u32 s32ton(__s32 value, unsigned n)
 {
-	s32 a = value >> (n - 1);
+	s32 a;
+	if (!value || !n)
+		return 0;
+
+	a = value >> (n - 1);
+
 	if (a && a != -1)
 		return value < 0 ? 1 << (n - 1) : (1 << (n - 1)) - 1;
 	return value & ((1 << n) - 1);
#575 lore raw
In reply to Greg Kroah-Hartman

Hi!

Quoted 4 lines

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

We have similar situation to 5.10 here:

https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/jobs/12309717631

drivers/soc/tegra/fuse/fuse-tegra30.c:250:10: error: 'const struct tegra_fuse_soc' has no member named 'cells' 2898
250 | .cells = tegra114_fuse_cells,
2899

      |          ^~~~~

2900
drivers/soc/tegra/fuse/fuse-tegra30.c:250:18: error: initialization of 'const struct attribute_group *' from incompatible pointer type 'const struct nvmem_cell_info *' [-Werror=incompatible-pointer-types] 2901
250 | .cells = tegra114_fuse_cells,
2902

      |                  ^~~~~~~~~~~~~~~~~~~

2903
drivers/soc/tegra/fuse/fuse-tegra30.c:250:18: note: (near initialization for 'tegra114_fuse_soc.soc_attr_group') 2904
drivers/soc/tegra/fuse/fuse-tegra30.c:251:10: error: 'const struct tegra_fuse_soc' has no member named 'num_cells' 2905
251 | .num_cells = ARRAY_SIZE(tegra114_fuse_cells),
2906

      |          ^~~~~~~~~

2907
cc1: some warnings being treated as errors
2908
make[5]: *** [scripts/Makefile.build:250: drivers/soc/tegra/fuse/fuse-tegra30.o] Error 1 2909
make[4]: *** [scripts/Makefile.build:503: drivers/soc/tegra/fuse] Error 2 2910
make[3]: *** [scripts/Makefile.build:503: drivers/soc/tegra] Error 2
2911
make[2]: *** [scripts/Makefile.build:503: drivers/soc] Error 2
2912
make[2]: *** Waiting for unfinished jobs....

Best regards,
Pavel

Signature · 2 lines
In cooperation with DENX Software Engineering GmbH, HRB 165235 Munich,
Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Tested-by on the v1 series
#576 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 05 Dec 2025 15:23:16 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.159-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.

thanks,

greg k-h

On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:

Signature · 1 line
Florian
Tested-by on the v1 series
#578 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 05 Dec 2025 15:23:16 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 9 lines
	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.159-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.

thanks,

greg k-h

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah

Tested-by on the v1 series
#579 lore raw
In reply to Greg Kroah-Hartman

Am 03.12.2025 um 16:20 schrieb Greg Kroah-Hartman:

Quoted 4 lines

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.

Beste Grüße,
Peter Schneider

Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge,
enjoy the air and behold the view. Climb it so you can see the world,
not so the world can see you.                    -- David McCullough Jr.

OpenPGP:  0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244
Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc
https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
#580 lore raw
In reply to Greg Kroah-Hartman
Quoted 10 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 05 Dec 2025 15:23:16 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
        https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.159-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.

thanks,

greg k-h

The arm and sparc builds failed on the stable-rc 6.1.159-rc1.

Build regressions: arm, fuse-tegra30.c:250:10: error: 'const struct tegra_fuse_soc' has no member named 'cells'
Build regressions: arm, fuse-tegra30.c:250:18: error: initialization of 'const struct attribute_group *' from incompatible pointer type 'const struct nvmem_cell_info *' [-Wincompatible-pointer-types] Build regressions: arm, fuse-tegra30.c:251:10: error: 'const struct tegra_fuse_soc' has no member named 'num_cells'

Build regressions: sparc, allmodconfig, ERROR: modpost:
"pm_suspend_target_state" [drivers/ufs/host/ufshcd-pci.ko] undefined!

### arm build error drivers/soc/tegra/fuse/fuse-tegra30.c:250:10: error: 'const struct tegra_fuse_soc' has no member named 'cells'
250 | .cells = tegra114_fuse_cells,

      |          ^~~~~

drivers/soc/tegra/fuse/fuse-tegra30.c:250:18: error: initialization of 'const struct attribute_group *' from incompatible pointer type 'const struct nvmem_cell_info *' [-Wincompatible-pointer-types]
250 | .cells = tegra114_fuse_cells,

      |                  ^~~~~~~~~~~~~~~~~~~

drivers/soc/tegra/fuse/fuse-tegra30.c:250:18: note: (near initialization for 'tegra114_fuse_soc.soc_attr_group') drivers/soc/tegra/fuse/fuse-tegra30.c:251:10: error: 'const struct tegra_fuse_soc' has no member named 'num_cells'
251 | .num_cells = ARRAY_SIZE(tegra114_fuse_cells),

      |          ^~~~~~~~~

### sparc build error
ERROR: modpost: "pm_suspend_target_state"
[drivers/ufs/host/ufshcd-pci.ko] undefined!

### Commit pointing to arm build errors
soc/tegra: fuse: Add Tegra114 nvmem cells and fuse lookups [ Upstream commit b9c01adedf38c69abb725a60a05305ef70dbce03 ]

### commit pointing to sparc build errors
scsi: ufs: ufs-pci: Fix S0ix/S3 for Intel controllers commit bb44826c3bdbf1fa3957008a04908f45e5666463 upstream.

## Build
* kernel: 6.1.159-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: abd89c70c9382759c14c5e7e0b383c2a19594c5c
* git describe: v6.1.158-569-gabd89c70c938
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.158-569-gabd89c70c938

## Test Regressions (compared to v6.1.157-158-gf6fcaf2c6b7f)
* arm, build
- clang-21-defconfig
- clang-21-lkftconfig
- clang-21-lkftconfig-no-kselftest-frag
- clang-nightly-defconfig
- clang-nightly-lkftconfig
- gcc-14-allmodconfig
- gcc-14-defconfig
- gcc-14-lkftconfig
- gcc-14-lkftconfig-debug
- gcc-14-lkftconfig-kasan
- gcc-14-lkftconfig-kunit
- gcc-14-lkftconfig-libgpiod
- gcc-14-lkftconfig-no-kselftest-frag
- gcc-14-lkftconfig-perf
- gcc-14-lkftconfig-rcutorture
- gcc-8-defconfig

* sparc, build
- gcc-11-allmodconfig

## Metric Regressions (compared to v6.1.157-158-gf6fcaf2c6b7f)

## Test Fixes (compared to v6.1.157-158-gf6fcaf2c6b7f)

## Metric Fixes (compared to v6.1.157-158-gf6fcaf2c6b7f)

## Test result summary
total: 80660, pass: 60774, fail: 9871, skip: 9886, xfail: 129

## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 133 total, 115 passed, 18 failed
* arm64: 41 total, 38 passed, 3 failed
* i386: 21 total, 21 passed, 0 failed
* mips: 26 total, 25 passed, 1 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 32 total, 31 passed, 1 failed
* riscv: 11 total, 10 passed, 1 failed
* s390: 14 total, 13 passed, 1 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 7 total, 6 passed, 1 failed
* x86_64: 33 total, 32 passed, 1 failed

## Test suites summary
* boot
* commands
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-exec
* kselftest-fpu
* kselftest-futex
* kselftest-intel_pstate
* kselftest-kcmp
* kselftest-kvm
* kselftest-livepatch
* kselftest-membarrier
* kselftest-mincore
* kselftest-mqueue
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-sigaltstack
* kselftest-size
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-x86
* kunit
* kvm-unit-tests
* lava
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-build-clang
* log-parser-build-gcc
* log-parser-test
* ltp-capability
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture

--
Linaro LKFT
https://lkft.linaro.org

#581 lore raw
Quoted 11 lines · Naresh Kamboju
Quoted 5 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Build regressions: sparc, allmodconfig, ERROR: modpost:
"pm_suspend_target_state" [drivers/ufs/host/ufshcd-pci.ko] undefined!

Quoted 7 lines

### sparc build error
ERROR: modpost: "pm_suspend_target_state"
[drivers/ufs/host/ufshcd-pci.ko] undefined!

### commit pointing to sparc build errors
scsi: ufs: ufs-pci: Fix S0ix/S3 for Intel controllers commit bb44826c3bdbf1fa3957008a04908f45e5666463 upstream.

For that issue, cherry-picking the following provides the needed definition:

commit 2e41e3ca4729455e002bcb585f0d3749ee66d572

Author: Kai-Heng Feng <[email protected]>
Date:   Tue May 2 17:04:34 2023 +0200

PM: suspend: Fix pm_suspend_target_state handling for !CONFIG_PM

Move the pm_suspend_target_state definition for CONFIG_SUSPEND unset from the wakeup code into the headers so as to allow it to still be used elsewhere when CONFIG_SUSPEND is not set.

[ rjw: Changelog and subject edits ]
drivers/base/power/wakeup.c +0 -5
index 7cc0c0cf8eaa..a917219feea6 100644
@@ -19,11 +19,6 @@
 
 #include "power.h"
 
-#ifndef CONFIG_SUSPEND
-suspend_state_t pm_suspend_target_state;
-#define pm_suspend_target_state	(PM_SUSPEND_ON)
-#endif
-
 #define list_for_each_entry_rcu_locked(pos, head, member) \
 	list_for_each_entry_rcu(pos, head, member, \
 		srcu_read_lock_held(&wakeup_srcu))
include/linux/suspend.h +3 -1
index d0d4598a7b3f..474ecfbbaa62 100644
@@ -202,6 +202,7 @@ struct platform_s2idle_ops {
 };
 
 #ifdef CONFIG_SUSPEND
+extern suspend_state_t pm_suspend_target_state;
 extern suspend_state_t mem_sleep_current;
 extern suspend_state_t mem_sleep_default;
 
@@ -337,6 +338,8 @@ extern bool sync_on_suspend_enabled;
 #else /* !CONFIG_SUSPEND */
 #define suspend_valid_only_mem	NULL
 
+#define pm_suspend_target_state	(PM_SUSPEND_ON)
+
 static inline void pm_suspend_clear_flags(void) {}
 static inline void pm_set_suspend_via_firmware(void) {}
 static inline void pm_set_resume_via_firmware(void) {}
@@ -503,7 +506,6 @@ extern void pm_report_max_hw_sleep(u64 t);
 
 /* drivers/base/power/wakeup.c */
 extern bool events_check_enabled;
-extern suspend_state_t pm_suspend_target_state;
 
 extern bool pm_wakeup_pending(void);
 extern void pm_system_wakeup(void);
author maintainer
#582 lore raw
Quoted 29 lines · Adrian Hunter
Quoted 11 lines · Naresh Kamboju
Quoted 5 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Build regressions: sparc, allmodconfig, ERROR: modpost:
"pm_suspend_target_state" [drivers/ufs/host/ufshcd-pci.ko] undefined!

Quoted 7 lines

### sparc build error
ERROR: modpost: "pm_suspend_target_state"
[drivers/ufs/host/ufshcd-pci.ko] undefined!

### commit pointing to sparc build errors
scsi: ufs: ufs-pci: Fix S0ix/S3 for Intel controllers commit bb44826c3bdbf1fa3957008a04908f45e5666463 upstream.

For that issue, cherry-picking the following provides the needed definition:

commit 2e41e3ca4729455e002bcb585f0d3749ee66d572

Author: Kai-Heng Feng <[email protected]>
Date:   Tue May 2 17:04:34 2023 +0200

PM: suspend: Fix pm_suspend_target_state handling for !CONFIG_PM

Quoted 7 lines

Move the pm_suspend_target_state definition for CONFIG_SUSPEND unset from the wakeup code into the headers so as to allow it to still be used elsewhere when CONFIG_SUSPEND is not set.

[ rjw: Changelog and subject edits ]

Thanks, will go queue that up now.

greg k-h

author maintainer
#583 lore raw
In reply to Naresh Kamboju
Quoted 3 lines · Naresh Kamboju

### Commit pointing to arm build errors
soc/tegra: fuse: Add Tegra114 nvmem cells and fuse lookups [ Upstream commit b9c01adedf38c69abb725a60a05305ef70dbce03 ]

Now dropped from all queues, thanks!

greg k-h

#584 lore raw
In reply to Greg Kroah-Hartman
Quoted 4 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing a bunch of systems start failing with this release, they start OOMing when previously they ran OK. Most of them aren't exactly overburned with memory. These failures bisect to 61717acddadf66 (mm/memory: do not populate page table entries beyond i_size), sample bisect from one of the systems including links to test jobs (the bisects for other systems/test sets look very similar):

# bad: [abd89c70c9382759c14c5e7e0b383c2a19594c5c] Linux 6.1.159-rc1
# good: [f6e38ae624cf7eb96fb444a8ca2d07caa8d9c8fe] Linux 6.1.158
git bisect start 'abd89c70c9382759c14c5e7e0b383c2a19594c5c' 'f6e38ae624cf7eb96fb444a8ca2d07caa8d9c8fe'

# test job: [abd89c70c9382759c14c5e7e0b383c2a19594c5c] https://lava.sirena.org.uk/scheduler/job/2168338
# bad: [abd89c70c9382759c14c5e7e0b383c2a19594c5c] Linux 6.1.159-rc1
git bisect bad abd89c70c9382759c14c5e7e0b383c2a19594c5c
# test job: [43c650106e8558fa7cfec5a2e9c8de29233b6552] https://lava.sirena.org.uk/scheduler/job/2168373
# good: [43c650106e8558fa7cfec5a2e9c8de29233b6552] rtc: pcf2127: clear minute/second interrupt
git bisect good 43c650106e8558fa7cfec5a2e9c8de29233b6552
# test job: [b56fbe428919e8c1a548f331d20b8c4608008845] https://lava.sirena.org.uk/scheduler/job/2168393
# good: [b56fbe428919e8c1a548f331d20b8c4608008845] net/mlx5e: Preserve shared buffer capacity during headroom updates
git bisect good b56fbe428919e8c1a548f331d20b8c4608008845
# test job: [445097729a995f87ff7c80d5a161c7e1b5456628] https://lava.sirena.org.uk/scheduler/job/2169640
# bad: [445097729a995f87ff7c80d5a161c7e1b5456628] platform/x86: intel: punit_ipc: fix memory corruption
git bisect bad 445097729a995f87ff7c80d5a161c7e1b5456628
# test job: [ad3b2ce45cce79ddaff01c977d0867d079fa8349] https://lava.sirena.org.uk/scheduler/job/2169710
# good: [ad3b2ce45cce79ddaff01c977d0867d079fa8349] kernel.h: Move ARRAY_SIZE() to a separate header
git bisect good ad3b2ce45cce79ddaff01c977d0867d079fa8349
# test job: [de07228674e9cee27f679ebcf8562f7e3b2cda21] https://lava.sirena.org.uk/scheduler/job/2169731
# good: [de07228674e9cee27f679ebcf8562f7e3b2cda21] mptcp: decouple mptcp fastclose from tcp close
git bisect good de07228674e9cee27f679ebcf8562f7e3b2cda21
# test job: [dca2a95e4ed753ed33da11d7bb78157441d69bad] https://lava.sirena.org.uk/scheduler/job/2169741
# good: [dca2a95e4ed753ed33da11d7bb78157441d69bad] pmdomain: samsung: plug potential memleak during probe
git bisect good dca2a95e4ed753ed33da11d7bb78157441d69bad
# test job: [61717acddadf660fa6969027bfa0d6fd38f8e3e2] https://lava.sirena.org.uk/scheduler/job/2170912
# bad: [61717acddadf660fa6969027bfa0d6fd38f8e3e2] mm/memory: do not populate page table entries beyond i_size
git bisect bad 61717acddadf660fa6969027bfa0d6fd38f8e3e2
# test job: [0de5c14c8e753a547d158530c37efb245f7b40ec] https://lava.sirena.org.uk/scheduler/job/2171171
# good: [0de5c14c8e753a547d158530c37efb245f7b40ec] pmdomain: imx: Fix reference count leak in imx_gpc_remove
git bisect good 0de5c14c8e753a547d158530c37efb245f7b40ec
# test job: [1457e122dd70574a0ca895eea6d6c12ba91312bf] https://lava.sirena.org.uk/scheduler/job/2171268
# good: [1457e122dd70574a0ca895eea6d6c12ba91312bf] filemap: cap PTE range to be created to allowed zero fill in folio_map_range()
git bisect good 1457e122dd70574a0ca895eea6d6c12ba91312bf
# first bad commit: [61717acddadf660fa6969027bfa0d6fd38f8e3e2] mm/memory: do not populate page table entries beyond i_size
#585 lore raw
Quoted 38 lines · Mark Brown
Quoted 4 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing a bunch of systems start failing with this release, they start OOMing when previously they ran OK. Most of them aren't exactly overburned with memory. These failures bisect to 61717acddadf66 (mm/memory: do not populate page table entries beyond i_size), sample bisect from one of the systems including links to test jobs (the bisects for other systems/test sets look very similar):

# bad: [abd89c70c9382759c14c5e7e0b383c2a19594c5c] Linux 6.1.159-rc1
# good: [f6e38ae624cf7eb96fb444a8ca2d07caa8d9c8fe] Linux 6.1.158
git bisect start 'abd89c70c9382759c14c5e7e0b383c2a19594c5c' 'f6e38ae624cf7eb96fb444a8ca2d07caa8d9c8fe'

# test job: [abd89c70c9382759c14c5e7e0b383c2a19594c5c] https://lava.sirena.org.uk/scheduler/job/2168338
# bad: [abd89c70c9382759c14c5e7e0b383c2a19594c5c] Linux 6.1.159-rc1
git bisect bad abd89c70c9382759c14c5e7e0b383c2a19594c5c
# test job: [43c650106e8558fa7cfec5a2e9c8de29233b6552] https://lava.sirena.org.uk/scheduler/job/2168373
# good: [43c650106e8558fa7cfec5a2e9c8de29233b6552] rtc: pcf2127: clear minute/second interrupt
git bisect good 43c650106e8558fa7cfec5a2e9c8de29233b6552
# test job: [b56fbe428919e8c1a548f331d20b8c4608008845] https://lava.sirena.org.uk/scheduler/job/2168393
# good: [b56fbe428919e8c1a548f331d20b8c4608008845] net/mlx5e: Preserve shared buffer capacity during headroom updates
git bisect good b56fbe428919e8c1a548f331d20b8c4608008845
# test job: [445097729a995f87ff7c80d5a161c7e1b5456628] https://lava.sirena.org.uk/scheduler/job/2169640
# bad: [445097729a995f87ff7c80d5a161c7e1b5456628] platform/x86: intel: punit_ipc: fix memory corruption
git bisect bad 445097729a995f87ff7c80d5a161c7e1b5456628
# test job: [ad3b2ce45cce79ddaff01c977d0867d079fa8349] https://lava.sirena.org.uk/scheduler/job/2169710
# good: [ad3b2ce45cce79ddaff01c977d0867d079fa8349] kernel.h: Move ARRAY_SIZE() to a separate header
git bisect good ad3b2ce45cce79ddaff01c977d0867d079fa8349
# test job: [de07228674e9cee27f679ebcf8562f7e3b2cda21] https://lava.sirena.org.uk/scheduler/job/2169731
# good: [de07228674e9cee27f679ebcf8562f7e3b2cda21] mptcp: decouple mptcp fastclose from tcp close
git bisect good de07228674e9cee27f679ebcf8562f7e3b2cda21
# test job: [dca2a95e4ed753ed33da11d7bb78157441d69bad] https://lava.sirena.org.uk/scheduler/job/2169741
# good: [dca2a95e4ed753ed33da11d7bb78157441d69bad] pmdomain: samsung: plug potential memleak during probe
git bisect good dca2a95e4ed753ed33da11d7bb78157441d69bad
# test job: [61717acddadf660fa6969027bfa0d6fd38f8e3e2] https://lava.sirena.org.uk/scheduler/job/2170912
# bad: [61717acddadf660fa6969027bfa0d6fd38f8e3e2] mm/memory: do not populate page table entries beyond i_size
Quoted 8 lines
git bisect bad 61717acddadf660fa6969027bfa0d6fd38f8e3e2
# test job: [0de5c14c8e753a547d158530c37efb245f7b40ec] https://lava.sirena.org.uk/scheduler/job/2171171
# good: [0de5c14c8e753a547d158530c37efb245f7b40ec] pmdomain: imx: Fix reference count leak in imx_gpc_remove
git bisect good 0de5c14c8e753a547d158530c37efb245f7b40ec
# test job: [1457e122dd70574a0ca895eea6d6c12ba91312bf] https://lava.sirena.org.uk/scheduler/job/2171268
# good: [1457e122dd70574a0ca895eea6d6c12ba91312bf] filemap: cap PTE range to be created to allowed zero fill in folio_map_range()
git bisect good 1457e122dd70574a0ca895eea6d6c12ba91312bf
# first bad commit: [61717acddadf660fa6969027bfa0d6fd38f8e3e2] mm/memory: do not populate page table entries beyond i_size

This patch "mm/memory: do not populate page table entries beyond i_size" also causes an Oops on RISC-V.

[    5.940397] Unable to handle kernel paging request at virtual address ffffffc6fe000028 [    5.947616] Oops [#1]
[    5.949814] Modules linked in:
[    5.952857] CPU: 0 PID: 147 Comm: exe Not tainted 6.1.158 #2
[    5.958500] Hardware name: SiFive HiFive Unmatched A00 (DT)
[    5.964060] epc : _raw_spin_lock+0x12/0x84
[    5.968141]  ra : filemap_map_pages+0x23e/0x524
[    5.972658] epc : ffffffff80b4d500 ra : ffffffff801e3d60 sp : ffffffd88c923c80 [    5.979870]  gp : ffffffff81a3f228 tp : ffffffd88c8c1a80 t0 : 0000000000000000 [    5.987078]  t1 : 0000000000000000 t2 : 0000000000000000 s0 : ffffffd88c923c90 [    5.994287]  s1 : 0000000000000000 a0 : ffffffc6fe000028 a1 : ffffffc800000000 [    6.001497]  a2 : 0000000100000000 a3 : 0000000000080000 a4 : 0000000000000ff8 [    6.008706]  a5 : 0000000000010000 a6 : ffffffff813d5858 a7 : 0000000000000000 [    6.015915]  s2 : 0000003f807ff000 s3 : ffffffd88c923d98 s4 : 0000000000000000 [    6.023125]  s5 : ffffffd77fe00ff8 s6 : 0000000000000000 s7 : 0000000000000000 [    6.030333]  s8 : 0000003f80829008 s9 : fffffffffffffffe s10: ffffffd880f866f8 [    6.037543]  s11: ffffffc7020b67c0 t3 : ffffffffffffffff t4 : 0000003f807ff000 [    6.044752]  t5 : 0000000000000000 t6 : 0000000000000000
[    6.050047] status: 0000000200000120 badaddr: ffffffc6fe000028 cause: 000000000000000f [    6.057957] [<ffffffff80b4d500>] _raw_spin_lock+0x12/0x84
[    6.063338] [<ffffffff801e3d60>] filemap_map_pages+0x23e/0x524
[    6.069157] [<ffffffff80229ffc>] __handle_mm_fault+0xd44/0x1818
[    6.075064] [<ffffffff8022ab84>] handle_mm_fault+0xb4/0x1b8
[    6.080622] [<ffffffff8000cd54>] do_page_fault+0x142/0x462
[    6.086095] [<ffffffff80003f20>] ret_from_exception+0x0/0x16
[    6.091798] ---[ end trace 0000000000000000 ]---

author maintainer
#586 lore raw
Quoted 81 lines · Ron Economos
Quoted 38 lines · Mark Brown
Quoted 4 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

I'm seeing a bunch of systems start failing with this release, they start OOMing when previously they ran OK. Most of them aren't exactly overburned with memory. These failures bisect to 61717acddadf66 (mm/memory: do not populate page table entries beyond i_size), sample bisect from one of the systems including links to test jobs (the bisects for other systems/test sets look very similar):

# bad: [abd89c70c9382759c14c5e7e0b383c2a19594c5c] Linux 6.1.159-rc1
# good: [f6e38ae624cf7eb96fb444a8ca2d07caa8d9c8fe] Linux 6.1.158
git bisect start 'abd89c70c9382759c14c5e7e0b383c2a19594c5c' 'f6e38ae624cf7eb96fb444a8ca2d07caa8d9c8fe'

# test job: [abd89c70c9382759c14c5e7e0b383c2a19594c5c] https://lava.sirena.org.uk/scheduler/job/2168338
# bad: [abd89c70c9382759c14c5e7e0b383c2a19594c5c] Linux 6.1.159-rc1
git bisect bad abd89c70c9382759c14c5e7e0b383c2a19594c5c
# test job: [43c650106e8558fa7cfec5a2e9c8de29233b6552] https://lava.sirena.org.uk/scheduler/job/2168373
# good: [43c650106e8558fa7cfec5a2e9c8de29233b6552] rtc: pcf2127: clear minute/second interrupt
git bisect good 43c650106e8558fa7cfec5a2e9c8de29233b6552
# test job: [b56fbe428919e8c1a548f331d20b8c4608008845] https://lava.sirena.org.uk/scheduler/job/2168393
# good: [b56fbe428919e8c1a548f331d20b8c4608008845] net/mlx5e: Preserve shared buffer capacity during headroom updates
git bisect good b56fbe428919e8c1a548f331d20b8c4608008845
# test job: [445097729a995f87ff7c80d5a161c7e1b5456628] https://lava.sirena.org.uk/scheduler/job/2169640
# bad: [445097729a995f87ff7c80d5a161c7e1b5456628] platform/x86: intel: punit_ipc: fix memory corruption
git bisect bad 445097729a995f87ff7c80d5a161c7e1b5456628
# test job: [ad3b2ce45cce79ddaff01c977d0867d079fa8349] https://lava.sirena.org.uk/scheduler/job/2169710
# good: [ad3b2ce45cce79ddaff01c977d0867d079fa8349] kernel.h: Move ARRAY_SIZE() to a separate header
git bisect good ad3b2ce45cce79ddaff01c977d0867d079fa8349
# test job: [de07228674e9cee27f679ebcf8562f7e3b2cda21] https://lava.sirena.org.uk/scheduler/job/2169731
# good: [de07228674e9cee27f679ebcf8562f7e3b2cda21] mptcp: decouple mptcp fastclose from tcp close
git bisect good de07228674e9cee27f679ebcf8562f7e3b2cda21
# test job: [dca2a95e4ed753ed33da11d7bb78157441d69bad] https://lava.sirena.org.uk/scheduler/job/2169741
# good: [dca2a95e4ed753ed33da11d7bb78157441d69bad] pmdomain: samsung: plug potential memleak during probe
git bisect good dca2a95e4ed753ed33da11d7bb78157441d69bad
# test job: [61717acddadf660fa6969027bfa0d6fd38f8e3e2] https://lava.sirena.org.uk/scheduler/job/2170912
# bad: [61717acddadf660fa6969027bfa0d6fd38f8e3e2] mm/memory: do not populate page table entries beyond i_size
Quoted 8 lines
git bisect bad 61717acddadf660fa6969027bfa0d6fd38f8e3e2
# test job: [0de5c14c8e753a547d158530c37efb245f7b40ec] https://lava.sirena.org.uk/scheduler/job/2171171
# good: [0de5c14c8e753a547d158530c37efb245f7b40ec] pmdomain: imx: Fix reference count leak in imx_gpc_remove
git bisect good 0de5c14c8e753a547d158530c37efb245f7b40ec
# test job: [1457e122dd70574a0ca895eea6d6c12ba91312bf] https://lava.sirena.org.uk/scheduler/job/2171268
# good: [1457e122dd70574a0ca895eea6d6c12ba91312bf] filemap: cap PTE range to be created to allowed zero fill in folio_map_range()
git bisect good 1457e122dd70574a0ca895eea6d6c12ba91312bf
# first bad commit: [61717acddadf660fa6969027bfa0d6fd38f8e3e2] mm/memory: do not populate page table entries beyond i_size

This patch "mm/memory: do not populate page table entries beyond i_size" also causes an Oops on RISC-V.

[    5.940397] Unable to handle kernel paging request at virtual address ffffffc6fe000028
[    5.947616] Oops [#1]
[    5.949814] Modules linked in:
[    5.952857] CPU: 0 PID: 147 Comm: exe Not tainted 6.1.158 #2 [    5.958500] Hardware name: SiFive HiFive Unmatched A00 (DT) [    5.964060] epc : _raw_spin_lock+0x12/0x84
[    5.968141]  ra : filemap_map_pages+0x23e/0x524
[    5.972658] epc : ffffffff80b4d500 ra : ffffffff801e3d60 sp :
ffffffd88c923c80
[    5.979870]  gp : ffffffff81a3f228 tp : ffffffd88c8c1a80 t0 :
0000000000000000
[    5.987078]  t1 : 0000000000000000 t2 : 0000000000000000 s0 :
ffffffd88c923c90
[    5.994287]  s1 : 0000000000000000 a0 : ffffffc6fe000028 a1 :
ffffffc800000000
[    6.001497]  a2 : 0000000100000000 a3 : 0000000000080000 a4 :
0000000000000ff8
[    6.008706]  a5 : 0000000000010000 a6 : ffffffff813d5858 a7 :
0000000000000000
[    6.015915]  s2 : 0000003f807ff000 s3 : ffffffd88c923d98 s4 :
0000000000000000
[    6.023125]  s5 : ffffffd77fe00ff8 s6 : 0000000000000000 s7 :
0000000000000000
[    6.030333]  s8 : 0000003f80829008 s9 : fffffffffffffffe s10:
ffffffd880f866f8
[    6.037543]  s11: ffffffc7020b67c0 t3 : ffffffffffffffff t4 :
0000003f807ff000
[    6.044752]  t5 : 0000000000000000 t6 : 0000000000000000 [    6.050047] status: 0000000200000120 badaddr: ffffffc6fe000028 cause:

Quoted 8 lines

000000000000000f
[    6.057957] [<ffffffff80b4d500>] _raw_spin_lock+0x12/0x84 [    6.063338] [<ffffffff801e3d60>] filemap_map_pages+0x23e/0x524 [    6.069157] [<ffffffff80229ffc>] __handle_mm_fault+0xd44/0x1818 [    6.075064] [<ffffffff8022ab84>] handle_mm_fault+0xb4/0x1b8 [    6.080622] [<ffffffff8000cd54>] do_page_fault+0x142/0x462 [    6.086095] [<ffffffff80003f20>] ret_from_exception+0x0/0x16 [    6.091798] ---[ end trace 0000000000000000 ]---

Thanks all, I'll go drop this now and push out a -rc2 soon.

greg k-h

#587 lore raw
In reply to Mark Brown
Quoted 7 lines · Mark Brown
Quoted 4 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 6.1.159 release. There are 568 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Quoted 6 lines

I'm seeing a bunch of systems start failing with this release, they start OOMing when previously they ran OK. Most of them aren't exactly overburned with memory. These failures bisect to 61717acddadf66 (mm/memory: do not populate page table entries beyond i_size), sample bisect from one of the systems including links to test jobs (the bisects for other systems/test sets look very similar):

As Mark’s reported, the LKFT reproduced the same regression on Juno-r2, FVP and qemu-arm64 during boot.

### boot log

<0>[   42.433802] Internal error: Oops: 0000000096000046 [#1] PREEMPT SMP"}
<4>[   42.434147] Modules linked in: fuse drm ip_tables x_tables"}
<4>[   42.434573] CPU: 1 PID: 374 Comm: skipgen Not tainted 6.1.159-rc1 #1"}
<4>[   42.435344] Hardware name: linux,dummy-virt (DT)"}
<4>[   42.436140] pstate: 42402009 (nZcv daif +PAN -UAO +TCO -DIT
-SSBS BTYPE=--)"}
<4>[   42.437004] pc : _raw_spin_lock+0x3c/0x8c"}
<4>[   42.438173] lr : _raw_spin_lock+0x28/0x8c"}

Boot regression: Juno-r2, FVP, Internal error: Oops: _raw_spin_lock filemap_map_pages

## commit point to,
mm/memory: do not populate page table entries beyond i_size [ Upstream commit 74207de2ba10c2973334906822dc94d2e859ffc5 ]

### Links,
- https://regressions.linaro.org/lkft/linux-stable-rc-linux-6.1.y/v6.1.158-569-gabd89c70c938/log-parser-test/internal-error-oops-Oops_PREEMPT_SMP___raw_spin_lock-a94221fb/
- https://lkft.validation.linaro.org/scheduler/job/8540690#L1835
- https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/36LJeldPNf0LMr3PSr7WYaPqCFa

--
Linaro LKFT
https://lkft.linaro.org