From: Kemeng Shi <shikemeng(a)huaweicloud.com>
[ Upstream commit d92109891f21cf367caa2cc6dff11a4411d917f4 ]
For case there is no more inodes for IO in io list from last wb_writeback,
We may bail out early even there is inode in dirty list should be written
back. Only bail out when we queued once to avoid missing dirtied inode.
This is from code reading...
Signed-off-by: Kemeng Shi <shikemeng(a)huaweicloud.com>
Link: https://lore.kernel.org/r/20240228091958.288260-3-shikemeng@huaweicloud.com
Reviewed-by: Jan Kara <jack(a)suse.cz>
[brauner(a)kernel.org: fold in memory corruption fix from Jan in [1]]
Link: https://lore.kernel.org/r/20240405132346.bid7gibby3lxxhez@quack3 [1]
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/fs-writeback.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 1767493dffda7..0a498bc60f557 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -2044,6 +2044,7 @@ static long wb_writeback(struct bdi_writeback *wb,
struct inode *inode;
long progress;
struct blk_plug plug;
+ bool queued = false;
blk_start_plug(&plug);
for (;;) {
@@ -2086,8 +2087,10 @@ static long wb_writeback(struct bdi_writeback *wb,
dirtied_before = jiffies;
trace_writeback_start(wb, work);
- if (list_empty(&wb->b_io))
+ if (list_empty(&wb->b_io)) {
queue_io(wb, work, dirtied_before);
+ queued = true;
+ }
if (work->sb)
progress = writeback_sb_inodes(work->sb, wb, work);
else
@@ -2102,7 +2105,7 @@ static long wb_writeback(struct bdi_writeback *wb,
* mean the overall work is done. So we keep looping as long
* as made some progress on cleaning pages or inodes.
*/
- if (progress) {
+ if (progress || !queued) {
spin_unlock(&wb->list_lock);
continue;
}
--
2.43.0
From: Kemeng Shi <shikemeng(a)huaweicloud.com>
[ Upstream commit d92109891f21cf367caa2cc6dff11a4411d917f4 ]
For case there is no more inodes for IO in io list from last wb_writeback,
We may bail out early even there is inode in dirty list should be written
back. Only bail out when we queued once to avoid missing dirtied inode.
This is from code reading...
Signed-off-by: Kemeng Shi <shikemeng(a)huaweicloud.com>
Link: https://lore.kernel.org/r/20240228091958.288260-3-shikemeng@huaweicloud.com
Reviewed-by: Jan Kara <jack(a)suse.cz>
[brauner(a)kernel.org: fold in memory corruption fix from Jan in [1]]
Link: https://lore.kernel.org/r/20240405132346.bid7gibby3lxxhez@quack3 [1]
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/fs-writeback.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 3d84fcc471c60..e89222ae285e9 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -2044,6 +2044,7 @@ static long wb_writeback(struct bdi_writeback *wb,
struct inode *inode;
long progress;
struct blk_plug plug;
+ bool queued = false;
blk_start_plug(&plug);
for (;;) {
@@ -2086,8 +2087,10 @@ static long wb_writeback(struct bdi_writeback *wb,
dirtied_before = jiffies;
trace_writeback_start(wb, work);
- if (list_empty(&wb->b_io))
+ if (list_empty(&wb->b_io)) {
queue_io(wb, work, dirtied_before);
+ queued = true;
+ }
if (work->sb)
progress = writeback_sb_inodes(work->sb, wb, work);
else
@@ -2102,7 +2105,7 @@ static long wb_writeback(struct bdi_writeback *wb,
* mean the overall work is done. So we keep looping as long
* as made some progress on cleaning pages or inodes.
*/
- if (progress) {
+ if (progress || !queued) {
spin_unlock(&wb->list_lock);
continue;
}
--
2.43.0
From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol(a)tdk.com>
ODR switching happens in 2 steps, update to store the new value and then
apply when the ODR change flag is received in the data. When switching to
the same ODR value, the ODR change flag is never happening, and frequency
switching is blocked waiting for the never coming apply.
Fix the issue by preventing update to happen when switching to same ODR
value.
Fixes: 0ecc363ccea7 ("iio: make invensense timestamp module generic")
Cc: stable(a)vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol(a)tdk.com>
---
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/common/inv_sensors/inv_sensors_timestamp.c b/drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
index fa205f17bd90..f44458c380d9 100644
--- a/drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
+++ b/drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
@@ -60,11 +60,15 @@ EXPORT_SYMBOL_NS_GPL(inv_sensors_timestamp_init, IIO_INV_SENSORS_TIMESTAMP);
int inv_sensors_timestamp_update_odr(struct inv_sensors_timestamp *ts,
uint32_t period, bool fifo)
{
+ uint32_t mult;
+
/* when FIFO is on, prevent odr change if one is already pending */
if (fifo && ts->new_mult != 0)
return -EAGAIN;
- ts->new_mult = period / ts->chip.clock_period;
+ mult = period / ts->chip.clock_period;
+ if (mult != ts->mult)
+ ts->new_mult = mult;
return 0;
}
--
2.34.1
This is the start of the stable review cycle for the 6.9.2 release.
There are 25 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 Sat, 25 May 2024 13:03:15 +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.9.2-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.9.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.9.2-rc1
Christoph Hellwig <hch(a)lst.de>
block: add a partscan sysfs attribute for disks
Christoph Hellwig <hch(a)lst.de>
block: add a disk_has_partscan helper
SeongJae Park <sj(a)kernel.org>
Docs/admin-guide/mm/damon/usage: fix wrong schemes effective quota update command
SeongJae Park <sj(a)kernel.org>
Docs/admin-guide/mm/damon/usage: fix wrong example of DAMOS filter matching sysfs file
Akira Yokosawa <akiyks(a)gmail.com>
docs: kernel_include.py: Cope with docutils 0.21
Thomas Weißschuh <linux(a)weissschuh.net>
admin-guide/hw-vuln/core-scheduling: fix return type of PR_SCHED_CORE_GET
Jarkko Sakkinen <jarkko(a)kernel.org>
KEYS: trusted: Do not use WARN when encode fails
Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Revert "media: v4l2-ctrls: show all owned controls in log_status"
AngeloGioacchino Del Regno <angelogioacchino.delregno(a)collabora.com>
remoteproc: mediatek: Make sure IPI buffer fits in L2TCM
Daniel Thompson <daniel.thompson(a)linaro.org>
serial: kgdboc: Fix NMI-safety problems from keyboard reset code
Javier Carrasco <javier.carrasco(a)wolfvision.net>
usb: typec: tipd: fix event checking for tps6598x
Javier Carrasco <javier.carrasco(a)wolfvision.net>
usb: typec: tipd: fix event checking for tps25750
Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
usb: typec: ucsi: displayport: Fix potential deadlock
Jose Ignacio Tornos Martinez <jtornosm(a)redhat.com>
net: usb: ax88179_178a: fix link status when link is set to down/up
Prashanth K <quic_prashk(a)quicinc.com>
usb: dwc3: Wait unconditionally after issuing EndXfer command
Carlos Llamas <cmllamas(a)google.com>
binder: fix max_thread type inconsistency
Bard Liao <yung-chuan.liao(a)linux.intel.com>
ASoC: Intel: sof_sdw: use generic rtd_init function for Realtek SDW DMICs
Jarkko Sakkinen <jarkko(a)kernel.org>
KEYS: trusted: Fix memory leak in tpm2_key_encode()
Sungwoo Kim <iam(a)sung-woo.kim>
Bluetooth: L2CAP: Fix div-by-zero in l2cap_le_flowctl_init()
Uros Bizjak <ubizjak(a)gmail.com>
x86/percpu: Use __force to cast from __percpu address space
Ronald Wahl <ronald.wahl(a)raritan.com>
net: ks8851: Fix another TX stall caused by wrong ISR flag handling
Jose Fernandez <josef(a)netflix.com>
drm/amd/display: Fix division by zero in setup_dsc_config
Perry Yuan <perry.yuan(a)amd.com>
cpufreq: amd-pstate: fix the highest frequency issue which limits performance
Ben Greear <greearb(a)candelatech.com>
wifi: iwlwifi: Use request_module_nowait
Peter Tsao <peter.tsao(a)mediatek.com>
Bluetooth: btusb: Fix the patch for MT7920 the affected to MT7921
-------------
Diffstat:
Documentation/ABI/stable/sysfs-block | 10 +++
.../admin-guide/hw-vuln/core-scheduling.rst | 4 +-
Documentation/admin-guide/mm/damon/usage.rst | 6 +-
Documentation/sphinx/kernel_include.py | 1 -
Makefile | 4 +-
arch/x86/include/asm/percpu.h | 6 +-
block/genhd.c | 15 +++--
block/partitions/core.c | 5 +-
drivers/android/binder.c | 2 +-
drivers/android/binder_internal.h | 2 +-
drivers/bluetooth/btusb.c | 1 +
drivers/cpufreq/amd-pstate.c | 22 ++++++-
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 7 +-
drivers/media/v4l2-core/v4l2-ctrls-core.c | 18 ++----
drivers/net/ethernet/micrel/ks8851_common.c | 18 +-----
drivers/net/usb/ax88179_178a.c | 37 +++++++----
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 10 +--
drivers/remoteproc/mtk_scp.c | 10 ++-
drivers/tty/serial/kgdboc.c | 30 ++++++++-
drivers/usb/dwc3/gadget.c | 4 +-
drivers/usb/typec/tipd/core.c | 51 ++++++++++-----
drivers/usb/typec/tipd/tps6598x.h | 11 ++++
drivers/usb/typec/ucsi/displayport.c | 4 --
include/linux/blkdev.h | 13 ++++
include/net/bluetooth/hci.h | 9 +++
include/net/bluetooth/hci_core.h | 1 +
net/bluetooth/hci_conn.c | 75 +++++++++++++++-------
net/bluetooth/hci_event.c | 31 +++++----
net/bluetooth/iso.c | 2 +-
net/bluetooth/l2cap_core.c | 17 +----
net/bluetooth/sco.c | 6 +-
security/keys/trusted-keys/trusted_tpm2.c | 25 ++++++--
sound/soc/intel/boards/Makefile | 1 +
sound/soc/intel/boards/sof_sdw.c | 12 ++--
sound/soc/intel/boards/sof_sdw_common.h | 1 +
sound/soc/intel/boards/sof_sdw_rt_dmic.c | 52 +++++++++++++++
36 files changed, 357 insertions(+), 166 deletions(-)