Further to the commit c53e9653605d (btrfs: qgroup: try to flush qgroup
space when we get -EDQUOT) there are three fixes as below.
6f23277a49e6 btrfs: qgroup: don't commit transaction when we already hold the handle
4d14c5cde5c2 btrfs: don't flush from btrfs_delayed_inode_reserve_metadata
f9baa501b4fd btrfs: fix deadlock when cloning inline extents and using qgroups
Commits 6f23277a49e6 and 4d14c5cde5c2 above are straightforward and are
part of this series.
However, commit f9baa501b4fd above is more complicated to backport.
Furthermore, the bug mentioned in the commit f9baa501b4fd might not
trigger on 5.4.y as its related commit 05a5a7621ce66c ("Btrfs: implement
full reflink support for inline extents") is not backported to 5.4.y.
Nikolay Borisov (2):
btrfs: export and rename qgroup_reserve_meta
btrfs: don't flush from btrfs_delayed_inode_reserve_metadata
Qu Wenruo (1):
btrfs: qgroup: don't commit transaction when we already hold the
handle
fs/btrfs/delayed-inode.c | 3 ++-
fs/btrfs/inode.c | 2 +-
fs/btrfs/qgroup.c | 28 +++++++++++++++++++++++-----
fs/btrfs/qgroup.h | 3 ++-
4 files changed, 28 insertions(+), 8 deletions(-)
--
2.31.1
After LPM, when migrating from a system with security mitigation enabled to
a system with mitigation disabled, the security flavor exposed in /proc is
not correctly set back to 0.
Do not assume the value of the security flavor is set to 0 when entering
init_cpu_char_feature_flags(), so when called after a LPM, the value is set
correctly even if the mitigation are not turned off.
Fixes: 6ce56e1ac380 ("powerpc/pseries: export LPAR security flavor in
lparcfg")
Cc: stable(a)vger.kernel.org # 5.13.x
Signed-off-by: Laurent Dufour <ldufour(a)linux.ibm.com>
---
arch/powerpc/platforms/pseries/setup.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 6b0886668465..0dfaa6ab44cc 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -539,9 +539,10 @@ static void init_cpu_char_feature_flags(struct h_cpu_char_result *result)
* H_CPU_BEHAV_FAVOUR_SECURITY_H could be set only if
* H_CPU_BEHAV_FAVOUR_SECURITY is.
*/
- if (!(result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY))
+ if (!(result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY)) {
security_ftr_clear(SEC_FTR_FAVOUR_SECURITY);
- else if (result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY_H)
+ pseries_security_flavor = 0;
+ } else if (result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY_H)
pseries_security_flavor = 1;
else
pseries_security_flavor = 2;
--
2.32.0
This patch series pulls the patch ae7e86108b12 ("usb: dwc3: Stop active
transfers before halting the controller") and some fixes/dependencies
for that patch. It's needed to fix the actual panic I observed when
doing role switch with USB2.0 Dual Role Device controller. Next
procedure can be used to reproduce the panic:
1. Boot in peripheral role
2. Configure RNDIS gadget, perform ping, stop ping
3. Switch to host role
4. Kernel panic occurs
Kernel panic happens because gadget->udc->driver->disconnect() (which
is configfs_composite_disconnect()) is not called from
usb_gadget_disconnect() function, due to timeout condition in
dwc3_gadget_run_stop(), which leads to not called rndis_disable(). And
although previously created endpoints are not valid anymore,
eth_start_xmit() gets called and tries to use those, which leads to
invalid memory access. This patch fixes timeout condition, so next
call chain doesn't fail anymore, and RNDIS uninitialized properly on
gadget to host role switch:
<<<<<<<<<<<<<<<<<<<< cut here >>>>>>>>>>>>>>>>>>>
usb_role_switch_set_role()
v
dwc3_usb_role_switch_set()
v
dwc3_set_mode()
v
__dwc3_set_mode()
v
dwc3_gadget_exit()
v
usb_del_gadget_udc()
v
usb_gadget_remove_driver()
v
usb_gadget_disconnect()
v
// THIS IS NOT CALLED because gadget->ops->pullup() =
// dwc3_gadget_pullup() returns -ETIMEDOUT (-110)
gadget->udc->driver->disconnect()
// = configfs_composite_disconnect()
v
composite_disconnect()
v
reset_config()
v
foreach (f : function) : f->disable
v
rndis_disable()
v
gether_disconnect()
v
usb_ep_disable(),
dev->port_usb = NULL
<<<<<<<<<<<<<<<<<<<< cut here >>>>>>>>>>>>>>>>>>>
Most of these patches are already applied in stable-5.10.
Wesley Cheng (7):
usb: dwc3: Stop active transfers before halting the controller
usb: dwc3: gadget: Allow runtime suspend if UDC unbinded
usb: dwc3: gadget: Restart DWC3 gadget when enabling pullup
usb: dwc3: gadget: Prevent EP queuing while stopping transfers
usb: dwc3: gadget: Clear DEP flags after stop transfers in ep disable
usb: dwc3: gadget: Disable gadget IRQ during pullup disable
usb: dwc3: gadget: Avoid runtime resume if disabling pullup
drivers/usb/dwc3/ep0.c | 2 +-
drivers/usb/dwc3/gadget.c | 118 +++++++++++++++++++++++++++++++-------
2 files changed, 99 insertions(+), 21 deletions(-)
--
2.30.2
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From ebc666f39ff67a01e748c34d670ddf05a9e45220 Mon Sep 17 00:00:00 2001
From: Adam Ford <aford173(a)gmail.com>
Date: Thu, 13 May 2021 06:46:16 -0500
Subject: [PATCH] arm64: dts: renesas: beacon: Fix USB ref clock references
The RZ/G2 boards expect there to be an external clock reference for
USB2 EHCI controllers. For the Beacon boards, this reference clock
is controlled by a programmable versaclock. Because the RZ/G2
family has a special clock driver when using an external clock,
the third clock reference in the EHCI node needs to point to this
special clock, called usb2_clksel.
Since the usb2_clksel does not keep the usb_extal clock enabled,
the 4th clock entry for the EHCI nodes needs to reference it to
keep the clock running and make USB functional.
Signed-off-by: Adam Ford <aford173(a)gmail.com>
Link: https://lore.kernel.org/r/20210513114617.30191-2-aford173@gmail.com
Signed-off-by: Geert Uytterhoeven <geert+renesas(a)glider.be>
diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
index d8046fedf9c1..e3c8b2fe143e 100644
--- a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
+++ b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
@@ -271,12 +271,12 @@ &du_out_rgb {
&ehci0 {
dr_mode = "otg";
status = "okay";
- clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
+ clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>;
};
&ehci1 {
status = "okay";
- clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
+ clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>;
};
&hdmi0 {