Hi Greetings...,
How are you doing today, I hope this email finds you in good health. You have not responded to my previous emails to you regarding Mr. Husson.
Kindly acknowledge my proposal and let me know what your decisions are, if you are taking the offer.
Get back to me as soon as you can for further details.
Best regards,
Mr. Chaoxiang Genghis.
The following commit has been merged into the locking/urgent branch of tip:
Commit-ID: db370a8b9f67ae5f17e3d5482493294467784504
Gitweb: https://git.kernel.org/tip/db370a8b9f67ae5f17e3d5482493294467784504
Author: Wander Lairson Costa <wander(a)redhat.com>
AuthorDate: Thu, 02 Feb 2023 09:30:20 -03:00
Committer: Thomas Gleixner <tglx(a)linutronix.de>
CommitterDate: Mon, 06 Feb 2023 14:49:13 +01:00
rtmutex: Ensure that the top waiter is always woken up
Let L1 and L2 be two spinlocks.
Let T1 be a task holding L1 and blocked on L2. T1, currently, is the top
waiter of L2.
Let T2 be the task holding L2.
Let T3 be a task trying to acquire L1.
The following events will lead to a state in which the wait queue of L2
isn't empty, but no task actually holds the lock.
T1 T2 T3
== == ==
spin_lock(L1)
| raw_spin_lock(L1->wait_lock)
| rtlock_slowlock_locked(L1)
| | task_blocks_on_rt_mutex(L1, T3)
| | | orig_waiter->lock = L1
| | | orig_waiter->task = T3
| | | raw_spin_unlock(L1->wait_lock)
| | | rt_mutex_adjust_prio_chain(T1, L1, L2, orig_waiter, T3)
spin_unlock(L2) | | | |
| rt_mutex_slowunlock(L2) | | | |
| | raw_spin_lock(L2->wait_lock) | | | |
| | wakeup(T1) | | | |
| | raw_spin_unlock(L2->wait_lock) | | | |
| | | | waiter = T1->pi_blocked_on
| | | | waiter == rt_mutex_top_waiter(L2)
| | | | waiter->task == T1
| | | | raw_spin_lock(L2->wait_lock)
| | | | dequeue(L2, waiter)
| | | | update_prio(waiter, T1)
| | | | enqueue(L2, waiter)
| | | | waiter != rt_mutex_top_waiter(L2)
| | | | L2->owner == NULL
| | | | wakeup(T1)
| | | | raw_spin_unlock(L2->wait_lock)
T1 wakes up
T1 != top_waiter(L2)
schedule_rtlock()
If the deadline of T1 is updated before the call to update_prio(), and the
new deadline is greater than the deadline of the second top waiter, then
after the requeue, T1 is no longer the top waiter, and the wrong task is
woken up which will then go back to sleep because it is not the top waiter.
This can be reproduced in PREEMPT_RT with stress-ng:
while true; do
stress-ng --sched deadline --sched-period 1000000000 \
--sched-runtime 800000000 --sched-deadline \
1000000000 --mmapfork 23 -t 20
done
A similar issue was pointed out by Thomas versus the cases where the top
waiter drops out early due to a signal or timeout, which is a general issue
for all regular rtmutex use cases, e.g. futex.
The problematic code is in rt_mutex_adjust_prio_chain():
// Save the top waiter before dequeue/enqueue
prerequeue_top_waiter = rt_mutex_top_waiter(lock);
rt_mutex_dequeue(lock, waiter);
waiter_update_prio(waiter, task);
rt_mutex_enqueue(lock, waiter);
// Lock has no owner?
if (!rt_mutex_owner(lock)) {
// Top waiter changed
----> if (prerequeue_top_waiter != rt_mutex_top_waiter(lock))
----> wake_up_state(waiter->task, waiter->wake_state);
This only takes the case into account where @waiter is the new top waiter
due to the requeue operation.
But it fails to handle the case where @waiter is not longer the top
waiter due to the requeue operation.
Ensure that the new top waiter is woken up so in all cases so it can take
over the ownerless lock.
[ tglx: Amend changelog, add Fixes tag ]
Fixes: c014ef69b3ac ("locking/rtmutex: Add wake_state to rt_mutex_waiter")
Signed-off-by: Wander Lairson Costa <wander(a)redhat.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: stable(a)vger.kernel.org
Link: https://lore.kernel.org/r/20230117172649.52465-1-wander@redhat.com
Link: https://lore.kernel.org/r/20230202123020.14844-1-wander@redhat.com
---
kernel/locking/rtmutex.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 010cf4e..728f434 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -901,8 +901,9 @@ static int __sched rt_mutex_adjust_prio_chain(struct task_struct *task,
* then we need to wake the new top waiter up to try
* to get the lock.
*/
- if (prerequeue_top_waiter != rt_mutex_top_waiter(lock))
- wake_up_state(waiter->task, waiter->wake_state);
+ top_waiter = rt_mutex_top_waiter(lock);
+ if (prerequeue_top_waiter != top_waiter)
+ wake_up_state(top_waiter->task, top_waiter->wake_state);
raw_spin_unlock_irq(&lock->wait_lock);
return 0;
}
This is the start of the stable review cycle for the 6.1.10 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 Sun, 05 Feb 2023 10:09:58 +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.10-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.10-rc1
Jeremy Kerr <jk(a)codeconstruct.com.au>
net: mctp: purge receive queues on sk destruction
Miguel Ojeda <ojeda(a)kernel.org>
rust: print: avoid evaluating arguments in `pr_*` macros in `unsafe` blocks
Yan Zhai <yan(a)cloudflare.com>
net: fix NULL pointer in skb_segment_list
Mario Limonciello <mario.limonciello(a)amd.com>
gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode
Mario Limonciello <mario.limonciello(a)amd.com>
gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xRU
Janne Grunau <j(a)jannau.net>
nvme-apple: only reset the controller when RTKit is running
Paulo Alcantara <pc(a)cjr.nz>
cifs: fix return of uninitialized rc in dfs_cache_update_tgthint()
Mario Limonciello <mario.limonciello(a)amd.com>
gpiolib: acpi: Allow ignoring wake capability on pins that aren't in _AEI
Hui Wang <hui.wang(a)canonical.com>
dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init
Roderick Colenbrander <roderick(a)gaikai.com>
HID: playstation: sanity check DualSense calibration data.
José Expósito <jose.exposito89(a)gmail.com>
HID: uclogic: Add support for XP-PEN Deco 01 V2
Heiko Carstens <hca(a)linux.ibm.com>
s390: workaround invalid gcc-11 out of bounds read warning
Pavel Begunkov <asml.silence(a)gmail.com>
block: fix hctx checks for batch allocation
Hans de Goede <hdegoede(a)redhat.com>
ACPI: video: Add backlight=native DMI quirk for Acer Aspire 4810T
Jinyang He <hejinyang(a)loongson.cn>
LoongArch: Get frame info in unwind_start() when regs is not available
Yu Kuai <yukuai3(a)huawei.com>
blk-cgroup: fix missing pd_online_fn() while activating policy
Jingbo Xu <jefflexu(a)linux.alibaba.com>
erofs: clean up parsing of fscache related options
Mark Brown <broonie(a)kernel.org>
kselftest: Fix error message for unconfigured LLVM builds
Arnd Bergmann <arnd(a)arndb.de>
ARM: omap1: fix building gpio15xx
Dominik Kobinski <dominikkobinski314(a)gmail.com>
arm64: dts: msm8994-angler: fix the memory map
Sriram R <quic_srirrama(a)quicinc.com>
mac80211: Fix MLO address translation for multiple bss case
Siddh Raman Pant <code(a)siddh.me>
erofs/zmap.c: Fix incorrect offset calculation
Hao Sun <sunhao.th(a)gmail.com>
bpf: Skip task with pid=1 in send_signal_common()
Cristian Marussi <cristian.marussi(a)arm.com>
firmware: arm_scmi: Clear stale xfer->hdr.status
Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org>
arm64: dts: imx8mq-thor96: fix no-mmc property for SDHCI
Geert Uytterhoeven <geert+renesas(a)glider.be>
arm64: dts: freescale: Fix pca954x i2c-mux node names
Geert Uytterhoeven <geert+renesas(a)glider.be>
ARM: dts: vf610: Fix pca9548 i2c-mux node names
Geert Uytterhoeven <geert+renesas(a)glider.be>
ARM: dts: imx: Fix pca9547 i2c-mux node name
-------------
Diffstat:
Makefile | 4 +--
arch/arm/boot/dts/imx53-ppd.dts | 2 +-
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 2 +-
arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 2 +-
arch/arm/mach-omap1/gpio15xx.c | 1 +
arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts | 2 +-
.../arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi | 2 +-
.../arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi | 2 +-
.../boot/dts/freescale/imx8mm-nitrogen-r2.dts | 2 +-
arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts | 4 +--
arch/arm64/boot/dts/freescale/imx8mq-thor96.dts | 4 +--
arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 2 +-
.../dts/qcom/msm8994-huawei-angler-rev-101.dts | 19 +++++++++++--
arch/loongarch/kernel/process.c | 12 ++------
arch/loongarch/kernel/unwind_guess.c | 6 ++++
arch/loongarch/kernel/unwind_prologue.c | 16 +++++++++--
arch/s390/kernel/setup.c | 5 ++--
block/blk-cgroup.c | 4 +++
block/blk-mq.c | 6 +++-
drivers/acpi/video_detect.c | 8 ++++++
drivers/dma/imx-sdma.c | 4 ++-
drivers/firmware/arm_scmi/driver.c | 2 ++
drivers/gpio/gpiolib-acpi.c | 20 ++++++++++++--
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-playstation.c | 32 ++++++++++++++++++++++
drivers/hid/hid-uclogic-core.c | 2 ++
drivers/hid/hid-uclogic-params.c | 2 ++
drivers/nvme/host/apple.c | 6 ++--
fs/cifs/dfs_cache.c | 6 ++--
fs/erofs/super.c | 13 ++++-----
fs/erofs/zmap.c | 10 +++++--
kernel/trace/bpf_trace.c | 3 ++
net/core/skbuff.c | 5 ++--
net/mac80211/rx.c | 3 ++
net/mctp/af_mctp.c | 6 ++++
rust/kernel/print.rs | 29 ++++++++++++--------
tools/testing/selftests/lib.mk | 2 +-
43 files changed, 190 insertions(+), 73 deletions(-)
On some Logitech mice, such as the G903, and possibly the G403, the HID
events are generated on a different interface to the HID++ one.
If we enable hi-res through the HID++ interface, the HID interface
wouldn't know anything about it, and handle the events as if they were
regular scroll events, making the mouse unusable.
Disable hi-res scrolling on those devices until we implement scroll
events through HID++.
Signed-off-by: Bastien Nocera <hadess(a)hadess.net>
Tested-by: Tobias Klausmann <klausman(a)schwarzvogel.de>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216885
Fixes: 908d325e1665 ("HID: logitech-hidpp: Detect hi-res scrolling support")
Cc: stable(a)vger.kernel.org
---
drivers/hid/hid-logitech-hidpp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index abf2c95e4d0b..9c1ee8e91e0c 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -3978,7 +3978,8 @@ static void hidpp_connect_event(struct hidpp_device *hidpp)
}
hidpp_initialize_battery(hidpp);
- hidpp_initialize_hires_scroll(hidpp);
+ if (!hid_is_usb(hidpp->hid_dev))
+ hidpp_initialize_hires_scroll(hidpp);
/* forward current battery state */
if (hidpp->capabilities & HIDPP_CAPABILITY_HIDPP10_BATTERY) {
--
2.39.1