System runs at minimum performance, once powercap RAPL package domain
enabled flag is changed from 1 to 0 to 1.
Setting RAPL package domain enabled flag to 0, results in setting of
power limit 4 (PL4) MSR 0x601 to 0. This implies disabling PL4 limit.
The PL4 limit controls the peak power. So setting 0, results in some
undesirable performance, which depends on hardware implementation.
Even worse, when the enabled flag is set to 1 again. This will set PL4
MSR value to 0x01, which means reduce peak power to 0.125W. This will
force system to run at the lowest possible performance on every PL4
supported system.
Setting enabled flag should only affect the "enable" bit, not other
bits. Here it is changing power limit.
This is caused by a change which assumes that there is an enable bit in
the PL4 MSR like other power limits. Although PL4 enable/disable bit is
present with TPMI RAPL interface, it is not present with the MSR
interface.
There is a rapl_primitive_info defined for non existent PL4 enable bit
and then it is used with the commit 9050a9cd5e4c ("powercap: intel_rapl:
Cleanup Power Limits support") to enable PL4. This is wrong, hence remove
this rapl primitive for PL4. Also in the function
rapl_detect_powerlimit(), PL_ENABLE is used to check for the presence of
power limits. Replace PL_ENABLE with PL_LIMIT, as PL_LIMIT must be
present. Without this change, PL4 controls will not be available in the
sysfs once rapl primitive for PL4 is removed.
Fixes: 9050a9cd5e4c ("powercap: intel_rapl: Cleanup Power Limits support")
Suggested-by: Zhang Rui <rui.zhang(a)intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada(a)linux.intel.com>
Tested-by: Sumeet Pawnikar <sumeet.r.pawnikar(a)intel.com>
Cc: stable(a)vger.kernel.org # v6.5+
---
v2
- Remove RAPL primitive for PL4 instead as suggedted by Rui
- Replace PL_ENABLE with PL_LIMIT for domain detect
- Update change log and header
drivers/powercap/intel_rapl_common.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c
index 5c2e6d5eea2a..40a2cc649c79 100644
--- a/drivers/powercap/intel_rapl_common.c
+++ b/drivers/powercap/intel_rapl_common.c
@@ -658,8 +658,6 @@ static struct rapl_primitive_info rpi_msr[NR_RAPL_PRIMITIVES] = {
RAPL_DOMAIN_REG_LIMIT, ARBITRARY_UNIT, 0),
[PL2_CLAMP] = PRIMITIVE_INFO_INIT(PL2_CLAMP, POWER_LIMIT2_CLAMP, 48,
RAPL_DOMAIN_REG_LIMIT, ARBITRARY_UNIT, 0),
- [PL4_ENABLE] = PRIMITIVE_INFO_INIT(PL4_ENABLE, POWER_LIMIT4_MASK, 0,
- RAPL_DOMAIN_REG_PL4, ARBITRARY_UNIT, 0),
[TIME_WINDOW1] = PRIMITIVE_INFO_INIT(TIME_WINDOW1, TIME_WINDOW1_MASK, 17,
RAPL_DOMAIN_REG_LIMIT, TIME_UNIT, 0),
[TIME_WINDOW2] = PRIMITIVE_INFO_INIT(TIME_WINDOW2, TIME_WINDOW2_MASK, 49,
@@ -1458,7 +1456,7 @@ static void rapl_detect_powerlimit(struct rapl_domain *rd)
}
}
- if (rapl_read_pl_data(rd, i, PL_ENABLE, false, &val64))
+ if (rapl_read_pl_data(rd, i, PL_LIMIT, false, &val64))
rd->rpl[i].name = NULL;
}
}
--
2.34.1
System runs at minimum performance, once powercap RAPL package domain
"enabled" flag is toggled.
Setting RAPL package domain enabled flag to 0, results in setting of
power limit 4 (PL4) MSR 0x601 to 0. This implies disabling PL4 limit.
The PL4 limit controls the peak power. This can significantly change
the performance. Even worse, when the enabled flag is set to 1 again.
This will set PL4 MSR value to 0x01, which means reduce peak power to
0.125W. This will force the system to run at the lowest possible
performance.
This is caused by a change which assumes that there is an enable bit
in the PL4 MSR like other power limits.
In functions set_floor_freq_default() and rapl_remove_package(), call
rapl_write_pl_data with PL_ENABLE and PL_CLAMP for only power limit 1
and 2. Similarly don't read PL_ENABLE for PL4 to check the presence of
power limit 4. Power limit 4 support is based on CPU model in this
driver. No additional checks can be done.
Fixes: 9050a9cd5e4c ("powercap: intel_rapl: Cleanup Power Limits support")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada(a)linux.intel.com>
Cc: stable(a)vger.kernel.org # v6.5+
---
drivers/powercap/intel_rapl_common.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c
index 5c2e6d5eea2a..0afedf7ad872 100644
--- a/drivers/powercap/intel_rapl_common.c
+++ b/drivers/powercap/intel_rapl_common.c
@@ -184,8 +184,6 @@ static int get_pl_prim(struct rapl_domain *rd, int pl, enum pl_prims prim)
case POWER_LIMIT4:
if (prim == PL_LIMIT)
return POWER_LIMIT4;
- if (prim == PL_ENABLE)
- return PL4_ENABLE;
/* PL4 would be around two times PL2, use same prim as PL2. */
if (prim == PL_MAX_POWER)
return MAX_POWER;
@@ -1033,17 +1031,13 @@ static void package_power_limit_irq_restore(struct rapl_package *rp)
static void set_floor_freq_default(struct rapl_domain *rd, bool mode)
{
- int i;
-
/* always enable clamp such that p-state can go below OS requested
* range. power capping priority over guranteed frequency.
*/
rapl_write_pl_data(rd, POWER_LIMIT1, PL_CLAMP, mode);
- for (i = POWER_LIMIT2; i < NR_POWER_LIMITS; i++) {
- rapl_write_pl_data(rd, i, PL_ENABLE, mode);
- rapl_write_pl_data(rd, i, PL_CLAMP, mode);
- }
+ rapl_write_pl_data(rd, POWER_LIMIT2, PL_ENABLE, mode);
+ rapl_write_pl_data(rd, POWER_LIMIT2, PL_CLAMP, mode);
}
static void set_floor_freq_atom(struct rapl_domain *rd, bool enable)
@@ -1458,7 +1452,7 @@ static void rapl_detect_powerlimit(struct rapl_domain *rd)
}
}
- if (rapl_read_pl_data(rd, i, PL_ENABLE, false, &val64))
+ if (i != POWER_LIMIT4 && rapl_read_pl_data(rd, i, PL_ENABLE, false, &val64))
rd->rpl[i].name = NULL;
}
}
@@ -1510,7 +1504,7 @@ void rapl_remove_package(struct rapl_package *rp)
for (rd = rp->domains; rd < rp->domains + rp->nr_domains; rd++) {
int i;
- for (i = POWER_LIMIT1; i < NR_POWER_LIMITS; i++) {
+ for (i = POWER_LIMIT1; i <= POWER_LIMIT2; i++) {
rapl_write_pl_data(rd, i, PL_ENABLE, 0);
rapl_write_pl_data(rd, i, PL_CLAMP, 0);
}
--
2.34.1
This is the start of the stable review cycle for the 5.15.131 release.
There are 28 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 Wed, 06 Sep 2023 18:29:29 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.131-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.15.131-rc1
Marco Felsch <m.felsch(a)pengutronix.de>
usb: typec: tcpci: clear the fault status bit
Xin Ji <xji(a)analogixsemi.com>
usb: typec: tcpci: move tcpci.h to include/linux/usb/
Mario Limonciello <mario.limonciello(a)amd.com>
pinctrl: amd: Don't show `Invalid config param` errors
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
Badhri Jagan Sridharan <badhri(a)google.com>
tcpm: Avoid soft reset when partner does not support get_status
Juerg Haefliger <juerg.haefliger(a)canonical.com>
fsi: master-ast-cf: Add MODULE_FIRMWARE macro
Wang Ming <machel(a)vivo.com>
firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
serial: sc16is7xx: fix bug when first setting GPIO direction
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
serial: sc16is7xx: fix broken port 0 uart init
Johan Hovold <johan+linaro(a)kernel.org>
serial: qcom-geni: fix opp vote on shutdown
Deren Wu <deren.wu(a)mediatek.com>
wifi: mt76: mt7921: do not support one stream on secondary antenna only
Zheng Wang <zyytlz.wz(a)163.com>
Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition
Nam Cao <namcaov(a)gmail.com>
staging: rtl8712: fix race condition
Aaron Armstrong Skomra <aaron.skomra(a)wacom.com>
HID: wacom: remove the battery when the EKR is off
Xu Yang <xu.yang_2(a)nxp.com>
usb: chipidea: imx: improve logic if samsung,picophy-* parameter is 0
Luke Lu <luke.lu(a)libre.computer>
usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
Takashi Iwai <tiwai(a)suse.de>
ALSA: usb-audio: Fix init call orders for UAC1
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add FOXCONN T99W368/T99W373 product
Martin Kohn <m.kohn(a)welotec.com>
USB: serial: option: add Quectel EM05G variant (0x030e)
Christoph Hellwig <hch(a)lst.de>
modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
Christoph Hellwig <hch(a)lst.de>
rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
Christoph Hellwig <hch(a)lst.de>
net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index
Christoph Hellwig <hch(a)lst.de>
mmc: au1xmmc: force non-modular build and remove symbol_get usage
Arnd Bergmann <arnd(a)arndb.de>
ARM: pxa: remove use of symbol_get()
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: replace one-element array with flex-array member in struct smb2_ea_info
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix wrong DataOffset validation of create context
Gao Xiang <hsiangkao(a)linux.alibaba.com>
erofs: ensure that the post-EOF tails are all zeroed
-------------
Diffstat:
Makefile | 4 ++--
arch/arm/mach-pxa/sharpsl_pm.c | 2 --
arch/arm/mach-pxa/spitz.c | 14 +-----------
arch/mips/alchemy/devboards/db1000.c | 8 +------
arch/mips/alchemy/devboards/db1200.c | 19 ++--------------
arch/mips/alchemy/devboards/db1300.c | 10 +--------
drivers/bluetooth/btsdio.c | 1 +
drivers/firmware/stratix10-svc.c | 2 +-
drivers/fsi/fsi-master-ast-cf.c | 1 +
drivers/hid/wacom.h | 1 +
drivers/hid/wacom_sys.c | 25 ++++++++++++++++++----
drivers/hid/wacom_wac.c | 1 +
drivers/hid/wacom_wac.h | 1 +
drivers/mmc/host/Kconfig | 5 +++--
drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +-
drivers/pinctrl/pinctrl-amd.c | 4 ++--
drivers/rtc/rtc-ds1685.c | 2 +-
drivers/staging/rtl8712/os_intfs.c | 1 +
drivers/staging/rtl8712/usb_intf.c | 1 -
drivers/tty/serial/qcom_geni_serial.c | 5 +++++
drivers/tty/serial/sc16is7xx.c | 17 ++++++++++++++-
drivers/usb/chipidea/ci_hdrc_imx.c | 10 +++++----
drivers/usb/chipidea/usbmisc_imx.c | 6 ++++--
drivers/usb/dwc3/dwc3-meson-g12a.c | 6 ++++++
drivers/usb/serial/option.c | 7 ++++++
drivers/usb/typec/tcpm/tcpci.c | 7 ++++--
drivers/usb/typec/tcpm/tcpci_maxim.c | 3 +--
drivers/usb/typec/tcpm/tcpci_mt6360.c | 3 +--
drivers/usb/typec/tcpm/tcpci_rt1711h.c | 2 +-
drivers/usb/typec/tcpm/tcpm.c | 7 ++++++
fs/erofs/zdata.c | 2 ++
fs/ksmbd/oplock.c | 2 +-
fs/ksmbd/smb2pdu.c | 2 +-
fs/ksmbd/smb2pdu.h | 2 +-
fs/nilfs2/alloc.c | 3 ++-
fs/nilfs2/inode.c | 7 ++++--
fs/nilfs2/segment.c | 5 +++++
.../usb/typec/tcpm => include/linux/usb}/tcpci.h | 2 ++
kernel/module.c | 14 +++++++++---
sound/usb/stream.c | 11 +++++++++-
41 files changed, 142 insertions(+), 87 deletions(-)
From: Zi Yan <ziy(a)nvidia.com>
When dealing with hugetlb pages, manipulating struct page pointers
directly can get to wrong struct page, since struct page is not guaranteed
to be contiguous on SPARSEMEM without VMEMMAP. Use nth_page() to handle
it properly.
Fixes: eeb0efd071d8 ("mm,memory_hotplug: fix scan_movable_pages() for gigantic hugepages")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Zi Yan <ziy(a)nvidia.com>
Reviewed-by: Muchun Song <songmuchun(a)bytedance.com>
---
mm/memory_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 1b03f4ec6fd2..3b301c4023ff 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1689,7 +1689,7 @@ static int scan_movable_pages(unsigned long start, unsigned long end,
*/
if (HPageMigratable(head))
goto found;
- skip = compound_nr(head) - (page - head);
+ skip = compound_nr(head) - (pfn - page_to_pfn(head));
pfn += skip - 1;
}
return -ENOENT;
--
2.40.1
This is the start of the stable review cycle for the 6.4.15 release.
There are 32 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 Wed, 06 Sep 2023 18:29:29 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.4.15-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.4.15-rc1
Mario Limonciello <mario.limonciello(a)amd.com>
pinctrl: amd: Don't show `Invalid config param` errors
Marco Felsch <m.felsch(a)pengutronix.de>
usb: typec: tcpci: clear the fault status bit
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
dt-bindings: sc16is7xx: Add property to change GPIO function
Badhri Jagan Sridharan <badhri(a)google.com>
tcpm: Avoid soft reset when partner does not support get_status
Juerg Haefliger <juerg.haefliger(a)canonical.com>
fsi: master-ast-cf: Add MODULE_FIRMWARE macro
Wang Ming <machel(a)vivo.com>
firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
serial: sc16is7xx: fix bug when first setting GPIO direction
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
serial: sc16is7xx: fix broken port 0 uart init
Johan Hovold <johan+linaro(a)kernel.org>
serial: qcom-geni: fix opp vote on shutdown
Sven Eckelmann <sven(a)narfation.org>
wifi: ath11k: Cleanup mac80211 references on failure during tx_complete
Sven Eckelmann <sven(a)narfation.org>
wifi: ath11k: Don't drop tx_status when peer cannot be found
Sascha Hauer <s.hauer(a)pengutronix.de>
wifi: rtw88: usb: kill and free rx urbs on probe failure
Deren Wu <deren.wu(a)mediatek.com>
wifi: mt76: mt7921: fix skb leak by txs missing in AMSDU
Deren Wu <deren.wu(a)mediatek.com>
wifi: mt76: mt7921: do not support one stream on secondary antenna only
Nam Cao <namcaov(a)gmail.com>
staging: rtl8712: fix race condition
Aaron Armstrong Skomra <aaron.skomra(a)wacom.com>
HID: wacom: remove the battery when the EKR is off
Xu Yang <xu.yang_2(a)nxp.com>
usb: chipidea: imx: improve logic if samsung,picophy-* parameter is 0
Luke Lu <luke.lu(a)libre.computer>
usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
Takashi Iwai <tiwai(a)suse.de>
ALSA: usb-audio: Fix init call orders for UAC1
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add FOXCONN T99W368/T99W373 product
Martin Kohn <m.kohn(a)welotec.com>
USB: serial: option: add Quectel EM05G variant (0x030e)
Christoph Hellwig <hch(a)lst.de>
modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
Christoph Hellwig <hch(a)lst.de>
rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
Christoph Hellwig <hch(a)lst.de>
net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index
Christoph Hellwig <hch(a)lst.de>
mmc: au1xmmc: force non-modular build and remove symbol_get usage
Arnd Bergmann <arnd(a)arndb.de>
ARM: pxa: remove use of symbol_get()
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: reduce descriptor size if remaining bytes is less than request size
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: replace one-element array with flex-array member in struct smb2_ea_info
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob()
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix wrong DataOffset validation of create context
Gao Xiang <xiang(a)kernel.org>
erofs: ensure that the post-EOF tails are all zeroed
-------------
Diffstat:
.../devicetree/bindings/serial/nxp,sc16is7xx.txt | 46 ++++++++++++++++++++++
Makefile | 4 +-
arch/arm/mach-pxa/sharpsl_pm.c | 2 -
arch/arm/mach-pxa/spitz.c | 14 +------
arch/mips/alchemy/devboards/db1000.c | 8 +---
arch/mips/alchemy/devboards/db1200.c | 19 +--------
arch/mips/alchemy/devboards/db1300.c | 10 +----
drivers/firmware/stratix10-svc.c | 2 +-
drivers/fsi/fsi-master-ast-cf.c | 1 +
drivers/hid/wacom.h | 1 +
drivers/hid/wacom_sys.c | 25 ++++++++++--
drivers/hid/wacom_wac.c | 1 +
drivers/hid/wacom_wac.h | 1 +
drivers/mmc/host/Kconfig | 5 ++-
drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 2 +-
drivers/net/wireless/ath/ath11k/dp_tx.c | 10 ++---
.../net/wireless/mediatek/mt76/mt76_connac_mac.c | 7 +++-
drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +-
drivers/net/wireless/realtek/rtw88/usb.c | 5 ++-
drivers/pinctrl/pinctrl-amd.c | 4 +-
drivers/rtc/rtc-ds1685.c | 2 +-
drivers/staging/rtl8712/os_intfs.c | 1 +
drivers/staging/rtl8712/usb_intf.c | 1 -
drivers/tty/serial/qcom_geni_serial.c | 5 +++
drivers/tty/serial/sc16is7xx.c | 17 +++++++-
drivers/usb/chipidea/ci_hdrc_imx.c | 10 +++--
drivers/usb/chipidea/usbmisc_imx.c | 6 ++-
drivers/usb/dwc3/dwc3-meson-g12a.c | 6 +++
drivers/usb/serial/option.c | 7 ++++
drivers/usb/typec/tcpm/tcpci.c | 4 ++
drivers/usb/typec/tcpm/tcpm.c | 7 ++++
fs/erofs/zdata.c | 2 +
fs/nilfs2/alloc.c | 3 +-
fs/nilfs2/inode.c | 7 +++-
fs/smb/server/auth.c | 3 ++
fs/smb/server/oplock.c | 2 +-
fs/smb/server/smb2pdu.c | 2 +-
fs/smb/server/smb2pdu.h | 2 +-
fs/smb/server/transport_rdma.c | 25 ++++++++----
include/linux/usb/tcpci.h | 1 +
kernel/module/main.c | 14 +++++--
sound/usb/stream.c | 11 +++++-
42 files changed, 212 insertions(+), 95 deletions(-)
This is the start of the stable review cycle for the 6.1.52 release.
There are 31 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 Wed, 06 Sep 2023 18:29:29 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.52-rc1…
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
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.1.52-rc1
Mario Limonciello <mario.limonciello(a)amd.com>
pinctrl: amd: Don't show `Invalid config param` errors
Marco Felsch <m.felsch(a)pengutronix.de>
usb: typec: tcpci: clear the fault status bit
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
dt-bindings: sc16is7xx: Add property to change GPIO function
Badhri Jagan Sridharan <badhri(a)google.com>
tcpm: Avoid soft reset when partner does not support get_status
Juerg Haefliger <juerg.haefliger(a)canonical.com>
fsi: master-ast-cf: Add MODULE_FIRMWARE macro
Wang Ming <machel(a)vivo.com>
firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
serial: sc16is7xx: fix bug when first setting GPIO direction
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
serial: sc16is7xx: fix broken port 0 uart init
Johan Hovold <johan+linaro(a)kernel.org>
serial: qcom-geni: fix opp vote on shutdown
Deren Wu <deren.wu(a)mediatek.com>
wifi: mt76: mt7921: fix skb leak by txs missing in AMSDU
Deren Wu <deren.wu(a)mediatek.com>
wifi: mt76: mt7921: do not support one stream on secondary antenna only
Zheng Wang <zyytlz.wz(a)163.com>
Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition
Nam Cao <namcaov(a)gmail.com>
staging: rtl8712: fix race condition
Aaron Armstrong Skomra <aaron.skomra(a)wacom.com>
HID: wacom: remove the battery when the EKR is off
Xu Yang <xu.yang_2(a)nxp.com>
usb: chipidea: imx: improve logic if samsung,picophy-* parameter is 0
Luke Lu <luke.lu(a)libre.computer>
usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
Takashi Iwai <tiwai(a)suse.de>
ALSA: usb-audio: Fix init call orders for UAC1
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add FOXCONN T99W368/T99W373 product
Martin Kohn <m.kohn(a)welotec.com>
USB: serial: option: add Quectel EM05G variant (0x030e)
Christoph Hellwig <hch(a)lst.de>
modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
Christoph Hellwig <hch(a)lst.de>
rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
Christoph Hellwig <hch(a)lst.de>
net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index
Christoph Hellwig <hch(a)lst.de>
mmc: au1xmmc: force non-modular build and remove symbol_get usage
Arnd Bergmann <arnd(a)arndb.de>
ARM: pxa: remove use of symbol_get()
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: reduce descriptor size if remaining bytes is less than request size
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: replace one-element array with flex-array member in struct smb2_ea_info
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob()
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix wrong DataOffset validation of create context
Gao Xiang <xiang(a)kernel.org>
erofs: ensure that the post-EOF tails are all zeroed
-------------
Diffstat:
.../devicetree/bindings/serial/nxp,sc16is7xx.txt | 46 ++++++++++++++++++++++
Makefile | 4 +-
arch/arm/mach-pxa/sharpsl_pm.c | 2 -
arch/arm/mach-pxa/spitz.c | 14 +------
arch/mips/alchemy/devboards/db1000.c | 8 +---
arch/mips/alchemy/devboards/db1200.c | 19 +--------
arch/mips/alchemy/devboards/db1300.c | 10 +----
drivers/bluetooth/btsdio.c | 1 +
drivers/firmware/stratix10-svc.c | 2 +-
drivers/fsi/fsi-master-ast-cf.c | 1 +
drivers/hid/wacom.h | 1 +
drivers/hid/wacom_sys.c | 25 ++++++++++--
drivers/hid/wacom_wac.c | 1 +
drivers/hid/wacom_wac.h | 1 +
drivers/mmc/host/Kconfig | 5 ++-
drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 2 +-
.../net/wireless/mediatek/mt76/mt76_connac_mac.c | 7 +++-
drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +-
drivers/pinctrl/pinctrl-amd.c | 4 +-
drivers/rtc/rtc-ds1685.c | 2 +-
drivers/staging/rtl8712/os_intfs.c | 1 +
drivers/staging/rtl8712/usb_intf.c | 1 -
drivers/tty/serial/qcom_geni_serial.c | 5 +++
drivers/tty/serial/sc16is7xx.c | 17 +++++++-
drivers/usb/chipidea/ci_hdrc_imx.c | 10 +++--
drivers/usb/chipidea/usbmisc_imx.c | 6 ++-
drivers/usb/dwc3/dwc3-meson-g12a.c | 6 +++
drivers/usb/serial/option.c | 7 ++++
drivers/usb/typec/tcpm/tcpci.c | 4 ++
drivers/usb/typec/tcpm/tcpm.c | 7 ++++
fs/erofs/zdata.c | 2 +
fs/nilfs2/alloc.c | 3 +-
fs/nilfs2/inode.c | 7 +++-
fs/nilfs2/segment.c | 5 +++
fs/smb/server/auth.c | 3 ++
fs/smb/server/oplock.c | 2 +-
fs/smb/server/smb2pdu.c | 2 +-
fs/smb/server/smb2pdu.h | 2 +-
fs/smb/server/transport_rdma.c | 25 ++++++++----
include/linux/usb/tcpci.h | 1 +
kernel/module/main.c | 14 +++++--
sound/usb/stream.c | 11 +++++-
42 files changed, 209 insertions(+), 89 deletions(-)
With the recent removal of vm_dev from devres its memory is only freed
via the callback virtio_mmio_release_dev. However, this only takes
effect after device_add is called by register_virtio_device. Until then
it's an unmanaged resource and must be explicitly freed on error exit.
This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.
Cc: stable(a)vger.kernel.org
Fixes: 55c91fedd03d ("virtio-mmio: don't break lifecycle of vm_dev")
Signed-off-by: Maximilian Heyne <mheyne(a)amazon.de>
---
Please note that I have only compile tested this code.
drivers/virtio/virtio_mmio.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 97760f611295..b2a48d07e973 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -631,13 +631,16 @@ static int virtio_mmio_probe(struct platform_device *pdev)
spin_lock_init(&vm_dev->lock);
vm_dev->base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(vm_dev->base))
+ if (IS_ERR(vm_dev->base)) {
+ kfree(vm_dev);
return PTR_ERR(vm_dev->base);
+ }
/* Check magic value */
magic = readl(vm_dev->base + VIRTIO_MMIO_MAGIC_VALUE);
if (magic != ('v' | 'i' << 8 | 'r' << 16 | 't' << 24)) {
dev_warn(&pdev->dev, "Wrong magic value 0x%08lx!\n", magic);
+ kfree(vm_dev);
return -ENODEV;
}
@@ -646,6 +649,7 @@ static int virtio_mmio_probe(struct platform_device *pdev)
if (vm_dev->version < 1 || vm_dev->version > 2) {
dev_err(&pdev->dev, "Version %ld not supported!\n",
vm_dev->version);
+ kfree(vm_dev);
return -ENXIO;
}
@@ -655,6 +659,7 @@ static int virtio_mmio_probe(struct platform_device *pdev)
* virtio-mmio device with an ID 0 is a (dummy) placeholder
* with no function. End probing now with no error reported.
*/
+ kfree(vm_dev);
return -ENODEV;
}
vm_dev->vdev.id.vendor = readl(vm_dev->base + VIRTIO_MMIO_VENDOR_ID);
--
2.40.1
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
From: Zi Yan <ziy(a)nvidia.com>
__flush_dcache_pages() is called during hugetlb migration via
migrate_pages() -> migrate_hugetlbs() -> unmap_and_move_huge_page()
-> move_to_new_folio() -> flush_dcache_folio(). And with hugetlb and
without sparsemem vmemmap, struct page is not guaranteed to be contiguous
beyond a section. Use nth_page() instead.
Fixes: 15fa3e8e3269 ("mips: implement the new page table range API")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Zi Yan <ziy(a)nvidia.com>
---
arch/mips/mm/cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 02042100e267..7f830634dbe7 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -117,7 +117,7 @@ void __flush_dcache_pages(struct page *page, unsigned int nr)
* get faulted into the tlb (and thus flushed) anyways.
*/
for (i = 0; i < nr; i++) {
- addr = (unsigned long)kmap_local_page(page + i);
+ addr = (unsigned long)kmap_local_page(nth_page(page, i));
flush_data_cache_page(addr);
kunmap_local((void *)addr);
}
--
2.40.1