* [PATCH 5.15 00/69] 5.15.141-rc1 review
@ 2023-11-30 16:21 Greg Kroah-Hartman
2023-11-30 16:21 ` [PATCH 5.15 01/69] afs: Fix afs_server_list to be cleaned up with RCU Greg Kroah-Hartman
` (71 more replies)
0 siblings, 72 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, linux-kernel, torvalds, akpm, linux,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, allen.lkml
This is the start of the stable review cycle for the 5.15.141 release.
There are 69 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, 02 Dec 2023 16:21:18 +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.141-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-5.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 5.15.141-rc1
Keith Busch <kbusch@kernel.org>
io_uring: fix off-by one bvec index
Johan Hovold <johan+linaro@kernel.org>
USB: dwc3: qcom: fix wakeup after probe deferral
Johan Hovold <johan+linaro@kernel.org>
USB: dwc3: qcom: fix software node leak on probe errors
Ricardo Ribalda <ribalda@chromium.org>
usb: dwc3: set the dma max_seg_size
Alexander Stein <alexander.stein@ew.tq-group.com>
usb: dwc3: Fix default mode initialization
Oliver Neukum <oneukum@suse.com>
USB: dwc2: write HCINT with INTMASK applied
Badhri Jagan Sridharan <badhri@google.com>
usb: typec: tcpm: Skip hard reset when in error recovery
Lech Perczak <lech.perczak@gmail.com>
USB: serial: option: don't claim interface 4 for ZTE MF290
Puliang Lu <puliang.lu@fibocom.com>
USB: serial: option: fix FM101R-GL defines
Victor Fragoso <victorffs@hotmail.com>
USB: serial: option: add Fibocom L7xx modules
Pawel Laszczak <pawell@cadence.com>
usb: cdnsp: Fix deadlock issue during using NCM gadget
Mingzhe Zou <mingzhe.zou@easystack.cn>
bcache: fixup lock c->root error
Mingzhe Zou <mingzhe.zou@easystack.cn>
bcache: fixup init dirty data errors
Rand Deeb <rand.sec96@gmail.com>
bcache: prevent potential division by zero error
Coly Li <colyli@suse.de>
bcache: check return value from btree_node_alloc_replacement()
Mikulas Patocka <mpatocka@redhat.com>
dm-delay: fix a race between delay_presuspend and delay_bio
Long Li <longli@microsoft.com>
hv_netvsc: Mark VF as slave before exposing it to user-mode
Haiyang Zhang <haiyangz@microsoft.com>
hv_netvsc: Fix race of register_netdevice_notifier and VF register
Asuna Yang <spriteovo@gmail.com>
USB: serial: option: add Luat Air72*U series products
Jan Höppner <hoeppner@linux.ibm.com>
s390/dasd: protect device queue against concurrent access
Charles Mirabile <cmirabil@redhat.com>
io_uring/fs: consider link->flags when getting path for LINKAT
Mingzhe Zou <mingzhe.zou@easystack.cn>
bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race
Song Liu <song@kernel.org>
md: fix bi_status reporting in md_end_clone_io
Coly Li <colyli@suse.de>
bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
Keith Busch <kbusch@kernel.org>
swiotlb-xen: provide the "max_mapping_size" method
Hans de Goede <hdegoede@redhat.com>
ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA
Krister Johansen <kjlx@templeofstupid.com>
proc: sysctl: prevent aliased sysctls from getting passed to init
Francis Laniel <flaniel@linux.microsoft.com>
tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
Zhang Yi <yi.zhang@huawei.com>
ext4: make sure allocate pending entry not fail
Baokun Li <libaokun1@huawei.com>
ext4: fix slab-use-after-free in ext4_es_insert_extent()
Baokun Li <libaokun1@huawei.com>
ext4: using nofail preallocation in ext4_es_insert_extent()
Baokun Li <libaokun1@huawei.com>
ext4: using nofail preallocation in ext4_es_insert_delayed_block()
Baokun Li <libaokun1@huawei.com>
ext4: using nofail preallocation in ext4_es_remove_extent()
Baokun Li <libaokun1@huawei.com>
ext4: use pre-allocated es in __es_remove_extent()
Baokun Li <libaokun1@huawei.com>
ext4: use pre-allocated es in __es_insert_extent()
Baokun Li <libaokun1@huawei.com>
ext4: factor out __es_alloc_extent() and __es_free_extent()
Baokun Li <libaokun1@huawei.com>
ext4: add a new helper to check if es must be kept
Andrey Konovalov <andrey.konovalov@linaro.org>
media: qcom: camss: Fix csid-gen2 for test pattern generator
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
media: qcom: camss: Fix set CSI2_RX_CFG1_VC_MODE when VC is greater than 3
Milen Mitkov <quic_mmitkov@quicinc.com>
media: camss: sm8250: Virtual channels for CSID
Souptick Joarder (HPE) <jrdr.linux@gmail.com>
media: camss: Replace hard coded value with parameter
Huacai Chen <chenhuacai@kernel.org>
MIPS: KVM: Fix a build warning about variable set but not used
Peter Zijlstra <peterz@infradead.org>
lockdep: Fix block chain corruption
Johan Hovold <johan+linaro@kernel.org>
USB: dwc3: qcom: fix ACPI platform device leak
Johan Hovold <johan+linaro@kernel.org>
USB: dwc3: qcom: fix resource leaks on probe deferral
Christoph Hellwig <hch@lst.de>
nvmet: nul-terminate the NQNs passed in the connect command
David Howells <dhowells@redhat.com>
afs: Fix file locking on R/O volumes to operate in local mode
David Howells <dhowells@redhat.com>
afs: Return ENOENT if no cell DNS record can be found
Samuel Holland <samuel.holland@sifive.com>
net: axienet: Fix check for partial TX checksum
Raju Rangoju <Raju.Rangoju@amd.com>
amd-xgbe: propagate the correct speed and duplex status
Raju Rangoju <Raju.Rangoju@amd.com>
amd-xgbe: handle the corner-case during tx completion
Raju Rangoju <Raju.Rangoju@amd.com>
amd-xgbe: handle corner-case during sfp hotplug
Suman Ghosh <sumang@marvell.com>
octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF
Stefano Stabellini <sstabellini@kernel.org>
arm/xen: fix xen_vcpu_info allocation alignment
D. Wythe <alibuda@linux.alibaba.com>
net/smc: avoid data corruption caused by decline
Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
net: usb: ax88179_178a: fix failed operations during ax88179_reset
Kunwu Chan <chentao@kylinos.cn>
ipv4: Correct/silence an endian warning in __ip_do_redirect
Charles Yi <be286@163.com>
HID: fix HID device resource race between HID core and debugging support
Benjamin Tissoires <benjamin.tissoires@redhat.com>
HID: core: store the unique system identifier in hid_device
Jonas Karlman <jonas@kwiboo.se>
drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
Chen Ni <nichen@iscas.ac.cn>
ata: pata_isapnp: Add missing error check for devm_ioport_map()
Suman Ghosh <sumang@marvell.com>
octeontx2-pf: Fix memory leak during interface down
Eric Dumazet <edumazet@google.com>
wireguard: use DEV_STATS_INC()
Marek Vasut <marex@denx.de>
drm/panel: simple: Fix Innolux G101ICE-L01 timings
Marek Vasut <marex@denx.de>
drm/panel: simple: Fix Innolux G101ICE-L01 bus flags
Xuxin Xiong <xuxinxiong@huaqin.corp-partner.google.com>
drm/panel: auo,b101uan08.3: Fine tune the panel power sequence
Shuijing Li <shuijing.li@mediatek.com>
drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence
David Howells <dhowells@redhat.com>
afs: Make error on cell lookup failure consistent with OpenAFS
David Howells <dhowells@redhat.com>
afs: Fix afs_server_list to be cleaned up with RCU
-------------
Diffstat:
Makefile | 4 +-
arch/arm/xen/enlighten.c | 3 +-
arch/mips/kvm/mmu.c | 3 +-
drivers/acpi/resource.c | 7 +
drivers/ata/pata_isapnp.c | 3 +
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 7 +
drivers/gpu/drm/panel/panel-simple.c | 13 +-
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 +-
drivers/hid/hid-core.c | 16 +-
drivers/hid/hid-debug.c | 3 +
drivers/md/bcache/btree.c | 4 +-
drivers/md/bcache/sysfs.c | 2 +-
drivers/md/bcache/writeback.c | 22 +-
drivers/md/dm-delay.c | 17 +-
drivers/md/md.c | 3 +-
drivers/media/platform/qcom/camss/camss-csid-170.c | 65 +++--
drivers/media/platform/qcom/camss/camss-csid.c | 44 ++-
drivers/media/platform/qcom/camss/camss-csid.h | 11 +-
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 14 +
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 +-
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 14 +-
.../ethernet/marvell/octeontx2/nic/otx2_flows.c | 20 +-
.../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
drivers/net/hyperv/netvsc_drv.c | 41 ++-
drivers/net/usb/ax88179_178a.c | 4 +-
drivers/net/wireguard/device.c | 4 +-
drivers/net/wireguard/receive.c | 12 +-
drivers/net/wireguard/send.c | 3 +-
drivers/nvme/target/fabrics-cmd.c | 4 +
drivers/s390/block/dasd.c | 24 +-
drivers/usb/cdns3/cdnsp-ring.c | 3 +
drivers/usb/dwc2/hcd_intr.c | 15 +-
drivers/usb/dwc3/core.c | 2 +
drivers/usb/dwc3/drd.c | 2 +-
drivers/usb/dwc3/dwc3-qcom.c | 65 +++--
drivers/usb/serial/option.c | 11 +-
drivers/usb/typec/tcpm/tcpm.c | 9 +
drivers/xen/swiotlb-xen.c | 1 +
fs/afs/dynroot.c | 4 +-
fs/afs/internal.h | 1 +
fs/afs/server_list.c | 2 +-
fs/afs/super.c | 2 +
fs/afs/vl_rotate.c | 10 +
fs/ext4/extents_status.c | 306 +++++++++++++++------
fs/proc/proc_sysctl.c | 7 +
include/linux/hid.h | 5 +
include/linux/sysctl.h | 6 +
init/main.c | 4 +
io_uring/io_uring.c | 4 +-
kernel/locking/lockdep.c | 3 +-
kernel/trace/trace_kprobe.c | 74 +++++
kernel/trace/trace_probe.h | 1 +
net/ipv4/route.c | 2 +-
net/smc/af_smc.c | 8 +-
55 files changed, 704 insertions(+), 239 deletions(-)
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 01/69] afs: Fix afs_server_list to be cleaned up with RCU
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
@ 2023-11-30 16:21 ` Greg Kroah-Hartman
2023-11-30 16:21 ` [PATCH 5.15 02/69] afs: Make error on cell lookup failure consistent with OpenAFS Greg Kroah-Hartman
` (70 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Howells, Marc Dionne,
linux-afs, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <dhowells@redhat.com>
[ Upstream commit e6bace7313d61e31f2b16fa3d774fd8cb3cb869e ]
afs_server_list is accessed with the rcu_read_lock() held from
volume->servers, so it needs to be cleaned up correctly.
Fix this by using kfree_rcu() instead of kfree().
Fixes: 8a070a964877 ("afs: Detect cell aliases 1 - Cells with root volumes")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/afs/internal.h | 1 +
fs/afs/server_list.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 567e61b553f56..183200c6ce20e 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -556,6 +556,7 @@ struct afs_server_entry {
};
struct afs_server_list {
+ struct rcu_head rcu;
afs_volid_t vids[AFS_MAXTYPES]; /* Volume IDs */
refcount_t usage;
unsigned char nr_servers;
diff --git a/fs/afs/server_list.c b/fs/afs/server_list.c
index ed9056703505f..b59896b1de0af 100644
--- a/fs/afs/server_list.c
+++ b/fs/afs/server_list.c
@@ -17,7 +17,7 @@ void afs_put_serverlist(struct afs_net *net, struct afs_server_list *slist)
for (i = 0; i < slist->nr_servers; i++)
afs_unuse_server(net, slist->servers[i].server,
afs_server_trace_put_slist);
- kfree(slist);
+ kfree_rcu(slist, rcu);
}
}
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 02/69] afs: Make error on cell lookup failure consistent with OpenAFS
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
2023-11-30 16:21 ` [PATCH 5.15 01/69] afs: Fix afs_server_list to be cleaned up with RCU Greg Kroah-Hartman
@ 2023-11-30 16:21 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 03/69] drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence Greg Kroah-Hartman
` (69 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Markus Suvanto, David Howells,
Jeffrey Altman, Marc Dionne, linux-afs, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <dhowells@redhat.com>
[ Upstream commit 2a4ca1b4b77850544408595e2433f5d7811a9daa ]
When kafs tries to look up a cell in the DNS or the local config, it will
translate a lookup failure into EDESTADDRREQ whereas OpenAFS translates it
into ENOENT. Applications such as West expect the latter behaviour and
fail if they see the former.
This can be seen by trying to mount an unknown cell:
# mount -t afs %example.com:cell.root /mnt
mount: /mnt: mount(2) system call failed: Destination address required.
Fixes: 4d673da14533 ("afs: Support the AFS dynamic root")
Reported-by: Markus Suvanto <markus.suvanto@gmail.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216637
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/afs/dynroot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c
index db832cc931c87..b35c6081dbfe1 100644
--- a/fs/afs/dynroot.c
+++ b/fs/afs/dynroot.c
@@ -131,8 +131,8 @@ static int afs_probe_cell_name(struct dentry *dentry)
ret = dns_query(net->net, "afsdb", name, len, "srv=1",
NULL, NULL, false);
- if (ret == -ENODATA)
- ret = -EDESTADDRREQ;
+ if (ret == -ENODATA || ret == -ENOKEY)
+ ret = -ENOENT;
return ret;
}
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 03/69] drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
2023-11-30 16:21 ` [PATCH 5.15 01/69] afs: Fix afs_server_list to be cleaned up with RCU Greg Kroah-Hartman
2023-11-30 16:21 ` [PATCH 5.15 02/69] afs: Make error on cell lookup failure consistent with OpenAFS Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 04/69] drm/panel: auo,b101uan08.3: " Greg Kroah-Hartman
` (68 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shuijing Li, Xinlei Lee,
AngeloGioacchino Del Regno, Neil Armstrong, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuijing Li <shuijing.li@mediatek.com>
[ Upstream commit 812562b8d881ce6d33fed8052b3a10b718430fb5 ]
For "boe,tv105wum-nw0" this special panel, it is stipulated in
the panel spec that MIPI needs to keep the LP11 state before
the lcm_reset pin is pulled high.
Signed-off-by: Shuijing Li <shuijing.li@mediatek.com>
Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230515094955.15982-3-shuijing.li@mediatek.com
Stable-dep-of: 6965809e5269 ("drm/panel: auo,b101uan08.3: Fine tune the panel power sequence")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index db9d0b86d5428..3229e5eabbd21 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -36,6 +36,7 @@ struct panel_desc {
const struct panel_init_cmd *init_cmds;
unsigned int lanes;
bool discharge_on_disable;
+ bool lp11_before_reset;
};
struct boe_panel {
@@ -551,6 +552,10 @@ static int boe_panel_prepare(struct drm_panel *panel)
usleep_range(5000, 10000);
+ if (boe->desc->lp11_before_reset) {
+ mipi_dsi_dcs_nop(boe->dsi);
+ usleep_range(1000, 2000);
+ }
gpiod_set_value(boe->enable_gpio, 1);
usleep_range(1000, 2000);
gpiod_set_value(boe->enable_gpio, 0);
@@ -719,6 +724,7 @@ static const struct panel_desc boe_tv105wum_nw0_desc = {
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
.init_cmds = boe_init_cmd,
+ .lp11_before_reset = true,
};
static int boe_panel_get_modes(struct drm_panel *panel,
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 04/69] drm/panel: auo,b101uan08.3: Fine tune the panel power sequence
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (2 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 03/69] drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 05/69] drm/panel: simple: Fix Innolux G101ICE-L01 bus flags Greg Kroah-Hartman
` (67 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xuxin Xiong, Douglas Anderson,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xuxin Xiong <xuxinxiong@huaqin.corp-partner.google.com>
[ Upstream commit 6965809e526917b73c8f9178173184dcf13cec4b ]
For "auo,b101uan08.3" this panel, it is stipulated in the panel spec that
MIPI needs to keep the LP11 state before the lcm_reset pin is pulled high.
Fixes: 56ad624b4cb5 ("drm/panel: support for auo, b101uan08.3 wuxga dsi video mode panel")
Signed-off-by: Xuxin Xiong <xuxinxiong@huaqin.corp-partner.google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231114044205.613421-1-xuxinxiong@huaqin.corp-partner.google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index 3229e5eabbd21..9e518213a54ff 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -697,6 +697,7 @@ static const struct panel_desc auo_b101uan08_3_desc = {
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM,
.init_cmds = auo_b101uan08_3_init_cmd,
+ .lp11_before_reset = true,
};
static const struct drm_display_mode boe_tv105wum_nw0_default_mode = {
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 05/69] drm/panel: simple: Fix Innolux G101ICE-L01 bus flags
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (3 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 04/69] drm/panel: auo,b101uan08.3: " Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 06/69] drm/panel: simple: Fix Innolux G101ICE-L01 timings Greg Kroah-Hartman
` (66 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Marek Vasut, Neil Armstrong,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <marex@denx.de>
[ Upstream commit 06fc41b09cfbc02977acd9189473593a37d82d9b ]
Add missing .bus_flags = DRM_BUS_FLAG_DE_HIGH to this panel description,
ones which match both the datasheet and the panel display_timing flags .
Fixes: 1e29b840af9f ("drm/panel: simple: Add Innolux G101ICE-L01 panel")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231008223315.279215-1-marex@denx.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/panel/panel-simple.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index e58eb93e9bc9e..28d1e661f99b1 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2555,6 +2555,7 @@ static const struct panel_desc innolux_g101ice_l01 = {
.disable = 200,
},
.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+ .bus_flags = DRM_BUS_FLAG_DE_HIGH,
.connector_type = DRM_MODE_CONNECTOR_LVDS,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 06/69] drm/panel: simple: Fix Innolux G101ICE-L01 timings
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (4 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 05/69] drm/panel: simple: Fix Innolux G101ICE-L01 bus flags Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 07/69] wireguard: use DEV_STATS_INC() Greg Kroah-Hartman
` (65 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Marek Vasut, Neil Armstrong,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <marex@denx.de>
[ Upstream commit 3f9a91b6c00e655d27bd785dcda1742dbdc31bda ]
The Innolux G101ICE-L01 datasheet [1] page 17 table
6.1 INPUT SIGNAL TIMING SPECIFICATIONS
indicates that maximum vertical blanking time is 40 lines.
Currently the driver uses 29 lines.
Fix it, and since this panel is a DE panel, adjust the timings
to make them less hostile to controllers which cannot do 1 px
HSA/VSA, distribute the delays evenly between all three parts.
[1] https://www.data-modul.com/sites/default/files/products/G101ICE-L01-C2-specification-12042389.pdf
Fixes: 1e29b840af9f ("drm/panel: simple: Add Innolux G101ICE-L01 panel")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231008223256.279196-1-marex@denx.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/panel/panel-simple.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 28d1e661f99b1..d9f1675c348e5 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2532,13 +2532,13 @@ static const struct panel_desc innolux_g070y2_l01 = {
static const struct display_timing innolux_g101ice_l01_timing = {
.pixelclock = { 60400000, 71100000, 74700000 },
.hactive = { 1280, 1280, 1280 },
- .hfront_porch = { 41, 80, 100 },
- .hback_porch = { 40, 79, 99 },
- .hsync_len = { 1, 1, 1 },
+ .hfront_porch = { 30, 60, 70 },
+ .hback_porch = { 30, 60, 70 },
+ .hsync_len = { 22, 40, 60 },
.vactive = { 800, 800, 800 },
- .vfront_porch = { 5, 11, 14 },
- .vback_porch = { 4, 11, 14 },
- .vsync_len = { 1, 1, 1 },
+ .vfront_porch = { 3, 8, 14 },
+ .vback_porch = { 3, 8, 14 },
+ .vsync_len = { 4, 7, 12 },
.flags = DISPLAY_FLAGS_DE_HIGH,
};
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 07/69] wireguard: use DEV_STATS_INC()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (5 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 06/69] drm/panel: simple: Fix Innolux G101ICE-L01 timings Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 08/69] octeontx2-pf: Fix memory leak during interface down Greg Kroah-Hartman
` (64 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot, Eric Dumazet,
Jason A. Donenfeld, Hangbin Liu, David S. Miller, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 93da8d75a66568ba4bb5b14ad2833acd7304cd02 ]
wg_xmit() can be called concurrently, KCSAN reported [1]
some device stats updates can be lost.
Use DEV_STATS_INC() for this unlikely case.
[1]
BUG: KCSAN: data-race in wg_xmit / wg_xmit
read-write to 0xffff888104239160 of 8 bytes by task 1375 on cpu 0:
wg_xmit+0x60f/0x680 drivers/net/wireguard/device.c:231
__netdev_start_xmit include/linux/netdevice.h:4918 [inline]
netdev_start_xmit include/linux/netdevice.h:4932 [inline]
xmit_one net/core/dev.c:3543 [inline]
dev_hard_start_xmit+0x11b/0x3f0 net/core/dev.c:3559
...
read-write to 0xffff888104239160 of 8 bytes by task 1378 on cpu 1:
wg_xmit+0x60f/0x680 drivers/net/wireguard/device.c:231
__netdev_start_xmit include/linux/netdevice.h:4918 [inline]
netdev_start_xmit include/linux/netdevice.h:4932 [inline]
xmit_one net/core/dev.c:3543 [inline]
dev_hard_start_xmit+0x11b/0x3f0 net/core/dev.c:3559
...
v2: also change wg_packet_consume_data_done() (Hangbin Liu)
and wg_packet_purge_staged_packets()
Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireguard/device.c | 4 ++--
drivers/net/wireguard/receive.c | 12 ++++++------
drivers/net/wireguard/send.c | 3 ++-
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireguard/device.c b/drivers/net/wireguard/device.c
index 5eaef79c06e16..e5e344af34237 100644
--- a/drivers/net/wireguard/device.c
+++ b/drivers/net/wireguard/device.c
@@ -193,7 +193,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)
*/
while (skb_queue_len(&peer->staged_packet_queue) > MAX_STAGED_PACKETS) {
dev_kfree_skb(__skb_dequeue(&peer->staged_packet_queue));
- ++dev->stats.tx_dropped;
+ DEV_STATS_INC(dev, tx_dropped);
}
skb_queue_splice_tail(&packets, &peer->staged_packet_queue);
spin_unlock_bh(&peer->staged_packet_queue.lock);
@@ -211,7 +211,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)
else if (skb->protocol == htons(ETH_P_IPV6))
icmpv6_ndo_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0);
err:
- ++dev->stats.tx_errors;
+ DEV_STATS_INC(dev, tx_errors);
kfree_skb(skb);
return ret;
}
diff --git a/drivers/net/wireguard/receive.c b/drivers/net/wireguard/receive.c
index f500aaf678370..d38b24339a1f9 100644
--- a/drivers/net/wireguard/receive.c
+++ b/drivers/net/wireguard/receive.c
@@ -423,20 +423,20 @@ static void wg_packet_consume_data_done(struct wg_peer *peer,
net_dbg_skb_ratelimited("%s: Packet has unallowed src IP (%pISc) from peer %llu (%pISpfsc)\n",
dev->name, skb, peer->internal_id,
&peer->endpoint.addr);
- ++dev->stats.rx_errors;
- ++dev->stats.rx_frame_errors;
+ DEV_STATS_INC(dev, rx_errors);
+ DEV_STATS_INC(dev, rx_frame_errors);
goto packet_processed;
dishonest_packet_type:
net_dbg_ratelimited("%s: Packet is neither ipv4 nor ipv6 from peer %llu (%pISpfsc)\n",
dev->name, peer->internal_id, &peer->endpoint.addr);
- ++dev->stats.rx_errors;
- ++dev->stats.rx_frame_errors;
+ DEV_STATS_INC(dev, rx_errors);
+ DEV_STATS_INC(dev, rx_frame_errors);
goto packet_processed;
dishonest_packet_size:
net_dbg_ratelimited("%s: Packet has incorrect size from peer %llu (%pISpfsc)\n",
dev->name, peer->internal_id, &peer->endpoint.addr);
- ++dev->stats.rx_errors;
- ++dev->stats.rx_length_errors;
+ DEV_STATS_INC(dev, rx_errors);
+ DEV_STATS_INC(dev, rx_length_errors);
goto packet_processed;
packet_processed:
dev_kfree_skb(skb);
diff --git a/drivers/net/wireguard/send.c b/drivers/net/wireguard/send.c
index 95c853b59e1da..0d48e0f4a1ba3 100644
--- a/drivers/net/wireguard/send.c
+++ b/drivers/net/wireguard/send.c
@@ -333,7 +333,8 @@ static void wg_packet_create_data(struct wg_peer *peer, struct sk_buff *first)
void wg_packet_purge_staged_packets(struct wg_peer *peer)
{
spin_lock_bh(&peer->staged_packet_queue.lock);
- peer->device->dev->stats.tx_dropped += peer->staged_packet_queue.qlen;
+ DEV_STATS_ADD(peer->device->dev, tx_dropped,
+ peer->staged_packet_queue.qlen);
__skb_queue_purge(&peer->staged_packet_queue);
spin_unlock_bh(&peer->staged_packet_queue.lock);
}
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 08/69] octeontx2-pf: Fix memory leak during interface down
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (6 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 07/69] wireguard: use DEV_STATS_INC() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 09/69] ata: pata_isapnp: Add missing error check for devm_ioport_map() Greg Kroah-Hartman
` (63 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Suman Ghosh, Simon Horman,
David S. Miller, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Suman Ghosh <sumang@marvell.com>
[ Upstream commit 5f228d7c8a539714c1e9b7e7534f76bb7979f268 ]
During 'ifconfig <netdev> down' one RSS memory was not getting freed.
This patch fixes the same.
Fixes: 81a4362016e7 ("octeontx2-pf: Add RSS multi group support")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index a718d42daeb5e..8cb4b16ffad77 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -1838,6 +1838,8 @@ int otx2_stop(struct net_device *netdev)
/* Clear RSS enable flag */
rss = &pf->hw.rss_info;
rss->enable = false;
+ if (!netif_is_rxfh_configured(netdev))
+ kfree(rss->rss_ctx[DEFAULT_RSS_CONTEXT_GROUP]);
/* Cleanup Queue IRQ */
vec = pci_irq_vector(pf->pdev,
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 09/69] ata: pata_isapnp: Add missing error check for devm_ioport_map()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (7 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 08/69] octeontx2-pf: Fix memory leak during interface down Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 10/69] drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full Greg Kroah-Hartman
` (62 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chen Ni, Sergey Shtylyov,
Damien Le Moal, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ni <nichen@iscas.ac.cn>
[ Upstream commit a6925165ea82b7765269ddd8dcad57c731aa00de ]
Add missing error return check for devm_ioport_map() and return the
error if this function call fails.
Fixes: 0d5ff566779f ("libata: convert to iomap")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/ata/pata_isapnp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 43bb224430d3c..8892931ea8676 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -82,6 +82,9 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
if (pnp_port_valid(idev, 1)) {
ctl_addr = devm_ioport_map(&idev->dev,
pnp_port_start(idev, 1), 1);
+ if (!ctl_addr)
+ return -ENOMEM;
+
ap->ioaddr.altstatus_addr = ctl_addr;
ap->ioaddr.ctl_addr = ctl_addr;
ap->ops = &isapnp_port_ops;
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 10/69] drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (8 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 09/69] ata: pata_isapnp: Add missing error check for devm_ioport_map() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 11/69] HID: core: store the unique system identifier in hid_device Greg Kroah-Hartman
` (61 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jonas Karlman, Diederik de Haas,
Christopher Obbard, Heiko Stuebner, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonas Karlman <jonas@kwiboo.se>
[ Upstream commit bb0a05acd6121ff0e810b44fdc24dbdfaa46b642 ]
Use of DRM_FORMAT_RGB888 and DRM_FORMAT_BGR888 on e.g. RK3288, RK3328
and RK3399 result in wrong colors being displayed.
The issue can be observed using modetest:
modetest -s <connector_id>@<crtc_id>:1920x1080-60@RG24
modetest -s <connector_id>@<crtc_id>:1920x1080-60@BG24
Vendor 4.4 kernel apply an inverted rb swap for these formats on VOP
full framework (IP version 3.x) compared to VOP little framework (2.x).
Fix colors by applying different rb swap for VOP full framework (3.x)
and VOP little framework (2.x) similar to vendor 4.4 kernel.
Fixes: 85a359f25388 ("drm/rockchip: Add BGR formats to VOP")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Diederik de Haas <didi.debian@cknow.org>
Reviewed-by: Christopher Obbard <chris.obbard@collabora.com>
Tested-by: Christopher Obbard <chris.obbard@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231026191500.2994225-1-jonas@kwiboo.se
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index e53b1ecbd7bc0..c7106f1165466 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -249,14 +249,22 @@ static inline void vop_cfg_done(struct vop *vop)
VOP_REG_SET(vop, common, cfg_done, 1);
}
-static bool has_rb_swapped(uint32_t format)
+static bool has_rb_swapped(uint32_t version, uint32_t format)
{
switch (format) {
case DRM_FORMAT_XBGR8888:
case DRM_FORMAT_ABGR8888:
- case DRM_FORMAT_BGR888:
case DRM_FORMAT_BGR565:
return true;
+ /*
+ * full framework (IP version 3.x) only need rb swapped for RGB888 and
+ * little framework (IP version 2.x) only need rb swapped for BGR888,
+ * check for 3.x to also only rb swap BGR888 for unknown vop version
+ */
+ case DRM_FORMAT_RGB888:
+ return VOP_MAJOR(version) == 3;
+ case DRM_FORMAT_BGR888:
+ return VOP_MAJOR(version) != 3;
default:
return false;
}
@@ -998,7 +1006,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
VOP_WIN_SET(vop, win, dsp_info, dsp_info);
VOP_WIN_SET(vop, win, dsp_st, dsp_st);
- rb_swap = has_rb_swapped(fb->format->format);
+ rb_swap = has_rb_swapped(vop->data->version, fb->format->format);
VOP_WIN_SET(vop, win, rb_swap, rb_swap);
/*
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 11/69] HID: core: store the unique system identifier in hid_device
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (9 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 10/69] drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 12/69] HID: fix HID device resource race between HID core and debugging support Greg Kroah-Hartman
` (60 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Benjamin Tissoires, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
[ Upstream commit 1e839143d674603b0bbbc4c513bca35404967dbc ]
This unique identifier is currently used only for ensuring uniqueness in
sysfs. However, this could be handful for userspace to refer to a specific
hid_device by this id.
2 use cases are in my mind: LEDs (and their naming convention), and
HID-BPF.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20220902132938.2409206-9-benjamin.tissoires@redhat.com
Stable-dep-of: fc43e9c857b7 ("HID: fix HID device resource race between HID core and debugging support")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hid/hid-core.c | 4 +++-
include/linux/hid.h | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index d941023c56289..35046adf1294e 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2442,10 +2442,12 @@ int hid_add_device(struct hid_device *hdev)
hid_warn(hdev, "bad device descriptor (%d)\n", ret);
}
+ hdev->id = atomic_inc_return(&id);
+
/* XXX hack, any other cleaner solution after the driver core
* is converted to allow more than 20 bytes as the device name? */
dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
- hdev->vendor, hdev->product, atomic_inc_return(&id));
+ hdev->vendor, hdev->product, hdev->id);
hid_debug_register(hdev, dev_name(&hdev->dev));
ret = device_add(&hdev->dev);
diff --git a/include/linux/hid.h b/include/linux/hid.h
index c3478e396829e..4fa40d2e821f2 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -630,6 +630,8 @@ struct hid_device { /* device report descriptor */
struct list_head debug_list;
spinlock_t debug_list_lock;
wait_queue_head_t debug_wait;
+
+ unsigned int id; /* system unique id */
};
#define to_hid_device(pdev) \
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 12/69] HID: fix HID device resource race between HID core and debugging support
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (10 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 11/69] HID: core: store the unique system identifier in hid_device Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 13/69] ipv4: Correct/silence an endian warning in __ip_do_redirect Greg Kroah-Hartman
` (59 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Charles Yi, Jiri Kosina, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Yi <be286@163.com>
[ Upstream commit fc43e9c857b7aa55efba9398419b14d9e35dcc7d ]
hid_debug_events_release releases resources bound to the HID device instance.
hid_device_release releases the underlying HID device instance potentially
before hid_debug_events_release has completed releasing debug resources bound
to the same HID device instance.
Reference count to prevent the HID device instance from being torn down
preemptively when HID debugging support is used. When count reaches zero,
release core resources of HID device instance using hiddev_free.
The crash:
[ 120.728477][ T4396] kernel BUG at lib/list_debug.c:53!
[ 120.728505][ T4396] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 120.739806][ T4396] Modules linked in: bcmdhd dhd_static_buf 8822cu pcie_mhi r8168
[ 120.747386][ T4396] CPU: 1 PID: 4396 Comm: hidt_bridge Not tainted 5.10.110 #257
[ 120.754771][ T4396] Hardware name: Rockchip RK3588 EVB4 LP4 V10 Board (DT)
[ 120.761643][ T4396] pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=--)
[ 120.768338][ T4396] pc : __list_del_entry_valid+0x98/0xac
[ 120.773730][ T4396] lr : __list_del_entry_valid+0x98/0xac
[ 120.779120][ T4396] sp : ffffffc01e62bb60
[ 120.783126][ T4396] x29: ffffffc01e62bb60 x28: ffffff818ce3a200
[ 120.789126][ T4396] x27: 0000000000000009 x26: 0000000000980000
[ 120.795126][ T4396] x25: ffffffc012431000 x24: ffffff802c6d4e00
[ 120.801125][ T4396] x23: ffffff8005c66f00 x22: ffffffc01183b5b8
[ 120.807125][ T4396] x21: ffffff819df2f100 x20: 0000000000000000
[ 120.813124][ T4396] x19: ffffff802c3f0700 x18: ffffffc01d2cd058
[ 120.819124][ T4396] x17: 0000000000000000 x16: 0000000000000000
[ 120.825124][ T4396] x15: 0000000000000004 x14: 0000000000003fff
[ 120.831123][ T4396] x13: ffffffc012085588 x12: 0000000000000003
[ 120.837123][ T4396] x11: 00000000ffffbfff x10: 0000000000000003
[ 120.843123][ T4396] x9 : 455103d46b329300 x8 : 455103d46b329300
[ 120.849124][ T4396] x7 : 74707572726f6320 x6 : ffffffc0124b8cb5
[ 120.855124][ T4396] x5 : ffffffffffffffff x4 : 0000000000000000
[ 120.861123][ T4396] x3 : ffffffc011cf4f90 x2 : ffffff81fee7b948
[ 120.867122][ T4396] x1 : ffffffc011cf4f90 x0 : 0000000000000054
[ 120.873122][ T4396] Call trace:
[ 120.876259][ T4396] __list_del_entry_valid+0x98/0xac
[ 120.881304][ T4396] hid_debug_events_release+0x48/0x12c
[ 120.886617][ T4396] full_proxy_release+0x50/0xbc
[ 120.891323][ T4396] __fput+0xdc/0x238
[ 120.895075][ T4396] ____fput+0x14/0x24
[ 120.898911][ T4396] task_work_run+0x90/0x148
[ 120.903268][ T4396] do_exit+0x1bc/0x8a4
[ 120.907193][ T4396] do_group_exit+0x8c/0xa4
[ 120.911458][ T4396] get_signal+0x468/0x744
[ 120.915643][ T4396] do_signal+0x84/0x280
[ 120.919650][ T4396] do_notify_resume+0xd0/0x218
[ 120.924262][ T4396] work_pending+0xc/0x3f0
[ Rahul Rameshbabu <sergeantsagara@protonmail.com>: rework changelog ]
Fixes: cd667ce24796 ("HID: use debugfs for events/reports dumping")
Signed-off-by: Charles Yi <be286@163.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hid/hid-core.c | 12 ++++++++++--
drivers/hid/hid-debug.c | 3 +++
include/linux/hid.h | 3 +++
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 35046adf1294e..7b76405df8c47 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -702,15 +702,22 @@ static void hid_close_report(struct hid_device *device)
* Free a device structure, all reports, and all fields.
*/
-static void hid_device_release(struct device *dev)
+void hiddev_free(struct kref *ref)
{
- struct hid_device *hid = to_hid_device(dev);
+ struct hid_device *hid = container_of(ref, struct hid_device, ref);
hid_close_report(hid);
kfree(hid->dev_rdesc);
kfree(hid);
}
+static void hid_device_release(struct device *dev)
+{
+ struct hid_device *hid = to_hid_device(dev);
+
+ kref_put(&hid->ref, hiddev_free);
+}
+
/*
* Fetch a report description item from the data stream. We support long
* items, though they are not used yet.
@@ -2490,6 +2497,7 @@ struct hid_device *hid_allocate_device(void)
spin_lock_init(&hdev->debug_list_lock);
sema_init(&hdev->driver_input_lock, 1);
mutex_init(&hdev->ll_open_lock);
+ kref_init(&hdev->ref);
return hdev;
}
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 03da865e423c7..b8274bdd7d27f 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -1096,6 +1096,7 @@ static int hid_debug_events_open(struct inode *inode, struct file *file)
goto out;
}
list->hdev = (struct hid_device *) inode->i_private;
+ kref_get(&list->hdev->ref);
file->private_data = list;
mutex_init(&list->read_mutex);
@@ -1188,6 +1189,8 @@ static int hid_debug_events_release(struct inode *inode, struct file *file)
list_del(&list->node);
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
kfifo_free(&list->hid_debug_fifo);
+
+ kref_put(&list->hdev->ref, hiddev_free);
kfree(list);
return 0;
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 4fa40d2e821f2..ad97435d8e01d 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -630,10 +630,13 @@ struct hid_device { /* device report descriptor */
struct list_head debug_list;
spinlock_t debug_list_lock;
wait_queue_head_t debug_wait;
+ struct kref ref;
unsigned int id; /* system unique id */
};
+void hiddev_free(struct kref *ref);
+
#define to_hid_device(pdev) \
container_of(pdev, struct hid_device, dev)
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 13/69] ipv4: Correct/silence an endian warning in __ip_do_redirect
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (11 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 12/69] HID: fix HID device resource race between HID core and debugging support Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 14/69] net: usb: ax88179_178a: fix failed operations during ax88179_reset Greg Kroah-Hartman
` (58 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eric Dumazet, Kunwu Chan,
Paolo Abeni, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kunwu Chan <chentao@kylinos.cn>
[ Upstream commit c0e2926266af3b5acf28df0a8fc6e4d90effe0bb ]
net/ipv4/route.c:783:46: warning: incorrect type in argument 2 (different base types)
net/ipv4/route.c:783:46: expected unsigned int [usertype] key
net/ipv4/route.c:783:46: got restricted __be32 [usertype] new_gw
Fixes: 969447f226b4 ("ipv4: use new_gw for redirect neigh lookup")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20231119141759.420477-1-chentao@kylinos.cn
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/ipv4/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index ea5329cb0fce2..12c59d700942f 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -786,7 +786,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
goto reject_redirect;
}
- n = __ipv4_neigh_lookup(rt->dst.dev, new_gw);
+ n = __ipv4_neigh_lookup(rt->dst.dev, (__force u32)new_gw);
if (!n)
n = neigh_create(&arp_tbl, &new_gw, rt->dst.dev);
if (!IS_ERR(n)) {
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 14/69] net: usb: ax88179_178a: fix failed operations during ax88179_reset
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (12 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 13/69] ipv4: Correct/silence an endian warning in __ip_do_redirect Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 15/69] net/smc: avoid data corruption caused by decline Greg Kroah-Hartman
` (57 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Herb Wei,
Jose Ignacio Tornos Martinez, Jakub Kicinski, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
[ Upstream commit 0739af07d1d947af27c877f797cb82ceee702515 ]
Using generic ASIX Electronics Corp. AX88179 Gigabit Ethernet device,
the following test cycle has been implemented:
- power on
- check logs
- shutdown
- after detecting the system shutdown, disconnect power
- after approximately 60 seconds of sleep, power is restored
Running some cycles, sometimes error logs like this appear:
kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -19
kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0001: -19
...
These failed operation are happening during ax88179_reset execution, so
the initialization could not be correct.
In order to avoid this, we need to increase the delay after reset and
clock initial operations. By using these larger values, many cycles
have been run and no failed operations appear.
It would be better to check some status register to verify when the
operation has finished, but I do not have found any available information
(neither in the public datasheets nor in the manufacturer's driver). The
only available information for the necessary delays is the maufacturer's
driver (original values) but the proposed values are not enough for the
tested devices.
Fixes: e2ca90c276e1f ("ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver")
Reported-by: Herb Wei <weihao.bj@ieisystem.com>
Tested-by: Herb Wei <weihao.bj@ieisystem.com>
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Link: https://lore.kernel.org/r/20231120120642.54334-1-jtornosm@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/usb/ax88179_178a.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index 0a2c3860179e7..c419baf478134 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1700,11 +1700,11 @@ static int ax88179_reset(struct usbnet *dev)
*tmp16 = AX_PHYPWR_RSTCTL_IPRL;
ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_PHYPWR_RSTCTL, 2, 2, tmp16);
- msleep(200);
+ msleep(500);
*tmp = AX_CLK_SELECT_ACS | AX_CLK_SELECT_BCS;
ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_CLK_SELECT, 1, 1, tmp);
- msleep(100);
+ msleep(200);
/* Ethernet PHY Auto Detach*/
ax88179_auto_detach(dev, 0);
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 15/69] net/smc: avoid data corruption caused by decline
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (13 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 14/69] net: usb: ax88179_178a: fix failed operations during ax88179_reset Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 16/69] arm/xen: fix xen_vcpu_info allocation alignment Greg Kroah-Hartman
` (56 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, D. Wythe, Wen Gu, Wenjia Zhang,
David S. Miller, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: D. Wythe <alibuda@linux.alibaba.com>
[ Upstream commit e6d71b437abc2f249e3b6a1ae1a7228e09c6e563 ]
We found a data corruption issue during testing of SMC-R on Redis
applications.
The benchmark has a low probability of reporting a strange error as
shown below.
"Error: Protocol error, got "\xe2" as reply type byte"
Finally, we found that the retrieved error data was as follows:
0xE2 0xD4 0xC3 0xD9 0x04 0x00 0x2C 0x20 0xA6 0x56 0x00 0x16 0x3E 0x0C
0xCB 0x04 0x02 0x01 0x00 0x00 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xE2
It is quite obvious that this is a SMC DECLINE message, which means that
the applications received SMC protocol message.
We found that this was caused by the following situations:
client server
¦ clc proposal
------------->
¦ clc accept
<-------------
¦ clc confirm
------------->
wait llc confirm
send llc confirm
¦failed llc confirm
¦ x------
(after 2s)timeout
wait llc confirm rsp
wait decline
(after 1s) timeout
(after 2s) timeout
¦ decline
-------------->
¦ decline
<--------------
As a result, a decline message was sent in the implementation, and this
message was read from TCP by the already-fallback connection.
This patch double the client timeout as 2x of the server value,
With this simple change, the Decline messages should never cross or
collide (during Confirm link timeout).
This issue requires an immediate solution, since the protocol updates
involve a more long-term solution.
Fixes: 0fb0b02bd6fd ("net/smc: adapt SMC client code to use the LLC flow")
Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/smc/af_smc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 49cf523a783a2..8c11eb70c0f69 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -398,8 +398,12 @@ static int smcr_clnt_conf_first_link(struct smc_sock *smc)
struct smc_llc_qentry *qentry;
int rc;
- /* receive CONFIRM LINK request from server over RoCE fabric */
- qentry = smc_llc_wait(link->lgr, NULL, SMC_LLC_WAIT_TIME,
+ /* Receive CONFIRM LINK request from server over RoCE fabric.
+ * Increasing the client's timeout by twice as much as the server's
+ * timeout by default can temporarily avoid decline messages of
+ * both sides crossing or colliding
+ */
+ qentry = smc_llc_wait(link->lgr, NULL, 2 * SMC_LLC_WAIT_TIME,
SMC_LLC_CONFIRM_LINK);
if (!qentry) {
struct smc_clc_msg_decline dclc;
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 16/69] arm/xen: fix xen_vcpu_info allocation alignment
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (14 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 15/69] net/smc: avoid data corruption caused by decline Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 17/69] octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF Greg Kroah-Hartman
` (55 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stefano Stabellini, Juergen Gross,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Stabellini <sstabellini@kernel.org>
[ Upstream commit 7bf9a6b46549852a37e6d07e52c601c3c706b562 ]
xen_vcpu_info is a percpu area than needs to be mapped by Xen.
Currently, it could cross a page boundary resulting in Xen being unable
to map it:
[ 0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164!
[ 0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Fix the issue by using __alloc_percpu and requesting alignment for the
memory allocation.
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2311221501340.2053963@ubuntu-linux-20-04-desktop
Fixes: 24d5373dda7c ("arm/xen: Use alloc_percpu rather than __alloc_percpu")
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/xen/enlighten.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 27277d6bbfa5a..59de416c61a30 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -359,7 +359,8 @@ static int __init xen_guest_init(void)
* for secondary CPUs as they are brought up.
* For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
*/
- xen_vcpu_info = alloc_percpu(struct vcpu_info);
+ xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
+ 1 << fls(sizeof(struct vcpu_info) - 1));
if (xen_vcpu_info == NULL)
return -ENOMEM;
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 17/69] octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (15 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 16/69] arm/xen: fix xen_vcpu_info allocation alignment Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 18/69] amd-xgbe: handle corner-case during sfp hotplug Greg Kroah-Hartman
` (54 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Suman Ghosh, Wojciech Drewek,
Simon Horman, Paolo Abeni, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Suman Ghosh <sumang@marvell.com>
[ Upstream commit 4aa1d8f89b10cdc25a231dabf808d8935e0b137a ]
It is possible to add a ntuple rule which would like to direct packet to
a VF whose number of queues are greater/less than its PF's queue numbers.
For example a PF can have 2 Rx queues but a VF created on that PF can have
8 Rx queues. As of today, ntuple rule will reject rule because it is
checking the requested queue number against PF's number of Rx queues.
As a part of this fix if the action of a ntuple rule is to move a packet
to a VF's queue then the check is removed. Also, a debug information is
printed to aware user that it is user's responsibility to cross check if
the requested queue number on that VF is a valid one.
Fixes: f0a1913f8a6f ("octeontx2-pf: Add support for ethtool ntuple filters")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20231121165624.3664182-1-sumang@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../marvell/octeontx2/nic/otx2_flows.c | 20 ++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
index 483f660cebc40..c3e5ebc416676 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
@@ -1002,6 +1002,7 @@ int otx2_add_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc)
struct ethhdr *eth_hdr;
bool new = false;
int err = 0;
+ u64 vf_num;
u32 ring;
if (!flow_cfg->max_flows) {
@@ -1014,7 +1015,21 @@ int otx2_add_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc)
if (!(pfvf->flags & OTX2_FLAG_NTUPLE_SUPPORT))
return -ENOMEM;
- if (ring >= pfvf->hw.rx_queues && fsp->ring_cookie != RX_CLS_FLOW_DISC)
+ /* Number of queues on a VF can be greater or less than
+ * the PF's queue. Hence no need to check for the
+ * queue count. Hence no need to check queue count if PF
+ * is installing for its VF. Below is the expected vf_num value
+ * based on the ethtool commands.
+ *
+ * e.g.
+ * 1. ethtool -U <netdev> ... action -1 ==> vf_num:255
+ * 2. ethtool -U <netdev> ... action <queue_num> ==> vf_num:0
+ * 3. ethtool -U <netdev> ... vf <vf_idx> queue <queue_num> ==>
+ * vf_num:vf_idx+1
+ */
+ vf_num = ethtool_get_flow_spec_ring_vf(fsp->ring_cookie);
+ if (!is_otx2_vf(pfvf->pcifunc) && !vf_num &&
+ ring >= pfvf->hw.rx_queues && fsp->ring_cookie != RX_CLS_FLOW_DISC)
return -EINVAL;
if (fsp->location >= otx2_get_maxflows(flow_cfg))
@@ -1096,6 +1111,9 @@ int otx2_add_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc)
flow_cfg->nr_flows++;
}
+ if (flow->is_vf)
+ netdev_info(pfvf->netdev,
+ "Make sure that VF's queue number is within its queue limit\n");
return 0;
}
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 18/69] amd-xgbe: handle corner-case during sfp hotplug
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (16 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 17/69] octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 19/69] amd-xgbe: handle the corner-case during tx completion Greg Kroah-Hartman
` (53 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shyam Sundar S K, Raju Rangoju,
Wojciech Drewek, Paolo Abeni, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raju Rangoju <Raju.Rangoju@amd.com>
[ Upstream commit 676ec53844cbdf2f47e68a076cdff7f0ec6cbe3f ]
Force the mode change for SFI in Fixed PHY configurations. Fixed PHY
configurations needs PLL to be enabled while doing mode set. When the
SFP module isn't connected during boot, driver assumes AN is ON and
attempts auto-negotiation. However, if the connected SFP comes up in
Fixed PHY configuration the link will not come up as PLL isn't enabled
while the initial mode set command is issued. So, force the mode change
for SFI in Fixed PHY configuration to fix link issues.
Fixes: e57f7a3feaef ("amd-xgbe: Prepare for working with more than one type of phy")
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
index ca7372369b3e6..60be836b294bb 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
@@ -1178,7 +1178,19 @@ static int xgbe_phy_config_fixed(struct xgbe_prv_data *pdata)
if (pdata->phy.duplex != DUPLEX_FULL)
return -EINVAL;
- xgbe_set_mode(pdata, mode);
+ /* Force the mode change for SFI in Fixed PHY config.
+ * Fixed PHY configs needs PLL to be enabled while doing mode set.
+ * When the SFP module isn't connected during boot, driver assumes
+ * AN is ON and attempts autonegotiation. However, if the connected
+ * SFP comes up in Fixed PHY config, the link will not come up as
+ * PLL isn't enabled while the initial mode set command is issued.
+ * So, force the mode change for SFI in Fixed PHY configuration to
+ * fix link issues.
+ */
+ if (mode == XGBE_MODE_SFI)
+ xgbe_change_mode(pdata, mode);
+ else
+ xgbe_set_mode(pdata, mode);
return 0;
}
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 19/69] amd-xgbe: handle the corner-case during tx completion
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (17 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 18/69] amd-xgbe: handle corner-case during sfp hotplug Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 20/69] amd-xgbe: propagate the correct speed and duplex status Greg Kroah-Hartman
` (52 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shyam Sundar S K, Raju Rangoju,
Wojciech Drewek, Paolo Abeni, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raju Rangoju <Raju.Rangoju@amd.com>
[ Upstream commit 7121205d5330c6a3cb3379348886d47c77b78d06 ]
The existing implementation uses software logic to accumulate tx
completions until the specified time (1ms) is met and then poll them.
However, there exists a tiny gap which leads to a race between
resetting and checking the tx_activate flag. Due to this the tx
completions are not reported to upper layer and tx queue timeout
kicks-in restarting the device.
To address this, introduce a tx cleanup mechanism as part of the
periodic maintenance process.
Fixes: c5aa9e3b8156 ("amd-xgbe: Initial AMD 10GbE platform driver")
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 555db1871ec9f..8d823bc147001 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -682,10 +682,24 @@ static void xgbe_service(struct work_struct *work)
static void xgbe_service_timer(struct timer_list *t)
{
struct xgbe_prv_data *pdata = from_timer(pdata, t, service_timer);
+ struct xgbe_channel *channel;
+ unsigned int i;
queue_work(pdata->dev_workqueue, &pdata->service_work);
mod_timer(&pdata->service_timer, jiffies + HZ);
+
+ if (!pdata->tx_usecs)
+ return;
+
+ for (i = 0; i < pdata->channel_count; i++) {
+ channel = pdata->channel[i];
+ if (!channel->tx_ring || channel->tx_timer_active)
+ break;
+ channel->tx_timer_active = 1;
+ mod_timer(&channel->tx_timer,
+ jiffies + usecs_to_jiffies(pdata->tx_usecs));
+ }
}
static void xgbe_init_timers(struct xgbe_prv_data *pdata)
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 20/69] amd-xgbe: propagate the correct speed and duplex status
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (18 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 19/69] amd-xgbe: handle the corner-case during tx completion Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 21/69] net: axienet: Fix check for partial TX checksum Greg Kroah-Hartman
` (51 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shyam Sundar S K, Raju Rangoju,
Wojciech Drewek, Paolo Abeni, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raju Rangoju <Raju.Rangoju@amd.com>
[ Upstream commit 7a2323ac24a50311f64a3a9b54ed5bef5821ecae ]
xgbe_get_link_ksettings() does not propagate correct speed and duplex
information to ethtool during cable unplug. Due to which ethtool reports
incorrect values for speed and duplex.
Address this by propagating correct information.
Fixes: 7c12aa08779c ("amd-xgbe: Move the PHY support into amd-xgbe")
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
index bafc51c34e0be..5bb7b2210b811 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
@@ -314,10 +314,15 @@ static int xgbe_get_link_ksettings(struct net_device *netdev,
cmd->base.phy_address = pdata->phy.address;
- cmd->base.autoneg = pdata->phy.autoneg;
- cmd->base.speed = pdata->phy.speed;
- cmd->base.duplex = pdata->phy.duplex;
+ if (netif_carrier_ok(netdev)) {
+ cmd->base.speed = pdata->phy.speed;
+ cmd->base.duplex = pdata->phy.duplex;
+ } else {
+ cmd->base.speed = SPEED_UNKNOWN;
+ cmd->base.duplex = DUPLEX_UNKNOWN;
+ }
+ cmd->base.autoneg = pdata->phy.autoneg;
cmd->base.port = PORT_NONE;
XGBE_LM_COPY(cmd, supported, lks, supported);
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 21/69] net: axienet: Fix check for partial TX checksum
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (19 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 20/69] amd-xgbe: propagate the correct speed and duplex status Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 22/69] afs: Return ENOENT if no cell DNS record can be found Greg Kroah-Hartman
` (50 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Samuel Holland, Andrew Lunn,
Radhey Shyam Pandey, Jakub Kicinski, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Samuel Holland <samuel.holland@sifive.com>
[ Upstream commit fd0413bbf8b11f56e8aa842783b0deda0dfe2926 ]
Due to a typo, the code checked the RX checksum feature in the TX path.
Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Link: https://lore.kernel.org/r/20231122004219.3504219-1-samuel.holland@sifive.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index e7f6c29b8dd82..63f33126d02fe 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -763,7 +763,7 @@ axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
if (lp->features & XAE_FEATURE_FULL_TX_CSUM) {
/* Tx Full Checksum Offload Enabled */
cur_p->app0 |= 2;
- } else if (lp->features & XAE_FEATURE_PARTIAL_RX_CSUM) {
+ } else if (lp->features & XAE_FEATURE_PARTIAL_TX_CSUM) {
csum_start_off = skb_transport_offset(skb);
csum_index_off = csum_start_off + skb->csum_offset;
/* Tx Partial Checksum Offload Enabled */
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 22/69] afs: Return ENOENT if no cell DNS record can be found
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (20 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 21/69] net: axienet: Fix check for partial TX checksum Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 23/69] afs: Fix file locking on R/O volumes to operate in local mode Greg Kroah-Hartman
` (49 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Markus Suvanto, David Howells,
Marc Dionne, linux-afs, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <dhowells@redhat.com>
[ Upstream commit 0167236e7d66c5e1e85d902a6abc2529b7544539 ]
Make AFS return error ENOENT if no cell SRV or AFSDB DNS record (or
cellservdb config file record) can be found rather than returning
EDESTADDRREQ.
Also add cell name lookup info to the cursor dump.
Fixes: d5c32c89b208 ("afs: Fix cell DNS lookup")
Reported-by: Markus Suvanto <markus.suvanto@gmail.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216637
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/afs/vl_rotate.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/fs/afs/vl_rotate.c b/fs/afs/vl_rotate.c
index 488e58490b16e..eb415ce563600 100644
--- a/fs/afs/vl_rotate.c
+++ b/fs/afs/vl_rotate.c
@@ -58,6 +58,12 @@ static bool afs_start_vl_iteration(struct afs_vl_cursor *vc)
}
/* Status load is ordered after lookup counter load */
+ if (cell->dns_status == DNS_LOOKUP_GOT_NOT_FOUND) {
+ pr_warn("No record of cell %s\n", cell->name);
+ vc->error = -ENOENT;
+ return false;
+ }
+
if (cell->dns_source == DNS_RECORD_UNAVAILABLE) {
vc->error = -EDESTADDRREQ;
return false;
@@ -285,6 +291,7 @@ bool afs_select_vlserver(struct afs_vl_cursor *vc)
*/
static void afs_vl_dump_edestaddrreq(const struct afs_vl_cursor *vc)
{
+ struct afs_cell *cell = vc->cell;
static int count;
int i;
@@ -294,6 +301,9 @@ static void afs_vl_dump_edestaddrreq(const struct afs_vl_cursor *vc)
rcu_read_lock();
pr_notice("EDESTADDR occurred\n");
+ pr_notice("CELL: %s err=%d\n", cell->name, cell->error);
+ pr_notice("DNS: src=%u st=%u lc=%x\n",
+ cell->dns_source, cell->dns_status, cell->dns_lookup_count);
pr_notice("VC: ut=%lx ix=%u ni=%hu fl=%hx err=%hd\n",
vc->untried, vc->index, vc->nr_iterations, vc->flags, vc->error);
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 23/69] afs: Fix file locking on R/O volumes to operate in local mode
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (21 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 22/69] afs: Return ENOENT if no cell DNS record can be found Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 24/69] nvmet: nul-terminate the NQNs passed in the connect command Greg Kroah-Hartman
` (48 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Howells, Marc Dionne,
linux-afs, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <dhowells@redhat.com>
[ Upstream commit b590eb41be766c5a63acc7e8896a042f7a4e8293 ]
AFS doesn't really do locking on R/O volumes as fileservers don't maintain
state with each other and thus a lock on a R/O volume file on one
fileserver will not be be visible to someone looking at the same file on
another fileserver.
Further, the server may return an error if you try it.
Fix this by doing what other AFS clients do and handle filelocking on R/O
volume files entirely within the client and don't touch the server.
Fixes: 6c6c1d63c243 ("afs: Provide mount-time configurable byte-range file locking emulation")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/afs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 34c68724c98be..910e73bb5a089 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -406,6 +406,8 @@ static int afs_validate_fc(struct fs_context *fc)
return PTR_ERR(volume);
ctx->volume = volume;
+ if (volume->type != AFSVL_RWVOL)
+ ctx->flock_mode = afs_flock_mode_local;
}
return 0;
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 24/69] nvmet: nul-terminate the NQNs passed in the connect command
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (22 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 23/69] afs: Fix file locking on R/O volumes to operate in local mode Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 25/69] USB: dwc3: qcom: fix resource leaks on probe deferral Greg Kroah-Hartman
` (47 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alon Zahavi, Chaitanya Kulkarni,
Christoph Hellwig, Keith Busch, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <hch@lst.de>
[ Upstream commit 1c22e0295a5eb571c27b53c7371f95699ef705ff ]
The host and subsystem NQNs are passed in the connect command payload and
interpreted as nul-terminated strings. Ensure they actually are
nul-terminated before using them.
Fixes: a07b4970f464 "nvmet: add a generic NVMe target")
Reported-by: Alon Zahavi <zahavi.alon@gmail.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/nvme/target/fabrics-cmd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c
index 7d0454cee9205..e5ee3d3ce1649 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -206,6 +206,8 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)
goto out;
}
+ d->subsysnqn[NVMF_NQN_FIELD_LEN - 1] = '\0';
+ d->hostnqn[NVMF_NQN_FIELD_LEN - 1] = '\0';
status = nvmet_alloc_ctrl(d->subsysnqn, d->hostnqn, req,
le32_to_cpu(c->kato), &ctrl);
if (status)
@@ -263,6 +265,8 @@ static void nvmet_execute_io_connect(struct nvmet_req *req)
goto out;
}
+ d->subsysnqn[NVMF_NQN_FIELD_LEN - 1] = '\0';
+ d->hostnqn[NVMF_NQN_FIELD_LEN - 1] = '\0';
ctrl = nvmet_ctrl_find_get(d->subsysnqn, d->hostnqn,
le16_to_cpu(d->cntlid), req);
if (!ctrl) {
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 25/69] USB: dwc3: qcom: fix resource leaks on probe deferral
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (23 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 24/69] nvmet: nul-terminate the NQNs passed in the connect command Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 26/69] USB: dwc3: qcom: fix ACPI platform device leak Greg Kroah-Hartman
` (46 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christophe JAILLET, Lee Jones,
Johan Hovold, Andrew Halaney, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan+linaro@kernel.org>
[ Upstream commit 51392a1879ff06dc21b68aef4825f6ef68a7be42 ]
The driver needs to deregister and free the newly allocated dwc3 core
platform device on ACPI probe errors (e.g. probe deferral) and on driver
unbind but instead it leaked those resources while erroneously dropping
a reference to the parent platform device which is still in use.
For OF probing the driver takes a reference to the dwc3 core platform
device which has also always been leaked.
Fix the broken ACPI tear down and make sure to drop the dwc3 core
reference for both OF and ACPI.
Fixes: 8fd95da2cfb5 ("usb: dwc3: qcom: Release the correct resources in dwc3_qcom_remove()")
Fixes: 2bc02355f8ba ("usb: dwc3: qcom: Add support for booting with ACPI")
Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
Cc: stable@vger.kernel.org # 4.18
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Lee Jones <lee@kernel.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20231117173650.21161-2-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 9cf87666fc6e ("USB: dwc3: qcom: fix ACPI platform device leak")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/dwc3/dwc3-qcom.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 0180350a2c95c..d7240cdca07c1 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -695,6 +695,7 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
if (!qcom->dwc3) {
ret = -ENODEV;
dev_err(dev, "failed to get dwc3 platform device\n");
+ of_platform_depopulate(dev);
}
node_put:
@@ -836,7 +837,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
if (ret) {
dev_err(dev, "failed to register DWC3 Core, err=%d\n", ret);
- goto depopulate;
+ goto clk_disable;
}
ret = dwc3_qcom_interconnect_init(qcom);
@@ -868,7 +869,8 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
if (np)
of_platform_depopulate(&pdev->dev);
else
- platform_device_put(pdev);
+ platform_device_del(qcom->dwc3);
+ platform_device_put(qcom->dwc3);
clk_disable:
for (i = qcom->num_clocks - 1; i >= 0; i--) {
clk_disable_unprepare(qcom->clks[i]);
@@ -891,7 +893,8 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
if (np)
of_platform_depopulate(&pdev->dev);
else
- platform_device_put(pdev);
+ platform_device_del(qcom->dwc3);
+ platform_device_put(qcom->dwc3);
for (i = qcom->num_clocks - 1; i >= 0; i--) {
clk_disable_unprepare(qcom->clks[i]);
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 26/69] USB: dwc3: qcom: fix ACPI platform device leak
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (24 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 25/69] USB: dwc3: qcom: fix resource leaks on probe deferral Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 27/69] lockdep: Fix block chain corruption Greg Kroah-Hartman
` (45 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shawn Guo, Johan Hovold,
Andrew Halaney, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan+linaro@kernel.org>
[ Upstream commit 9cf87666fc6e08572341fe08ecd909935998fbbd ]
Make sure to free the "urs" platform device, which is created for some
ACPI platforms, on probe errors and on driver unbind.
Compile-tested only.
Fixes: c25c210f590e ("usb: dwc3: qcom: add URS Host support for sdm845 ACPI boot")
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Andrew Halaney <ahalaney@redhat.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Link: https://lore.kernel.org/r/20231117173650.21161-4-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/dwc3/dwc3-qcom.c | 37 +++++++++++++++++++++++++++++-------
1 file changed, 30 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index d7240cdca07c1..5d67378bd77ce 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -704,9 +704,9 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
return ret;
}
-static struct platform_device *
-dwc3_qcom_create_urs_usb_platdev(struct device *dev)
+static struct platform_device *dwc3_qcom_create_urs_usb_platdev(struct device *dev)
{
+ struct platform_device *urs_usb = NULL;
struct fwnode_handle *fwh;
struct acpi_device *adev;
char name[8];
@@ -726,9 +726,26 @@ dwc3_qcom_create_urs_usb_platdev(struct device *dev)
adev = to_acpi_device_node(fwh);
if (!adev)
- return NULL;
+ goto err_put_handle;
+
+ urs_usb = acpi_create_platform_device(adev, NULL);
+ if (IS_ERR_OR_NULL(urs_usb))
+ goto err_put_handle;
+
+ return urs_usb;
- return acpi_create_platform_device(adev, NULL);
+err_put_handle:
+ fwnode_handle_put(fwh);
+
+ return urs_usb;
+}
+
+static void dwc3_qcom_destroy_urs_usb_platdev(struct platform_device *urs_usb)
+{
+ struct fwnode_handle *fwh = urs_usb->dev.fwnode;
+
+ platform_device_unregister(urs_usb);
+ fwnode_handle_put(fwh);
}
static int dwc3_qcom_probe(struct platform_device *pdev)
@@ -812,13 +829,13 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
qcom->qscratch_base = devm_ioremap_resource(dev, parent_res);
if (IS_ERR(qcom->qscratch_base)) {
ret = PTR_ERR(qcom->qscratch_base);
- goto clk_disable;
+ goto free_urs;
}
ret = dwc3_qcom_setup_irq(pdev);
if (ret) {
dev_err(dev, "failed to setup IRQs, err=%d\n", ret);
- goto clk_disable;
+ goto free_urs;
}
/*
@@ -837,7 +854,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
if (ret) {
dev_err(dev, "failed to register DWC3 Core, err=%d\n", ret);
- goto clk_disable;
+ goto free_urs;
}
ret = dwc3_qcom_interconnect_init(qcom);
@@ -871,6 +888,9 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
else
platform_device_del(qcom->dwc3);
platform_device_put(qcom->dwc3);
+free_urs:
+ if (qcom->urs_usb)
+ dwc3_qcom_destroy_urs_usb_platdev(qcom->urs_usb);
clk_disable:
for (i = qcom->num_clocks - 1; i >= 0; i--) {
clk_disable_unprepare(qcom->clks[i]);
@@ -896,6 +916,9 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
platform_device_del(qcom->dwc3);
platform_device_put(qcom->dwc3);
+ if (qcom->urs_usb)
+ dwc3_qcom_destroy_urs_usb_platdev(qcom->urs_usb);
+
for (i = qcom->num_clocks - 1; i >= 0; i--) {
clk_disable_unprepare(qcom->clks[i]);
clk_put(qcom->clks[i]);
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 27/69] lockdep: Fix block chain corruption
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (25 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 26/69] USB: dwc3: qcom: fix ACPI platform device leak Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 28/69] MIPS: KVM: Fix a build warning about variable set but not used Greg Kroah-Hartman
` (44 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kent Overstreet,
Peter Zijlstra (Intel), Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <peterz@infradead.org>
[ Upstream commit bca4104b00fec60be330cd32818dd5c70db3d469 ]
Kent reported an occasional KASAN splat in lockdep. Mark then noted:
> I suspect the dodgy access is to chain_block_buckets[-1], which hits the last 4
> bytes of the redzone and gets (incorrectly/misleadingly) attributed to
> nr_large_chain_blocks.
That would mean @size == 0, at which point size_to_bucket() returns -1
and the above happens.
alloc_chain_hlocks() has 'size - req', for the first with the
precondition 'size >= rq', which allows the 0.
This code is trying to split a block, del_chain_block() takes what we
need, and add_chain_block() puts back the remainder, except in the
above case the remainder is 0 sized and things go sideways.
Fixes: 810507fe6fd5 ("locking/lockdep: Reuse freed chain_hlocks entries")
Reported-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Kent Overstreet <kent.overstreet@linux.dev>
Link: https://lkml.kernel.org/r/20231121114126.GH8262@noisy.programming.kicks-ass.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/locking/lockdep.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index e6a282bc16652..770ff5bf14878 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -3416,7 +3416,8 @@ static int alloc_chain_hlocks(int req)
size = chain_block_size(curr);
if (likely(size >= req)) {
del_chain_block(0, size, chain_block_next(curr));
- add_chain_block(curr + req, size - req);
+ if (size > req)
+ add_chain_block(curr + req, size - req);
return curr;
}
}
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 28/69] MIPS: KVM: Fix a build warning about variable set but not used
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (26 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 27/69] lockdep: Fix block chain corruption Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 29/69] media: camss: Replace hard coded value with parameter Greg Kroah-Hartman
` (43 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, kernel test robot, Huacai Chen,
Philippe Mathieu-Daudé, Thomas Bogendoerfer, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huacai Chen <chenhuacai@loongson.cn>
[ Upstream commit 83767a67e7b6a0291cde5681ec7e3708f3f8f877 ]
After commit 411740f5422a ("KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU")
old_pte is no longer used in kvm_mips_map_page(). So remove it to fix a
build warning about variable set but not used:
arch/mips/kvm/mmu.c: In function 'kvm_mips_map_page':
>> arch/mips/kvm/mmu.c:701:29: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
701 | pte_t *ptep, entry, old_pte;
| ^~~~~~~
Cc: stable@vger.kernel.org
Fixes: 411740f5422a960 ("KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310070530.aARZCSfh-lkp@intel.com/
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/mips/kvm/mmu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c
index 1bfd1b501d823..72b5249452273 100644
--- a/arch/mips/kvm/mmu.c
+++ b/arch/mips/kvm/mmu.c
@@ -593,7 +593,7 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
gfn_t gfn = gpa >> PAGE_SHIFT;
int srcu_idx, err;
kvm_pfn_t pfn;
- pte_t *ptep, entry, old_pte;
+ pte_t *ptep, entry;
bool writeable;
unsigned long prot_bits;
unsigned long mmu_seq;
@@ -665,7 +665,6 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
entry = pfn_pte(pfn, __pgprot(prot_bits));
/* Write the PTE */
- old_pte = *ptep;
set_pte(ptep, entry);
err = 0;
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 29/69] media: camss: Replace hard coded value with parameter
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (27 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 28/69] MIPS: KVM: Fix a build warning about variable set but not used Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 30/69] media: camss: sm8250: Virtual channels for CSID Greg Kroah-Hartman
` (42 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, kernel test robot,
Souptick Joarder (HPE), Robert Foss, Hans Verkuil, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Souptick Joarder (HPE) <jrdr.linux@gmail.com>
[ Upstream commit a312f8982632fb1a882a8dc3c9fd127d082c1c02 ]
Kernel test robot reported below warning ->
drivers/media/platform/qcom/camss/camss-csid-gen2.c:407:3:
warning: Value stored to 'val' is never read
[clang-analyzer-deadcode.DeadStores]
Replace hard coded value with val.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder (HPE) <jrdr.linux@gmail.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Stable-dep-of: e655d1ae9703 ("media: qcom: camss: Fix set CSI2_RX_CFG1_VC_MODE when VC is greater than 3")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/qcom/camss/camss-csid-170.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/camss/camss-csid-170.c b/drivers/media/platform/qcom/camss/camss-csid-170.c
index 82f59933ad7b3..c234b8d67bc59 100644
--- a/drivers/media/platform/qcom/camss/camss-csid-170.c
+++ b/drivers/media/platform/qcom/camss/camss-csid-170.c
@@ -398,7 +398,7 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable)
writel_relaxed(val, csid->base + CSID_RDI_FRM_DROP_PERIOD(0));
val = 0;
- writel_relaxed(0, csid->base + CSID_RDI_FRM_DROP_PATTERN(0));
+ writel_relaxed(val, csid->base + CSID_RDI_FRM_DROP_PATTERN(0));
val = 1;
writel_relaxed(val, csid->base + CSID_RDI_IRQ_SUBSAMPLE_PERIOD(0));
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 30/69] media: camss: sm8250: Virtual channels for CSID
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (28 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 29/69] media: camss: Replace hard coded value with parameter Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 31/69] media: qcom: camss: Fix set CSI2_RX_CFG1_VC_MODE when VC is greater than 3 Greg Kroah-Hartman
` (41 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Milen Mitkov, Robert Foss,
Bryan ODonoghue, Hans Verkuil, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Milen Mitkov <quic_mmitkov@quicinc.com>
[ Upstream commit 3c4ed72a16bc6733cda9c65048af74a2e8eaa0eb ]
CSID hardware on SM8250 can demux up to 4 simultaneous streams
based on virtual channel (vc) or datatype (dt).
The CSID subdevice entity now has 4 source ports that can be
enabled/disabled and thus can control which virtual channels
are enabled. Datatype demuxing not tested.
In order to keep a valid internal state of the subdevice,
implicit format propagation from the sink to the source pads
has been preserved. However, the format on each source pad
can be different and in that case it must be configured explicitly.
CSID's s_stream is called when any stream is started or stopped.
It will call configure_streams() that will rewrite IRQ settings to HW.
When multiple streams are running simultaneously there is an issue
when writing IRQ settings for one stream while another is still
running, thus avoid re-writing settings if they were not changed
in link setup, or by fully powering off the CSID hardware.
Signed-off-by: Milen Mitkov <quic_mmitkov@quicinc.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Stable-dep-of: e655d1ae9703 ("media: qcom: camss: Fix set CSI2_RX_CFG1_VC_MODE when VC is greater than 3")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../platform/qcom/camss/camss-csid-170.c | 54 ++++++++++++-------
.../media/platform/qcom/camss/camss-csid.c | 44 ++++++++++-----
.../media/platform/qcom/camss/camss-csid.h | 11 +++-
3 files changed, 74 insertions(+), 35 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss-csid-170.c b/drivers/media/platform/qcom/camss/camss-csid-170.c
index c234b8d67bc59..7ccf0c11a1a21 100644
--- a/drivers/media/platform/qcom/camss/camss-csid-170.c
+++ b/drivers/media/platform/qcom/camss/camss-csid-170.c
@@ -327,13 +327,14 @@ static const struct csid_format csid_formats[] = {
},
};
-static void csid_configure_stream(struct csid_device *csid, u8 enable)
+static void __csid_configure_stream(struct csid_device *csid, u8 enable, u8 vc)
{
struct csid_testgen_config *tg = &csid->testgen;
u32 val;
u32 phy_sel = 0;
u8 lane_cnt = csid->phy.lane_cnt;
- struct v4l2_mbus_framefmt *input_format = &csid->fmt[MSM_CSID_PAD_SRC];
+ /* Source pads matching RDI channels on hardware. Pad 1 -> RDI0, Pad 2 -> RDI1, etc. */
+ struct v4l2_mbus_framefmt *input_format = &csid->fmt[MSM_CSID_PAD_FIRST_SRC + vc];
const struct csid_format *format = csid_get_fmt_entry(csid->formats, csid->nformats,
input_format->code);
@@ -344,8 +345,7 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable)
phy_sel = csid->phy.csiphy_id;
if (enable) {
- u8 vc = 0; /* Virtual Channel 0 */
- u8 dt_id = vc * 4;
+ u8 dt_id = vc;
if (tg->enabled) {
/* Config Test Generator */
@@ -388,42 +388,42 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable)
val |= format->data_type << RDI_CFG0_DATA_TYPE;
val |= vc << RDI_CFG0_VIRTUAL_CHANNEL;
val |= dt_id << RDI_CFG0_DT_ID;
- writel_relaxed(val, csid->base + CSID_RDI_CFG0(0));
+ writel_relaxed(val, csid->base + CSID_RDI_CFG0(vc));
/* CSID_TIMESTAMP_STB_POST_IRQ */
val = 2 << RDI_CFG1_TIMESTAMP_STB_SEL;
- writel_relaxed(val, csid->base + CSID_RDI_CFG1(0));
+ writel_relaxed(val, csid->base + CSID_RDI_CFG1(vc));
val = 1;
- writel_relaxed(val, csid->base + CSID_RDI_FRM_DROP_PERIOD(0));
+ writel_relaxed(val, csid->base + CSID_RDI_FRM_DROP_PERIOD(vc));
val = 0;
- writel_relaxed(val, csid->base + CSID_RDI_FRM_DROP_PATTERN(0));
+ writel_relaxed(val, csid->base + CSID_RDI_FRM_DROP_PATTERN(vc));
val = 1;
- writel_relaxed(val, csid->base + CSID_RDI_IRQ_SUBSAMPLE_PERIOD(0));
+ writel_relaxed(val, csid->base + CSID_RDI_IRQ_SUBSAMPLE_PERIOD(vc));
val = 0;
- writel_relaxed(val, csid->base + CSID_RDI_IRQ_SUBSAMPLE_PATTERN(0));
+ writel_relaxed(val, csid->base + CSID_RDI_IRQ_SUBSAMPLE_PATTERN(vc));
val = 1;
- writel_relaxed(val, csid->base + CSID_RDI_RPP_PIX_DROP_PERIOD(0));
+ writel_relaxed(val, csid->base + CSID_RDI_RPP_PIX_DROP_PERIOD(vc));
val = 0;
- writel_relaxed(val, csid->base + CSID_RDI_RPP_PIX_DROP_PATTERN(0));
+ writel_relaxed(val, csid->base + CSID_RDI_RPP_PIX_DROP_PATTERN(vc));
val = 1;
- writel_relaxed(val, csid->base + CSID_RDI_RPP_LINE_DROP_PERIOD(0));
+ writel_relaxed(val, csid->base + CSID_RDI_RPP_LINE_DROP_PERIOD(vc));
val = 0;
- writel_relaxed(val, csid->base + CSID_RDI_RPP_LINE_DROP_PATTERN(0));
+ writel_relaxed(val, csid->base + CSID_RDI_RPP_LINE_DROP_PATTERN(vc));
val = 0;
- writel_relaxed(val, csid->base + CSID_RDI_CTRL(0));
+ writel_relaxed(val, csid->base + CSID_RDI_CTRL(vc));
- val = readl_relaxed(csid->base + CSID_RDI_CFG0(0));
+ val = readl_relaxed(csid->base + CSID_RDI_CFG0(vc));
val |= 1 << RDI_CFG0_ENABLE;
- writel_relaxed(val, csid->base + CSID_RDI_CFG0(0));
+ writel_relaxed(val, csid->base + CSID_RDI_CFG0(vc));
}
if (tg->enabled) {
@@ -449,7 +449,16 @@ static void csid_configure_stream(struct csid_device *csid, u8 enable)
val = HALT_CMD_RESUME_AT_FRAME_BOUNDARY << RDI_CTRL_HALT_CMD;
else
val = HALT_CMD_HALT_AT_FRAME_BOUNDARY << RDI_CTRL_HALT_CMD;
- writel_relaxed(val, csid->base + CSID_RDI_CTRL(0));
+ writel_relaxed(val, csid->base + CSID_RDI_CTRL(vc));
+}
+
+static void csid_configure_stream(struct csid_device *csid, u8 enable)
+{
+ u8 i;
+ /* Loop through all enabled VCs and configure stream for each */
+ for (i = 0; i < MSM_CSID_MAX_SRC_STREAMS; i++)
+ if (csid->phy.en_vc & BIT(i))
+ __csid_configure_stream(csid, enable, i);
}
static int csid_configure_testgen_pattern(struct csid_device *csid, s32 val)
@@ -495,6 +504,7 @@ static irqreturn_t csid_isr(int irq, void *dev)
struct csid_device *csid = dev;
u32 val;
u8 reset_done;
+ int i;
val = readl_relaxed(csid->base + CSID_TOP_IRQ_STATUS);
writel_relaxed(val, csid->base + CSID_TOP_IRQ_CLEAR);
@@ -503,8 +513,12 @@ static irqreturn_t csid_isr(int irq, void *dev)
val = readl_relaxed(csid->base + CSID_CSI2_RX_IRQ_STATUS);
writel_relaxed(val, csid->base + CSID_CSI2_RX_IRQ_CLEAR);
- val = readl_relaxed(csid->base + CSID_CSI2_RDIN_IRQ_STATUS(0));
- writel_relaxed(val, csid->base + CSID_CSI2_RDIN_IRQ_CLEAR(0));
+ /* Read and clear IRQ status for each enabled RDI channel */
+ for (i = 0; i < MSM_CSID_MAX_SRC_STREAMS; i++)
+ if (csid->phy.en_vc & BIT(i)) {
+ val = readl_relaxed(csid->base + CSID_CSI2_RDIN_IRQ_STATUS(i));
+ writel_relaxed(val, csid->base + CSID_CSI2_RDIN_IRQ_CLEAR(i));
+ }
val = 1 << IRQ_CMD_CLEAR;
writel_relaxed(val, csid->base + CSID_IRQ_CMD);
diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c
index a1637b78568b2..2a294587ec9d9 100644
--- a/drivers/media/platform/qcom/camss/camss-csid.c
+++ b/drivers/media/platform/qcom/camss/camss-csid.c
@@ -180,6 +180,8 @@ static int csid_set_power(struct v4l2_subdev *sd, int on)
return ret;
}
+ csid->phy.need_vc_update = true;
+
enable_irq(csid->irq);
ret = csid->ops->reset(csid);
@@ -229,7 +231,10 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable)
return -ENOLINK;
}
- csid->ops->configure_stream(csid, enable);
+ if (csid->phy.need_vc_update) {
+ csid->ops->configure_stream(csid, enable);
+ csid->phy.need_vc_update = false;
+ }
return 0;
}
@@ -440,6 +445,7 @@ static int csid_set_format(struct v4l2_subdev *sd,
{
struct csid_device *csid = v4l2_get_subdevdata(sd);
struct v4l2_mbus_framefmt *format;
+ int i;
format = __csid_get_format(csid, sd_state, fmt->pad, fmt->which);
if (format == NULL)
@@ -448,14 +454,14 @@ static int csid_set_format(struct v4l2_subdev *sd,
csid_try_format(csid, sd_state, fmt->pad, &fmt->format, fmt->which);
*format = fmt->format;
- /* Propagate the format from sink to source */
+ /* Propagate the format from sink to source pads */
if (fmt->pad == MSM_CSID_PAD_SINK) {
- format = __csid_get_format(csid, sd_state, MSM_CSID_PAD_SRC,
- fmt->which);
+ for (i = MSM_CSID_PAD_FIRST_SRC; i < MSM_CSID_PADS_NUM; ++i) {
+ format = __csid_get_format(csid, sd_state, i, fmt->which);
- *format = fmt->format;
- csid_try_format(csid, sd_state, MSM_CSID_PAD_SRC, format,
- fmt->which);
+ *format = fmt->format;
+ csid_try_format(csid, sd_state, i, format, fmt->which);
+ }
}
return 0;
@@ -695,7 +701,6 @@ static int csid_link_setup(struct media_entity *entity,
struct csid_device *csid;
struct csiphy_device *csiphy;
struct csiphy_lanes_cfg *lane_cfg;
- struct v4l2_subdev_format format = { 0 };
sd = media_entity_to_v4l2_subdev(entity);
csid = v4l2_get_subdevdata(sd);
@@ -718,11 +723,22 @@ static int csid_link_setup(struct media_entity *entity,
lane_cfg = &csiphy->cfg.csi2->lane_cfg;
csid->phy.lane_cnt = lane_cfg->num_data;
csid->phy.lane_assign = csid_get_lane_assign(lane_cfg);
+ }
+ /* Decide which virtual channels to enable based on which source pads are enabled */
+ if (local->flags & MEDIA_PAD_FL_SOURCE) {
+ struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
+ struct csid_device *csid = v4l2_get_subdevdata(sd);
+ struct device *dev = csid->camss->dev;
+
+ if (flags & MEDIA_LNK_FL_ENABLED)
+ csid->phy.en_vc |= BIT(local->index - 1);
+ else
+ csid->phy.en_vc &= ~BIT(local->index - 1);
- /* Reset format on source pad to sink pad format */
- format.pad = MSM_CSID_PAD_SRC;
- format.which = V4L2_SUBDEV_FORMAT_ACTIVE;
- csid_set_format(&csid->subdev, NULL, &format);
+ csid->phy.need_vc_update = true;
+
+ dev_dbg(dev, "%s: Enabled CSID virtual channels mask 0x%x\n",
+ __func__, csid->phy.en_vc);
}
return 0;
@@ -773,6 +789,7 @@ int msm_csid_register_entity(struct csid_device *csid,
struct v4l2_subdev *sd = &csid->subdev;
struct media_pad *pads = csid->pads;
struct device *dev = csid->camss->dev;
+ int i;
int ret;
v4l2_subdev_init(sd, &csid_v4l2_ops);
@@ -809,7 +826,8 @@ int msm_csid_register_entity(struct csid_device *csid,
}
pads[MSM_CSID_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
- pads[MSM_CSID_PAD_SRC].flags = MEDIA_PAD_FL_SOURCE;
+ for (i = MSM_CSID_PAD_FIRST_SRC; i < MSM_CSID_PADS_NUM; ++i)
+ pads[i].flags = MEDIA_PAD_FL_SOURCE;
sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
sd->entity.ops = &csid_media_ops;
diff --git a/drivers/media/platform/qcom/camss/camss-csid.h b/drivers/media/platform/qcom/camss/camss-csid.h
index 814ebc7c29d65..6b5485fe18332 100644
--- a/drivers/media/platform/qcom/camss/camss-csid.h
+++ b/drivers/media/platform/qcom/camss/camss-csid.h
@@ -19,8 +19,13 @@
#include <media/v4l2-subdev.h>
#define MSM_CSID_PAD_SINK 0
-#define MSM_CSID_PAD_SRC 1
-#define MSM_CSID_PADS_NUM 2
+#define MSM_CSID_PAD_FIRST_SRC 1
+#define MSM_CSID_PADS_NUM 5
+
+#define MSM_CSID_PAD_SRC (MSM_CSID_PAD_FIRST_SRC)
+
+/* CSID hardware can demultiplex up to 4 outputs */
+#define MSM_CSID_MAX_SRC_STREAMS 4
#define DATA_TYPE_EMBEDDED_DATA_8BIT 0x12
#define DATA_TYPE_YUV420_8BIT 0x18
@@ -81,6 +86,8 @@ struct csid_phy_config {
u8 csiphy_id;
u8 lane_cnt;
u32 lane_assign;
+ u32 en_vc;
+ u8 need_vc_update;
};
struct csid_device;
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 31/69] media: qcom: camss: Fix set CSI2_RX_CFG1_VC_MODE when VC is greater than 3
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (29 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 30/69] media: camss: sm8250: Virtual channels for CSID Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 32/69] media: qcom: camss: Fix csid-gen2 for test pattern generator Greg Kroah-Hartman
` (40 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bryan ODonoghue, Laurent Pinchart,
Hans Verkuil, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
[ Upstream commit e655d1ae9703286cef7fda8675cad62f649dc183 ]
VC_MODE = 0 implies a two bit VC address.
VC_MODE = 1 is required for VCs with a larger address than two bits.
Fixes: eebe6d00e9bf ("media: camss: Add support for CSID hardware version Titan 170")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/qcom/camss/camss-csid-170.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/qcom/camss/camss-csid-170.c b/drivers/media/platform/qcom/camss/camss-csid-170.c
index 7ccf0c11a1a21..270a960165b53 100644
--- a/drivers/media/platform/qcom/camss/camss-csid-170.c
+++ b/drivers/media/platform/qcom/camss/camss-csid-170.c
@@ -442,6 +442,8 @@ static void __csid_configure_stream(struct csid_device *csid, u8 enable, u8 vc)
writel_relaxed(val, csid->base + CSID_CSI2_RX_CFG0);
val = 1 << CSI2_RX_CFG1_PACKET_ECC_CORRECTION_EN;
+ if (vc > 3)
+ val |= 1 << CSI2_RX_CFG1_VC_MODE;
val |= 1 << CSI2_RX_CFG1_MISR_EN;
writel_relaxed(val, csid->base + CSID_CSI2_RX_CFG1); // csi2_vc_mode_shift_val ?
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 32/69] media: qcom: camss: Fix csid-gen2 for test pattern generator
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (30 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 31/69] media: qcom: camss: Fix set CSI2_RX_CFG1_VC_MODE when VC is greater than 3 Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 33/69] ext4: add a new helper to check if es must be kept Greg Kroah-Hartman
` (39 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andrey Konovalov, Bryan ODonoghue,
Laurent Pinchart, Hans Verkuil, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrey Konovalov <andrey.konovalov@linaro.org>
[ Upstream commit 87889f1b7ea40d2544b49c62092e6ef2792dced7 ]
In the current driver csid Test Pattern Generator (TPG) doesn't work.
This change:
- fixes writing frame width and height values into CSID_TPG_DT_n_CFG_0
- fixes the shift by one between test_pattern control value and the
actual pattern.
- drops fixed VC of 0x0a which testing showed prohibited some test
patterns in the CSID to produce output.
So that TPG starts working, but with the below limitations:
- only test_pattern=9 works as it should
- test_pattern=8 and test_pattern=7 produce black frame (all zeroes)
- the rest of test_pattern's don't work (yavta doesn't get the data)
- regardless of the CFA pattern set by 'media-ctl -V' the actual pixel
order is always the same (RGGB for any RAW8 or RAW10P format in
4608x2592 resolution).
Tested with:
RAW10P format, VC0:
media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4608x2592 field:none]'
media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4608x2592 field:none]'
media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
v4l2-ctl -d /dev/v4l-subdev6 -c test_pattern=9
yavta -B capture-mplane --capture=3 -n 3 -f SRGGB10P -s 4608x2592 /dev/video0
RAW10P format, VC1:
media-ctl -V '"msm_csid0":2[fmt:SRGGB10/4608x2592 field:none]'
media-ctl -V '"msm_vfe0_rdi1":0[fmt:SRGGB10/4608x2592 field:none]'
media-ctl -l '"msm_csid0":2->"msm_vfe0_rdi1":0[1]'
v4l2-ctl -d /dev/v4l-subdev6 -c test_pattern=9
yavta -B capture-mplane --capture=3 -n 3 -f SRGGB10P -s 4608x2592 /dev/video1
RAW8 format, VC0:
media-ctl --reset
media-ctl -V '"msm_csid0":0[fmt:SRGGB8/4608x2592 field:none]'
media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB8/4608x2592 field:none]'
media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
yavta -B capture-mplane --capture=3 -n 3 -f SRGGB8 -s 4608x2592 /dev/video0
Fixes: eebe6d00e9bf ("media: camss: Add support for CSID hardware version Titan 170")
Cc: stable@vger.kernel.org
Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/qcom/camss/camss-csid-170.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss-csid-170.c b/drivers/media/platform/qcom/camss/camss-csid-170.c
index 270a960165b53..f7839e994bda6 100644
--- a/drivers/media/platform/qcom/camss/camss-csid-170.c
+++ b/drivers/media/platform/qcom/camss/camss-csid-170.c
@@ -348,9 +348,6 @@ static void __csid_configure_stream(struct csid_device *csid, u8 enable, u8 vc)
u8 dt_id = vc;
if (tg->enabled) {
- /* Config Test Generator */
- vc = 0xa;
-
/* configure one DT, infinite frames */
val = vc << TPG_VC_CFG0_VC_NUM;
val |= INTELEAVING_MODE_ONE_SHOT << TPG_VC_CFG0_LINE_INTERLEAVING_MODE;
@@ -363,14 +360,14 @@ static void __csid_configure_stream(struct csid_device *csid, u8 enable, u8 vc)
writel_relaxed(0x12345678, csid->base + CSID_TPG_LFSR_SEED);
- val = input_format->height & 0x1fff << TPG_DT_n_CFG_0_FRAME_HEIGHT;
- val |= input_format->width & 0x1fff << TPG_DT_n_CFG_0_FRAME_WIDTH;
+ val = (input_format->height & 0x1fff) << TPG_DT_n_CFG_0_FRAME_HEIGHT;
+ val |= (input_format->width & 0x1fff) << TPG_DT_n_CFG_0_FRAME_WIDTH;
writel_relaxed(val, csid->base + CSID_TPG_DT_n_CFG_0(0));
val = format->data_type << TPG_DT_n_CFG_1_DATA_TYPE;
writel_relaxed(val, csid->base + CSID_TPG_DT_n_CFG_1(0));
- val = tg->mode << TPG_DT_n_CFG_2_PAYLOAD_MODE;
+ val = (tg->mode - 1) << TPG_DT_n_CFG_2_PAYLOAD_MODE;
val |= 0xBE << TPG_DT_n_CFG_2_USER_SPECIFIED_PAYLOAD;
val |= format->decode_format << TPG_DT_n_CFG_2_ENCODE_FORMAT;
writel_relaxed(val, csid->base + CSID_TPG_DT_n_CFG_2(0));
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 33/69] ext4: add a new helper to check if es must be kept
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (31 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 32/69] media: qcom: camss: Fix csid-gen2 for test pattern generator Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 34/69] ext4: factor out __es_alloc_extent() and __es_free_extent() Greg Kroah-Hartman
` (38 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jan Kara, Baokun Li, Theodore Tso,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <libaokun1@huawei.com>
[ Upstream commit 9649eb18c6288f514cacffdd699d5cd999c2f8f6 ]
In the extent status tree, we have extents which we can just drop without
issues and extents we must not drop - this depends on the extent's status
- currently ext4_es_is_delayed() extents must stay, others may be dropped.
A helper function is added to help determine if the current extent can
be dropped, although only ext4_es_is_delayed() extents cannot be dropped
currently.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-3-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: 8e387c89e96b ("ext4: make sure allocate pending entry not fail")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents_status.c | 34 +++++++++++++++++++++-------------
1 file changed, 21 insertions(+), 13 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 7806adcc41a7a..cf6a21baddbc4 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -448,6 +448,19 @@ static void ext4_es_list_del(struct inode *inode)
spin_unlock(&sbi->s_es_lock);
}
+/*
+ * Returns true if we cannot fail to allocate memory for this extent_status
+ * entry and cannot reclaim it until its status changes.
+ */
+static inline bool ext4_es_must_keep(struct extent_status *es)
+{
+ /* fiemap, bigalloc, and seek_data/hole need to use it. */
+ if (ext4_es_is_delayed(es))
+ return true;
+
+ return false;
+}
+
static struct extent_status *
ext4_es_alloc_extent(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len,
ext4_fsblk_t pblk)
@@ -460,10 +473,8 @@ ext4_es_alloc_extent(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len,
es->es_len = len;
es->es_pblk = pblk;
- /*
- * We don't count delayed extent because we never try to reclaim them
- */
- if (!ext4_es_is_delayed(es)) {
+ /* We never try to reclaim a must kept extent, so we don't count it. */
+ if (!ext4_es_must_keep(es)) {
if (!EXT4_I(inode)->i_es_shk_nr++)
ext4_es_list_add(inode);
percpu_counter_inc(&EXT4_SB(inode->i_sb)->
@@ -481,8 +492,8 @@ static void ext4_es_free_extent(struct inode *inode, struct extent_status *es)
EXT4_I(inode)->i_es_all_nr--;
percpu_counter_dec(&EXT4_SB(inode->i_sb)->s_es_stats.es_stats_all_cnt);
- /* Decrease the shrink counter when this es is not delayed */
- if (!ext4_es_is_delayed(es)) {
+ /* Decrease the shrink counter when we can reclaim the extent. */
+ if (!ext4_es_must_keep(es)) {
BUG_ON(EXT4_I(inode)->i_es_shk_nr == 0);
if (!--EXT4_I(inode)->i_es_shk_nr)
ext4_es_list_del(inode);
@@ -854,7 +865,7 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
if (err == -ENOMEM && __es_shrink(EXT4_SB(inode->i_sb),
128, EXT4_I(inode)))
goto retry;
- if (err == -ENOMEM && !ext4_es_is_delayed(&newes))
+ if (err == -ENOMEM && !ext4_es_must_keep(&newes))
err = 0;
if (sbi->s_cluster_ratio > 1 && test_opt(inode->i_sb, DELALLOC) &&
@@ -1704,11 +1715,8 @@ static int es_do_reclaim_extents(struct ext4_inode_info *ei, ext4_lblk_t end,
(*nr_to_scan)--;
node = rb_next(&es->rb_node);
- /*
- * We can't reclaim delayed extent from status tree because
- * fiemap, bigallic, and seek_data/hole need to use it.
- */
- if (ext4_es_is_delayed(es))
+
+ if (ext4_es_must_keep(es))
goto next;
if (ext4_es_is_referenced(es)) {
ext4_es_clear_referenced(es);
@@ -1772,7 +1780,7 @@ void ext4_clear_inode_es(struct inode *inode)
while (node) {
es = rb_entry(node, struct extent_status, rb_node);
node = rb_next(node);
- if (!ext4_es_is_delayed(es)) {
+ if (!ext4_es_must_keep(es)) {
rb_erase(&es->rb_node, &tree->root);
ext4_es_free_extent(inode, es);
}
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 34/69] ext4: factor out __es_alloc_extent() and __es_free_extent()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (32 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 33/69] ext4: add a new helper to check if es must be kept Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 35/69] ext4: use pre-allocated es in __es_insert_extent() Greg Kroah-Hartman
` (37 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Baokun Li, Jan Kara, Theodore Tso,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <libaokun1@huawei.com>
[ Upstream commit 73a2f033656be11298912201ad50615307b4477a ]
Factor out __es_alloc_extent() and __es_free_extent(), which only allocate
and free extent_status in these two helpers.
The ext4_es_alloc_extent() function is split into __es_alloc_extent()
and ext4_es_init_extent(). In __es_alloc_extent() we allocate memory using
GFP_KERNEL | __GFP_NOFAIL | __GFP_ZERO if the memory allocation cannot
fail, otherwise we use GFP_ATOMIC. and the ext4_es_init_extent() is used to
initialize extent_status and update related variables after a successful
allocation.
This is to prepare for the use of pre-allocated extent_status later.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-4-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: 8e387c89e96b ("ext4: make sure allocate pending entry not fail")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents_status.c | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index cf6a21baddbc4..012033db41062 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -461,14 +461,17 @@ static inline bool ext4_es_must_keep(struct extent_status *es)
return false;
}
-static struct extent_status *
-ext4_es_alloc_extent(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len,
- ext4_fsblk_t pblk)
+static inline struct extent_status *__es_alloc_extent(bool nofail)
+{
+ if (!nofail)
+ return kmem_cache_alloc(ext4_es_cachep, GFP_ATOMIC);
+
+ return kmem_cache_zalloc(ext4_es_cachep, GFP_KERNEL | __GFP_NOFAIL);
+}
+
+static void ext4_es_init_extent(struct inode *inode, struct extent_status *es,
+ ext4_lblk_t lblk, ext4_lblk_t len, ext4_fsblk_t pblk)
{
- struct extent_status *es;
- es = kmem_cache_alloc(ext4_es_cachep, GFP_ATOMIC);
- if (es == NULL)
- return NULL;
es->es_lblk = lblk;
es->es_len = len;
es->es_pblk = pblk;
@@ -483,8 +486,11 @@ ext4_es_alloc_extent(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len,
EXT4_I(inode)->i_es_all_nr++;
percpu_counter_inc(&EXT4_SB(inode->i_sb)->s_es_stats.es_stats_all_cnt);
+}
- return es;
+static inline void __es_free_extent(struct extent_status *es)
+{
+ kmem_cache_free(ext4_es_cachep, es);
}
static void ext4_es_free_extent(struct inode *inode, struct extent_status *es)
@@ -501,7 +507,7 @@ static void ext4_es_free_extent(struct inode *inode, struct extent_status *es)
s_es_stats.es_stats_shk_cnt);
}
- kmem_cache_free(ext4_es_cachep, es);
+ __es_free_extent(es);
}
/*
@@ -803,10 +809,12 @@ static int __es_insert_extent(struct inode *inode, struct extent_status *newes)
}
}
- es = ext4_es_alloc_extent(inode, newes->es_lblk, newes->es_len,
- newes->es_pblk);
+ es = __es_alloc_extent(false);
if (!es)
return -ENOMEM;
+ ext4_es_init_extent(inode, es, newes->es_lblk, newes->es_len,
+ newes->es_pblk);
+
rb_link_node(&es->rb_node, parent, p);
rb_insert_color(&es->rb_node, &tree->root);
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 35/69] ext4: use pre-allocated es in __es_insert_extent()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (33 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 34/69] ext4: factor out __es_alloc_extent() and __es_free_extent() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 36/69] ext4: use pre-allocated es in __es_remove_extent() Greg Kroah-Hartman
` (36 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jan Kara, Baokun Li, Theodore Tso,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <libaokun1@huawei.com>
[ Upstream commit 95f0b320339a977cf69872eac107122bf536775d ]
Pass a extent_status pointer prealloc to __es_insert_extent(). If the
pointer is non-null, it is used directly when a new extent_status is
needed to avoid memory allocation failures.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-5-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: 8e387c89e96b ("ext4: make sure allocate pending entry not fail")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents_status.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 012033db41062..0d810ce7580d1 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -144,7 +144,8 @@
static struct kmem_cache *ext4_es_cachep;
static struct kmem_cache *ext4_pending_cachep;
-static int __es_insert_extent(struct inode *inode, struct extent_status *newes);
+static int __es_insert_extent(struct inode *inode, struct extent_status *newes,
+ struct extent_status *prealloc);
static int __es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
ext4_lblk_t end, int *reserved);
static int es_reclaim_extents(struct ext4_inode_info *ei, int *nr_to_scan);
@@ -769,7 +770,8 @@ static inline void ext4_es_insert_extent_check(struct inode *inode,
}
#endif
-static int __es_insert_extent(struct inode *inode, struct extent_status *newes)
+static int __es_insert_extent(struct inode *inode, struct extent_status *newes,
+ struct extent_status *prealloc)
{
struct ext4_es_tree *tree = &EXT4_I(inode)->i_es_tree;
struct rb_node **p = &tree->root.rb_node;
@@ -809,7 +811,10 @@ static int __es_insert_extent(struct inode *inode, struct extent_status *newes)
}
}
- es = __es_alloc_extent(false);
+ if (prealloc)
+ es = prealloc;
+ else
+ es = __es_alloc_extent(false);
if (!es)
return -ENOMEM;
ext4_es_init_extent(inode, es, newes->es_lblk, newes->es_len,
@@ -869,7 +874,7 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
if (err != 0)
goto error;
retry:
- err = __es_insert_extent(inode, &newes);
+ err = __es_insert_extent(inode, &newes, NULL);
if (err == -ENOMEM && __es_shrink(EXT4_SB(inode->i_sb),
128, EXT4_I(inode)))
goto retry;
@@ -919,7 +924,7 @@ void ext4_es_cache_extent(struct inode *inode, ext4_lblk_t lblk,
es = __es_tree_search(&EXT4_I(inode)->i_es_tree.root, lblk);
if (!es || es->es_lblk > end)
- __es_insert_extent(inode, &newes);
+ __es_insert_extent(inode, &newes, NULL);
write_unlock(&EXT4_I(inode)->i_es_lock);
}
@@ -1365,7 +1370,7 @@ static int __es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
orig_es.es_len - len2;
ext4_es_store_pblock_status(&newes, block,
ext4_es_status(&orig_es));
- err = __es_insert_extent(inode, &newes);
+ err = __es_insert_extent(inode, &newes, NULL);
if (err) {
es->es_lblk = orig_es.es_lblk;
es->es_len = orig_es.es_len;
@@ -2020,7 +2025,7 @@ int ext4_es_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk,
if (err != 0)
goto error;
retry:
- err = __es_insert_extent(inode, &newes);
+ err = __es_insert_extent(inode, &newes, NULL);
if (err == -ENOMEM && __es_shrink(EXT4_SB(inode->i_sb),
128, EXT4_I(inode)))
goto retry;
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 36/69] ext4: use pre-allocated es in __es_remove_extent()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (34 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 35/69] ext4: use pre-allocated es in __es_insert_extent() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 37/69] ext4: using nofail preallocation in ext4_es_remove_extent() Greg Kroah-Hartman
` (35 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jan Kara, Baokun Li, Theodore Tso,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <libaokun1@huawei.com>
[ Upstream commit bda3efaf774fb687c2b7a555aaec3006b14a8857 ]
When splitting extent, if the second extent can not be dropped, we return
-ENOMEM and use GFP_NOFAIL to preallocate an extent_status outside of
i_es_lock and pass it to __es_remove_extent() to be used as the second
extent. This ensures that __es_remove_extent() is executed successfully,
thus ensuring consistency in the extent status tree. If the second extent
is not undroppable, we simply drop it and return 0. Then retry is no longer
necessary, remove it.
Now, __es_remove_extent() will always remove what it should, maybe more.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-6-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: 8e387c89e96b ("ext4: make sure allocate pending entry not fail")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents_status.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 0d810ce7580d1..10550d62a6763 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -147,7 +147,8 @@ static struct kmem_cache *ext4_pending_cachep;
static int __es_insert_extent(struct inode *inode, struct extent_status *newes,
struct extent_status *prealloc);
static int __es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
- ext4_lblk_t end, int *reserved);
+ ext4_lblk_t end, int *reserved,
+ struct extent_status *prealloc);
static int es_reclaim_extents(struct ext4_inode_info *ei, int *nr_to_scan);
static int __es_shrink(struct ext4_sb_info *sbi, int nr_to_scan,
struct ext4_inode_info *locked_ei);
@@ -870,7 +871,7 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
ext4_es_insert_extent_check(inode, &newes);
write_lock(&EXT4_I(inode)->i_es_lock);
- err = __es_remove_extent(inode, lblk, end, NULL);
+ err = __es_remove_extent(inode, lblk, end, NULL, NULL);
if (err != 0)
goto error;
retry:
@@ -1314,6 +1315,7 @@ static unsigned int get_rsvd(struct inode *inode, ext4_lblk_t end,
* @lblk - first block in range
* @end - last block in range
* @reserved - number of cluster reservations released
+ * @prealloc - pre-allocated es to avoid memory allocation failures
*
* If @reserved is not NULL and delayed allocation is enabled, counts
* block/cluster reservations freed by removing range and if bigalloc
@@ -1321,7 +1323,8 @@ static unsigned int get_rsvd(struct inode *inode, ext4_lblk_t end,
* error code on failure.
*/
static int __es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
- ext4_lblk_t end, int *reserved)
+ ext4_lblk_t end, int *reserved,
+ struct extent_status *prealloc)
{
struct ext4_es_tree *tree = &EXT4_I(inode)->i_es_tree;
struct rb_node *node;
@@ -1329,14 +1332,12 @@ static int __es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
struct extent_status orig_es;
ext4_lblk_t len1, len2;
ext4_fsblk_t block;
- int err;
+ int err = 0;
bool count_reserved = true;
struct rsvd_count rc;
if (reserved == NULL || !test_opt(inode->i_sb, DELALLOC))
count_reserved = false;
-retry:
- err = 0;
es = __es_tree_search(&tree->root, lblk);
if (!es)
@@ -1370,14 +1371,13 @@ static int __es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
orig_es.es_len - len2;
ext4_es_store_pblock_status(&newes, block,
ext4_es_status(&orig_es));
- err = __es_insert_extent(inode, &newes, NULL);
+ err = __es_insert_extent(inode, &newes, prealloc);
if (err) {
+ if (!ext4_es_must_keep(&newes))
+ return 0;
+
es->es_lblk = orig_es.es_lblk;
es->es_len = orig_es.es_len;
- if ((err == -ENOMEM) &&
- __es_shrink(EXT4_SB(inode->i_sb),
- 128, EXT4_I(inode)))
- goto retry;
goto out;
}
} else {
@@ -1477,7 +1477,7 @@ int ext4_es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
* is reclaimed.
*/
write_lock(&EXT4_I(inode)->i_es_lock);
- err = __es_remove_extent(inode, lblk, end, &reserved);
+ err = __es_remove_extent(inode, lblk, end, &reserved, NULL);
write_unlock(&EXT4_I(inode)->i_es_lock);
ext4_es_print_tree(inode);
ext4_da_release_space(inode, reserved);
@@ -2021,7 +2021,7 @@ int ext4_es_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk,
write_lock(&EXT4_I(inode)->i_es_lock);
- err = __es_remove_extent(inode, lblk, lblk, NULL);
+ err = __es_remove_extent(inode, lblk, lblk, NULL, NULL);
if (err != 0)
goto error;
retry:
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 37/69] ext4: using nofail preallocation in ext4_es_remove_extent()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (35 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 36/69] ext4: use pre-allocated es in __es_remove_extent() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 38/69] ext4: using nofail preallocation in ext4_es_insert_delayed_block() Greg Kroah-Hartman
` (34 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jan Kara, Baokun Li, Theodore Tso,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <libaokun1@huawei.com>
[ Upstream commit e9fe2b882bd5b26b987c9ba110c2222796f72af5 ]
If __es_remove_extent() returns an error it means that when splitting
extent, allocating an extent that must be kept failed, where returning
an error directly would cause the extent tree to be inconsistent. So we
use GFP_NOFAIL to pre-allocate an extent_status and pass it to
__es_remove_extent() to avoid this problem.
In addition, since the allocated memory is outside the i_es_lock, the
extent_status tree may change and the pre-allocated extent_status is
no longer needed, so we release the pre-allocated extent_status when
es->es_len is not initialized.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-7-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: 8e387c89e96b ("ext4: make sure allocate pending entry not fail")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents_status.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 10550d62a6763..4af825eb0cb45 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -1457,6 +1457,7 @@ int ext4_es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
ext4_lblk_t end;
int err = 0;
int reserved = 0;
+ struct extent_status *es = NULL;
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return 0;
@@ -1471,17 +1472,25 @@ int ext4_es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
end = lblk + len - 1;
BUG_ON(end < lblk);
+retry:
+ if (err && !es)
+ es = __es_alloc_extent(true);
/*
* ext4_clear_inode() depends on us taking i_es_lock unconditionally
* so that we are sure __es_shrink() is done with the inode before it
* is reclaimed.
*/
write_lock(&EXT4_I(inode)->i_es_lock);
- err = __es_remove_extent(inode, lblk, end, &reserved, NULL);
+ err = __es_remove_extent(inode, lblk, end, &reserved, es);
+ if (es && !es->es_len)
+ __es_free_extent(es);
write_unlock(&EXT4_I(inode)->i_es_lock);
+ if (err)
+ goto retry;
+
ext4_es_print_tree(inode);
ext4_da_release_space(inode, reserved);
- return err;
+ return 0;
}
static int __es_shrink(struct ext4_sb_info *sbi, int nr_to_scan,
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 38/69] ext4: using nofail preallocation in ext4_es_insert_delayed_block()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (36 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 37/69] ext4: using nofail preallocation in ext4_es_remove_extent() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 39/69] ext4: using nofail preallocation in ext4_es_insert_extent() Greg Kroah-Hartman
` (33 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jan Kara, Baokun Li, Theodore Tso,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <libaokun1@huawei.com>
[ Upstream commit 4a2d98447b37bcb68a7f06a1078edcb4f7e6ce7e ]
Similar to in ext4_es_remove_extent(), we use a no-fail preallocation
to avoid inconsistencies, except that here we may have to preallocate
two extent_status.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-8-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: 8e387c89e96b ("ext4: make sure allocate pending entry not fail")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents_status.c | 33 ++++++++++++++++++++++-----------
1 file changed, 22 insertions(+), 11 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 4af825eb0cb45..4163a4801f969 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -2013,7 +2013,10 @@ int ext4_es_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk,
bool allocated)
{
struct extent_status newes;
- int err = 0;
+ int err1 = 0;
+ int err2 = 0;
+ struct extent_status *es1 = NULL;
+ struct extent_status *es2 = NULL;
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return 0;
@@ -2028,29 +2031,37 @@ int ext4_es_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk,
ext4_es_insert_extent_check(inode, &newes);
+retry:
+ if (err1 && !es1)
+ es1 = __es_alloc_extent(true);
+ if ((err1 || err2) && !es2)
+ es2 = __es_alloc_extent(true);
write_lock(&EXT4_I(inode)->i_es_lock);
- err = __es_remove_extent(inode, lblk, lblk, NULL, NULL);
- if (err != 0)
+ err1 = __es_remove_extent(inode, lblk, lblk, NULL, es1);
+ if (err1 != 0)
goto error;
-retry:
- err = __es_insert_extent(inode, &newes, NULL);
- if (err == -ENOMEM && __es_shrink(EXT4_SB(inode->i_sb),
- 128, EXT4_I(inode)))
- goto retry;
- if (err != 0)
+
+ err2 = __es_insert_extent(inode, &newes, es2);
+ if (err2 != 0)
goto error;
if (allocated)
__insert_pending(inode, lblk);
+ /* es is pre-allocated but not used, free it. */
+ if (es1 && !es1->es_len)
+ __es_free_extent(es1);
+ if (es2 && !es2->es_len)
+ __es_free_extent(es2);
error:
write_unlock(&EXT4_I(inode)->i_es_lock);
+ if (err1 || err2)
+ goto retry;
ext4_es_print_tree(inode);
ext4_print_pending_tree(inode);
-
- return err;
+ return 0;
}
/*
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 39/69] ext4: using nofail preallocation in ext4_es_insert_extent()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (37 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 38/69] ext4: using nofail preallocation in ext4_es_insert_delayed_block() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 40/69] ext4: fix slab-use-after-free " Greg Kroah-Hartman
` (32 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jan Kara, Baokun Li, Theodore Tso,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <libaokun1@huawei.com>
[ Upstream commit 2a69c450083db164596c75c0f5b4d9c4c0e18eba ]
Similar to in ext4_es_insert_delayed_block(), we use preallocations that
do not fail to avoid inconsistencies, but we do not care about es that are
not must be kept, and we return 0 even if such es memory allocation fails.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-9-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: 8e387c89e96b ("ext4: make sure allocate pending entry not fail")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents_status.c | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 4163a4801f969..1327cd9505db7 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -841,8 +841,11 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
{
struct extent_status newes;
ext4_lblk_t end = lblk + len - 1;
- int err = 0;
+ int err1 = 0;
+ int err2 = 0;
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
+ struct extent_status *es1 = NULL;
+ struct extent_status *es2 = NULL;
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return 0;
@@ -870,29 +873,40 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
ext4_es_insert_extent_check(inode, &newes);
+retry:
+ if (err1 && !es1)
+ es1 = __es_alloc_extent(true);
+ if ((err1 || err2) && !es2)
+ es2 = __es_alloc_extent(true);
write_lock(&EXT4_I(inode)->i_es_lock);
- err = __es_remove_extent(inode, lblk, end, NULL, NULL);
- if (err != 0)
+
+ err1 = __es_remove_extent(inode, lblk, end, NULL, es1);
+ if (err1 != 0)
+ goto error;
+
+ err2 = __es_insert_extent(inode, &newes, es2);
+ if (err2 == -ENOMEM && !ext4_es_must_keep(&newes))
+ err2 = 0;
+ if (err2 != 0)
goto error;
-retry:
- err = __es_insert_extent(inode, &newes, NULL);
- if (err == -ENOMEM && __es_shrink(EXT4_SB(inode->i_sb),
- 128, EXT4_I(inode)))
- goto retry;
- if (err == -ENOMEM && !ext4_es_must_keep(&newes))
- err = 0;
if (sbi->s_cluster_ratio > 1 && test_opt(inode->i_sb, DELALLOC) &&
(status & EXTENT_STATUS_WRITTEN ||
status & EXTENT_STATUS_UNWRITTEN))
__revise_pending(inode, lblk, len);
+ /* es is pre-allocated but not used, free it. */
+ if (es1 && !es1->es_len)
+ __es_free_extent(es1);
+ if (es2 && !es2->es_len)
+ __es_free_extent(es2);
error:
write_unlock(&EXT4_I(inode)->i_es_lock);
+ if (err1 || err2)
+ goto retry;
ext4_es_print_tree(inode);
-
- return err;
+ return 0;
}
/*
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 40/69] ext4: fix slab-use-after-free in ext4_es_insert_extent()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (38 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 39/69] ext4: using nofail preallocation in ext4_es_insert_extent() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 41/69] ext4: make sure allocate pending entry not fail Greg Kroah-Hartman
` (31 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yikebaer Aizezi, stable, Baokun Li,
Jan Kara, Theodore Tso, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baokun Li <libaokun1@huawei.com>
[ Upstream commit 768d612f79822d30a1e7d132a4d4b05337ce42ec ]
Yikebaer reported an issue:
==================================================================
BUG: KASAN: slab-use-after-free in ext4_es_insert_extent+0xc68/0xcb0
fs/ext4/extents_status.c:894
Read of size 4 at addr ffff888112ecc1a4 by task syz-executor/8438
CPU: 1 PID: 8438 Comm: syz-executor Not tainted 6.5.0-rc5 #1
Call Trace:
[...]
kasan_report+0xba/0xf0 mm/kasan/report.c:588
ext4_es_insert_extent+0xc68/0xcb0 fs/ext4/extents_status.c:894
ext4_map_blocks+0x92a/0x16f0 fs/ext4/inode.c:680
ext4_alloc_file_blocks.isra.0+0x2df/0xb70 fs/ext4/extents.c:4462
ext4_zero_range fs/ext4/extents.c:4622 [inline]
ext4_fallocate+0x251c/0x3ce0 fs/ext4/extents.c:4721
[...]
Allocated by task 8438:
[...]
kmem_cache_zalloc include/linux/slab.h:693 [inline]
__es_alloc_extent fs/ext4/extents_status.c:469 [inline]
ext4_es_insert_extent+0x672/0xcb0 fs/ext4/extents_status.c:873
ext4_map_blocks+0x92a/0x16f0 fs/ext4/inode.c:680
ext4_alloc_file_blocks.isra.0+0x2df/0xb70 fs/ext4/extents.c:4462
ext4_zero_range fs/ext4/extents.c:4622 [inline]
ext4_fallocate+0x251c/0x3ce0 fs/ext4/extents.c:4721
[...]
Freed by task 8438:
[...]
kmem_cache_free+0xec/0x490 mm/slub.c:3823
ext4_es_try_to_merge_right fs/ext4/extents_status.c:593 [inline]
__es_insert_extent+0x9f4/0x1440 fs/ext4/extents_status.c:802
ext4_es_insert_extent+0x2ca/0xcb0 fs/ext4/extents_status.c:882
ext4_map_blocks+0x92a/0x16f0 fs/ext4/inode.c:680
ext4_alloc_file_blocks.isra.0+0x2df/0xb70 fs/ext4/extents.c:4462
ext4_zero_range fs/ext4/extents.c:4622 [inline]
ext4_fallocate+0x251c/0x3ce0 fs/ext4/extents.c:4721
[...]
==================================================================
The flow of issue triggering is as follows:
1. remove es
raw es es removed es1
|-------------------| -> |----|.......|------|
2. insert es
es insert es1 merge with es es1 merge with es and free es1
|----|.......|------| -> |------------|------| -> |-------------------|
es merges with newes, then merges with es1, frees es1, then determines
if es1->es_len is 0 and triggers a UAF.
The code flow is as follows:
ext4_es_insert_extent
es1 = __es_alloc_extent(true);
es2 = __es_alloc_extent(true);
__es_remove_extent(inode, lblk, end, NULL, es1)
__es_insert_extent(inode, &newes, es1) ---> insert es1 to es tree
__es_insert_extent(inode, &newes, es2)
ext4_es_try_to_merge_right
ext4_es_free_extent(inode, es1) ---> es1 is freed
if (es1 && !es1->es_len)
// Trigger UAF by determining if es1 is used.
We determine whether es1 or es2 is used immediately after calling
__es_remove_extent() or __es_insert_extent() to avoid triggering a
UAF if es1 or es2 is freed.
Reported-by: Yikebaer Aizezi <yikebaer61@gmail.com>
Closes: https://lore.kernel.org/lkml/CALcu4raD4h9coiyEBL4Bm0zjDwxC2CyPiTwsP3zFuhot6y9Beg@mail.gmail.com
Fixes: 2a69c450083d ("ext4: using nofail preallocation in ext4_es_insert_extent()")
Cc: stable@kernel.org
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230815070808.3377171-1-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: 8e387c89e96b ("ext4: make sure allocate pending entry not fail")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents_status.c | 44 +++++++++++++++++++++++++++-------------
1 file changed, 30 insertions(+), 14 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 1327cd9505db7..6c55ab427e650 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -883,23 +883,29 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
err1 = __es_remove_extent(inode, lblk, end, NULL, es1);
if (err1 != 0)
goto error;
+ /* Free preallocated extent if it didn't get used. */
+ if (es1) {
+ if (!es1->es_len)
+ __es_free_extent(es1);
+ es1 = NULL;
+ }
err2 = __es_insert_extent(inode, &newes, es2);
if (err2 == -ENOMEM && !ext4_es_must_keep(&newes))
err2 = 0;
if (err2 != 0)
goto error;
+ /* Free preallocated extent if it didn't get used. */
+ if (es2) {
+ if (!es2->es_len)
+ __es_free_extent(es2);
+ es2 = NULL;
+ }
if (sbi->s_cluster_ratio > 1 && test_opt(inode->i_sb, DELALLOC) &&
(status & EXTENT_STATUS_WRITTEN ||
status & EXTENT_STATUS_UNWRITTEN))
__revise_pending(inode, lblk, len);
-
- /* es is pre-allocated but not used, free it. */
- if (es1 && !es1->es_len)
- __es_free_extent(es1);
- if (es2 && !es2->es_len)
- __es_free_extent(es2);
error:
write_unlock(&EXT4_I(inode)->i_es_lock);
if (err1 || err2)
@@ -1496,8 +1502,12 @@ int ext4_es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
*/
write_lock(&EXT4_I(inode)->i_es_lock);
err = __es_remove_extent(inode, lblk, end, &reserved, es);
- if (es && !es->es_len)
- __es_free_extent(es);
+ /* Free preallocated extent if it didn't get used. */
+ if (es) {
+ if (!es->es_len)
+ __es_free_extent(es);
+ es = NULL;
+ }
write_unlock(&EXT4_I(inode)->i_es_lock);
if (err)
goto retry;
@@ -2055,19 +2065,25 @@ int ext4_es_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk,
err1 = __es_remove_extent(inode, lblk, lblk, NULL, es1);
if (err1 != 0)
goto error;
+ /* Free preallocated extent if it didn't get used. */
+ if (es1) {
+ if (!es1->es_len)
+ __es_free_extent(es1);
+ es1 = NULL;
+ }
err2 = __es_insert_extent(inode, &newes, es2);
if (err2 != 0)
goto error;
+ /* Free preallocated extent if it didn't get used. */
+ if (es2) {
+ if (!es2->es_len)
+ __es_free_extent(es2);
+ es2 = NULL;
+ }
if (allocated)
__insert_pending(inode, lblk);
-
- /* es is pre-allocated but not used, free it. */
- if (es1 && !es1->es_len)
- __es_free_extent(es1);
- if (es2 && !es2->es_len)
- __es_free_extent(es2);
error:
write_unlock(&EXT4_I(inode)->i_es_lock);
if (err1 || err2)
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 41/69] ext4: make sure allocate pending entry not fail
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (39 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 40/69] ext4: fix slab-use-after-free " Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 42/69] tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols Greg Kroah-Hartman
` (30 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Zhang Yi, stable, Jan Kara,
Theodore Tso, Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Yi <yi.zhang@huawei.com>
[ Upstream commit 8e387c89e96b9543a339f84043cf9df15fed2632 ]
__insert_pending() allocate memory in atomic context, so the allocation
could fail, but we are not handling that failure now. It could lead
ext4_es_remove_extent() to get wrong reserved clusters, and the global
data blocks reservation count will be incorrect. The same to
extents_status entry preallocation, preallocate pending entry out of the
i_es_lock with __GFP_NOFAIL, make sure __insert_pending() and
__revise_pending() always succeeds.
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20230824092619.1327976-3-yi.zhang@huaweicloud.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/extents_status.c | 123 ++++++++++++++++++++++++++++-----------
1 file changed, 89 insertions(+), 34 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 6c55ab427e650..cccbdfd49a86b 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -152,8 +152,9 @@ static int __es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
static int es_reclaim_extents(struct ext4_inode_info *ei, int *nr_to_scan);
static int __es_shrink(struct ext4_sb_info *sbi, int nr_to_scan,
struct ext4_inode_info *locked_ei);
-static void __revise_pending(struct inode *inode, ext4_lblk_t lblk,
- ext4_lblk_t len);
+static int __revise_pending(struct inode *inode, ext4_lblk_t lblk,
+ ext4_lblk_t len,
+ struct pending_reservation **prealloc);
int __init ext4_init_es(void)
{
@@ -450,6 +451,19 @@ static void ext4_es_list_del(struct inode *inode)
spin_unlock(&sbi->s_es_lock);
}
+static inline struct pending_reservation *__alloc_pending(bool nofail)
+{
+ if (!nofail)
+ return kmem_cache_alloc(ext4_pending_cachep, GFP_ATOMIC);
+
+ return kmem_cache_zalloc(ext4_pending_cachep, GFP_KERNEL | __GFP_NOFAIL);
+}
+
+static inline void __free_pending(struct pending_reservation *pr)
+{
+ kmem_cache_free(ext4_pending_cachep, pr);
+}
+
/*
* Returns true if we cannot fail to allocate memory for this extent_status
* entry and cannot reclaim it until its status changes.
@@ -841,11 +855,12 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
{
struct extent_status newes;
ext4_lblk_t end = lblk + len - 1;
- int err1 = 0;
- int err2 = 0;
+ int err1 = 0, err2 = 0, err3 = 0;
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
struct extent_status *es1 = NULL;
struct extent_status *es2 = NULL;
+ struct pending_reservation *pr = NULL;
+ bool revise_pending = false;
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return 0;
@@ -873,11 +888,17 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
ext4_es_insert_extent_check(inode, &newes);
+ revise_pending = sbi->s_cluster_ratio > 1 &&
+ test_opt(inode->i_sb, DELALLOC) &&
+ (status & (EXTENT_STATUS_WRITTEN |
+ EXTENT_STATUS_UNWRITTEN));
retry:
if (err1 && !es1)
es1 = __es_alloc_extent(true);
if ((err1 || err2) && !es2)
es2 = __es_alloc_extent(true);
+ if ((err1 || err2 || err3) && revise_pending && !pr)
+ pr = __alloc_pending(true);
write_lock(&EXT4_I(inode)->i_es_lock);
err1 = __es_remove_extent(inode, lblk, end, NULL, es1);
@@ -902,13 +923,18 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
es2 = NULL;
}
- if (sbi->s_cluster_ratio > 1 && test_opt(inode->i_sb, DELALLOC) &&
- (status & EXTENT_STATUS_WRITTEN ||
- status & EXTENT_STATUS_UNWRITTEN))
- __revise_pending(inode, lblk, len);
+ if (revise_pending) {
+ err3 = __revise_pending(inode, lblk, len, &pr);
+ if (err3 != 0)
+ goto error;
+ if (pr) {
+ __free_pending(pr);
+ pr = NULL;
+ }
+ }
error:
write_unlock(&EXT4_I(inode)->i_es_lock);
- if (err1 || err2)
+ if (err1 || err2 || err3)
goto retry;
ext4_es_print_tree(inode);
@@ -1316,7 +1342,7 @@ static unsigned int get_rsvd(struct inode *inode, ext4_lblk_t end,
rc->ndelonly--;
node = rb_next(&pr->rb_node);
rb_erase(&pr->rb_node, &tree->root);
- kmem_cache_free(ext4_pending_cachep, pr);
+ __free_pending(pr);
if (!node)
break;
pr = rb_entry(node, struct pending_reservation,
@@ -1913,11 +1939,13 @@ static struct pending_reservation *__get_pending(struct inode *inode,
*
* @inode - file containing the cluster
* @lblk - logical block in the cluster to be added
+ * @prealloc - preallocated pending entry
*
* Returns 0 on successful insertion and -ENOMEM on failure. If the
* pending reservation is already in the set, returns successfully.
*/
-static int __insert_pending(struct inode *inode, ext4_lblk_t lblk)
+static int __insert_pending(struct inode *inode, ext4_lblk_t lblk,
+ struct pending_reservation **prealloc)
{
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
struct ext4_pending_tree *tree = &EXT4_I(inode)->i_pending_tree;
@@ -1943,10 +1971,15 @@ static int __insert_pending(struct inode *inode, ext4_lblk_t lblk)
}
}
- pr = kmem_cache_alloc(ext4_pending_cachep, GFP_ATOMIC);
- if (pr == NULL) {
- ret = -ENOMEM;
- goto out;
+ if (likely(*prealloc == NULL)) {
+ pr = __alloc_pending(false);
+ if (!pr) {
+ ret = -ENOMEM;
+ goto out;
+ }
+ } else {
+ pr = *prealloc;
+ *prealloc = NULL;
}
pr->lclu = lclu;
@@ -1976,7 +2009,7 @@ static void __remove_pending(struct inode *inode, ext4_lblk_t lblk)
if (pr != NULL) {
tree = &EXT4_I(inode)->i_pending_tree;
rb_erase(&pr->rb_node, &tree->root);
- kmem_cache_free(ext4_pending_cachep, pr);
+ __free_pending(pr);
}
}
@@ -2037,10 +2070,10 @@ int ext4_es_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk,
bool allocated)
{
struct extent_status newes;
- int err1 = 0;
- int err2 = 0;
+ int err1 = 0, err2 = 0, err3 = 0;
struct extent_status *es1 = NULL;
struct extent_status *es2 = NULL;
+ struct pending_reservation *pr = NULL;
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return 0;
@@ -2060,6 +2093,8 @@ int ext4_es_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk,
es1 = __es_alloc_extent(true);
if ((err1 || err2) && !es2)
es2 = __es_alloc_extent(true);
+ if ((err1 || err2 || err3) && allocated && !pr)
+ pr = __alloc_pending(true);
write_lock(&EXT4_I(inode)->i_es_lock);
err1 = __es_remove_extent(inode, lblk, lblk, NULL, es1);
@@ -2082,11 +2117,18 @@ int ext4_es_insert_delayed_block(struct inode *inode, ext4_lblk_t lblk,
es2 = NULL;
}
- if (allocated)
- __insert_pending(inode, lblk);
+ if (allocated) {
+ err3 = __insert_pending(inode, lblk, &pr);
+ if (err3 != 0)
+ goto error;
+ if (pr) {
+ __free_pending(pr);
+ pr = NULL;
+ }
+ }
error:
write_unlock(&EXT4_I(inode)->i_es_lock);
- if (err1 || err2)
+ if (err1 || err2 || err3)
goto retry;
ext4_es_print_tree(inode);
@@ -2192,21 +2234,24 @@ unsigned int ext4_es_delayed_clu(struct inode *inode, ext4_lblk_t lblk,
* @inode - file containing the range
* @lblk - logical block defining the start of range
* @len - length of range in blocks
+ * @prealloc - preallocated pending entry
*
* Used after a newly allocated extent is added to the extents status tree.
* Requires that the extents in the range have either written or unwritten
* status. Must be called while holding i_es_lock.
*/
-static void __revise_pending(struct inode *inode, ext4_lblk_t lblk,
- ext4_lblk_t len)
+static int __revise_pending(struct inode *inode, ext4_lblk_t lblk,
+ ext4_lblk_t len,
+ struct pending_reservation **prealloc)
{
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
ext4_lblk_t end = lblk + len - 1;
ext4_lblk_t first, last;
bool f_del = false, l_del = false;
+ int ret = 0;
if (len == 0)
- return;
+ return 0;
/*
* Two cases - block range within single cluster and block range
@@ -2227,7 +2272,9 @@ static void __revise_pending(struct inode *inode, ext4_lblk_t lblk,
f_del = __es_scan_range(inode, &ext4_es_is_delonly,
first, lblk - 1);
if (f_del) {
- __insert_pending(inode, first);
+ ret = __insert_pending(inode, first, prealloc);
+ if (ret < 0)
+ goto out;
} else {
last = EXT4_LBLK_CMASK(sbi, end) +
sbi->s_cluster_ratio - 1;
@@ -2235,9 +2282,11 @@ static void __revise_pending(struct inode *inode, ext4_lblk_t lblk,
l_del = __es_scan_range(inode,
&ext4_es_is_delonly,
end + 1, last);
- if (l_del)
- __insert_pending(inode, last);
- else
+ if (l_del) {
+ ret = __insert_pending(inode, last, prealloc);
+ if (ret < 0)
+ goto out;
+ } else
__remove_pending(inode, last);
}
} else {
@@ -2245,18 +2294,24 @@ static void __revise_pending(struct inode *inode, ext4_lblk_t lblk,
if (first != lblk)
f_del = __es_scan_range(inode, &ext4_es_is_delonly,
first, lblk - 1);
- if (f_del)
- __insert_pending(inode, first);
- else
+ if (f_del) {
+ ret = __insert_pending(inode, first, prealloc);
+ if (ret < 0)
+ goto out;
+ } else
__remove_pending(inode, first);
last = EXT4_LBLK_CMASK(sbi, end) + sbi->s_cluster_ratio - 1;
if (last != end)
l_del = __es_scan_range(inode, &ext4_es_is_delonly,
end + 1, last);
- if (l_del)
- __insert_pending(inode, last);
- else
+ if (l_del) {
+ ret = __insert_pending(inode, last, prealloc);
+ if (ret < 0)
+ goto out;
+ } else
__remove_pending(inode, last);
}
+out:
+ return ret;
}
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 42/69] tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (40 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 41/69] ext4: make sure allocate pending entry not fail Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 43/69] proc: sysctl: prevent aliased sysctls from getting passed to init Greg Kroah-Hartman
` (29 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Masami Hiramatsu, Francis Laniel
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francis Laniel <flaniel@linux.microsoft.com>
commit b022f0c7e404887a7c5229788fc99eff9f9a80d5 upstream.
When a kprobe is attached to a function that's name is not unique (is
static and shares the name with other functions in the kernel), the
kprobe is attached to the first function it finds. This is a bug as the
function that it is attaching to is not necessarily the one that the
user wants to attach to.
Instead of blindly picking a function to attach to what is ambiguous,
error with EADDRNOTAVAIL to let the user know that this function is not
unique, and that the user must use another unique function with an
address offset to get to the function they want to attach to.
Link: https://lore.kernel.org/all/20231020104250.9537-2-flaniel@linux.microsoft.com/
Cc: stable@vger.kernel.org
Fixes: 413d37d1eb69 ("tracing: Add kprobe-based event tracer")
Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
Link: https://lore.kernel.org/lkml/20230819101105.b0c104ae4494a7d1f2eea742@kernel.org/
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/trace/trace_kprobe.c | 74 ++++++++++++++++++++++++++++++++++++++++++++
kernel/trace/trace_probe.h | 1
2 files changed, 75 insertions(+)
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -708,6 +708,36 @@ static struct notifier_block trace_kprob
.priority = 1 /* Invoked after kprobe module callback */
};
+struct count_symbols_struct {
+ const char *func_name;
+ unsigned int count;
+};
+
+static int count_symbols(void *data, const char *name, struct module *unused0,
+ unsigned long unused1)
+{
+ struct count_symbols_struct *args = data;
+
+ if (strcmp(args->func_name, name))
+ return 0;
+
+ args->count++;
+
+ return 0;
+}
+
+static unsigned int number_of_same_symbols(char *func_name)
+{
+ struct count_symbols_struct args = {
+ .func_name = func_name,
+ .count = 0,
+ };
+
+ kallsyms_on_each_symbol(count_symbols, &args);
+
+ return args.count;
+}
+
static int __trace_kprobe_create(int argc, const char *argv[])
{
/*
@@ -836,6 +866,31 @@ static int __trace_kprobe_create(int arg
}
}
+ if (symbol && !strchr(symbol, ':')) {
+ unsigned int count;
+
+ count = number_of_same_symbols(symbol);
+ if (count > 1) {
+ /*
+ * Users should use ADDR to remove the ambiguity of
+ * using KSYM only.
+ */
+ trace_probe_log_err(0, NON_UNIQ_SYMBOL);
+ ret = -EADDRNOTAVAIL;
+
+ goto error;
+ } else if (count == 0) {
+ /*
+ * We can return ENOENT earlier than when register the
+ * kprobe.
+ */
+ trace_probe_log_err(0, BAD_PROBE_ADDR);
+ ret = -ENOENT;
+
+ goto error;
+ }
+ }
+
trace_probe_log_set_index(0);
if (event) {
ret = traceprobe_parse_event_name(&event, &group, buf,
@@ -1755,6 +1810,7 @@ static int unregister_kprobe_event(struc
}
#ifdef CONFIG_PERF_EVENTS
+
/* create a trace_kprobe, but don't add it to global lists */
struct trace_event_call *
create_local_trace_kprobe(char *func, void *addr, unsigned long offs,
@@ -1765,6 +1821,24 @@ create_local_trace_kprobe(char *func, vo
int ret;
char *event;
+ if (func) {
+ unsigned int count;
+
+ count = number_of_same_symbols(func);
+ if (count > 1)
+ /*
+ * Users should use addr to remove the ambiguity of
+ * using func only.
+ */
+ return ERR_PTR(-EADDRNOTAVAIL);
+ else if (count == 0)
+ /*
+ * We can return ENOENT earlier than when register the
+ * kprobe.
+ */
+ return ERR_PTR(-ENOENT);
+ }
+
/*
* local trace_kprobes are not added to dyn_event, so they are never
* searched in find_trace_kprobe(). Therefore, there is no concern of
--- a/kernel/trace/trace_probe.h
+++ b/kernel/trace/trace_probe.h
@@ -405,6 +405,7 @@ extern int traceprobe_define_arg_fields(
C(BAD_MAXACT, "Invalid maxactive number"), \
C(MAXACT_TOO_BIG, "Maxactive is too big"), \
C(BAD_PROBE_ADDR, "Invalid probed address or symbol"), \
+ C(NON_UNIQ_SYMBOL, "The symbol is not unique"), \
C(BAD_RETPROBE, "Retprobe address must be an function entry"), \
C(BAD_ADDR_SUFFIX, "Invalid probed address suffix"), \
C(NO_GROUP_NAME, "Group name is not specified"), \
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 43/69] proc: sysctl: prevent aliased sysctls from getting passed to init
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (41 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 42/69] tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 44/69] ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA Greg Kroah-Hartman
` (28 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Krister Johansen, Luis Chamberlain
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krister Johansen <kjlx@templeofstupid.com>
commit 8001f49394e353f035306a45bcf504f06fca6355 upstream.
The code that checks for unknown boot options is unaware of the sysctl
alias facility, which maps bootparams to sysctl values. If a user sets
an old value that has a valid alias, a message about an invalid
parameter will be printed during boot, and the parameter will get passed
to init. Fix by checking for the existence of aliased parameters in the
unknown boot parameter code. If an alias exists, don't return an error
or pass the value to init.
Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
Cc: stable@vger.kernel.org
Fixes: 0a477e1ae21b ("kernel/sysctl: support handling command line aliases")
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/proc/proc_sysctl.c | 7 +++++++
include/linux/sysctl.h | 6 ++++++
init/main.c | 4 ++++
3 files changed, 17 insertions(+)
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -1780,6 +1780,13 @@ static const char *sysctl_find_alias(cha
return NULL;
}
+bool sysctl_is_alias(char *param)
+{
+ const char *alias = sysctl_find_alias(param);
+
+ return alias != NULL;
+}
+
/* Set sysctl value passed on kernel command line. */
static int process_sysctl_arg(char *param, char *val,
const char *unused, void *arg)
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -210,6 +210,7 @@ extern void __register_sysctl_init(const
const char *table_name);
#define register_sysctl_init(path, table) __register_sysctl_init(path, table, #table)
void do_sysctl_args(void);
+bool sysctl_is_alias(char *param);
extern int pwrsw_enabled;
extern int unaligned_enabled;
@@ -251,6 +252,11 @@ static inline void setup_sysctl_set(stru
static inline void do_sysctl_args(void)
{
}
+
+static inline bool sysctl_is_alias(char *param)
+{
+ return false;
+}
#endif /* CONFIG_SYSCTL */
int sysctl_max_threads(struct ctl_table *table, int write, void *buffer,
--- a/init/main.c
+++ b/init/main.c
@@ -540,6 +540,10 @@ static int __init unknown_bootoption(cha
{
size_t len = strlen(param);
+ /* Handle params aliased to sysctls */
+ if (sysctl_is_alias(param))
+ return 0;
+
repair_env_string(param, val);
/* Handle obsolete-style parameters */
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 44/69] ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (42 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 43/69] proc: sysctl: prevent aliased sysctls from getting passed to init Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 45/69] swiotlb-xen: provide the "max_mapping_size" method Greg Kroah-Hartman
` (27 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Hans de Goede, Rafael J. Wysocki
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <hdegoede@redhat.com>
commit bd911485294a6f0596e4592ed442438015cffc8a upstream.
Like various other ASUS ExpertBook-s, the ASUS ExpertBook B1402CVA
has an ACPI DSDT table that describes IRQ 1 as ActiveLow while
the kernel overrides it to EdgeHigh.
This prevents the keyboard from working. To fix this issue, add this laptop
to the skip_override_table so that the kernel does not override IRQ 1.
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218114
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/acpi/resource.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -440,6 +440,13 @@ static const struct dmi_system_id lenovo
},
},
{
+ /* Asus ExpertBook B1402CVA */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "B1402CVA"),
+ },
+ },
+ {
.ident = "LENOVO IdeaPad Flex 5 16ALC7",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 45/69] swiotlb-xen: provide the "max_mapping_size" method
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (43 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 44/69] ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 46/69] bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce() Greg Kroah-Hartman
` (26 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Marek Marczykowski-Górecki,
Christoph Hellwig, Keith Busch, Mikulas Patocka,
Stefano Stabellini, Juergen Gross
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keith Busch <kbusch@kernel.org>
commit bff2a2d453a1b683378b4508b86b84389f551a00 upstream.
There's a bug that when using the XEN hypervisor with bios with large
multi-page bio vectors on NVMe, the kernel deadlocks [1].
The deadlocks are caused by inability to map a large bio vector -
dma_map_sgtable always returns an error, this gets propagated to the block
layer as BLK_STS_RESOURCE and the block layer retries the request
indefinitely.
XEN uses the swiotlb framework to map discontiguous pages into contiguous
runs that are submitted to the PCIe device. The swiotlb framework has a
limitation on the length of a mapping - this needs to be announced with
the max_mapping_size method to make sure that the hardware drivers do not
create larger mappings.
Without max_mapping_size, the NVMe block driver would create large
mappings that overrun the maximum mapping size.
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Link: https://lore.kernel.org/stable/ZTNH0qtmint%2FzLJZ@mail-itl/ [1]
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Suggested-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/151bef41-e817-aea9-675-a35fdac4ed@redhat.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/xen/swiotlb-xen.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -564,4 +564,5 @@ const struct dma_map_ops xen_swiotlb_dma
.get_sgtable = dma_common_get_sgtable,
.alloc_pages = dma_common_alloc_pages,
.free_pages = dma_common_free_pages,
+ .max_mapping_size = swiotlb_max_mapping_size,
};
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 46/69] bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (44 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 45/69] swiotlb-xen: provide the "max_mapping_size" method Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 47/69] md: fix bi_status reporting in md_end_clone_io Greg Kroah-Hartman
` (25 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Zheng Wang, Coly Li, Jens Axboe
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Coly Li <colyli@suse.de>
commit f72f4312d4388376fc8a1f6cf37cb21a0d41758b upstream.
Commit 028ddcac477b ("bcache: Remove unnecessary NULL point check in
node allocations") do the following change inside btree_gc_coalesce(),
31 @@ -1340,7 +1340,7 @@ static int btree_gc_coalesce(
32 memset(new_nodes, 0, sizeof(new_nodes));
33 closure_init_stack(&cl);
34
35 - while (nodes < GC_MERGE_NODES && !IS_ERR_OR_NULL(r[nodes].b))
36 + while (nodes < GC_MERGE_NODES && !IS_ERR(r[nodes].b))
37 keys += r[nodes++].keys;
38
39 blocks = btree_default_blocks(b->c) * 2 / 3;
At line 35 the original r[nodes].b is not always allocatored from
__bch_btree_node_alloc(), and possibly initialized as NULL pointer by
caller of btree_gc_coalesce(). Therefore the change at line 36 is not
correct.
This patch replaces the mistaken IS_ERR() by IS_ERR_OR_NULL() to avoid
potential issue.
Fixes: 028ddcac477b ("bcache: Remove unnecessary NULL point check in node allocations")
Cc: <stable@vger.kernel.org> # 6.5+
Cc: Zheng Wang <zyytlz.wz@163.com>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20231120052503.6122-9-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/bcache/btree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -1342,7 +1342,7 @@ static int btree_gc_coalesce(struct btre
memset(new_nodes, 0, sizeof(new_nodes));
closure_init_stack(&cl);
- while (nodes < GC_MERGE_NODES && !IS_ERR(r[nodes].b))
+ while (nodes < GC_MERGE_NODES && !IS_ERR_OR_NULL(r[nodes].b))
keys += r[nodes++].keys;
blocks = btree_default_blocks(b->c) * 2 / 3;
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 47/69] md: fix bi_status reporting in md_end_clone_io
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (45 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 46/69] bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 48/69] bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race Greg Kroah-Hartman
` (24 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bhanu Victor DiCara, Song Liu,
Xiao Ni, Yu Kuai, Guoqing Jiang
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Song Liu <song@kernel.org>
commit 45b478951b2ba5aea70b2850c49c1aa83aedd0d2 upstream.
md_end_clone_io() may overwrite error status in orig_bio->bi_status with
BLK_STS_OK. This could happen when orig_bio has BIO_CHAIN (split by
md_submit_bio => bio_split_to_limits, for example). As a result, upper
layer may miss error reported from md (or the device) and consider the
failed IO was successful.
Fix this by only update orig_bio->bi_status when current bio reports
error and orig_bio is BLK_STS_OK. This is the same behavior as
__bio_chain_endio().
Fixes: 10764815ff47 ("md: add io accounting for raid0 and raid5")
Cc: stable@vger.kernel.org # v5.14+
Reported-by: Bhanu Victor DiCara <00bvd0+linux@gmail.com>
Closes: https://lore.kernel.org/regressions/5727380.DvuYhMxLoT@bvd0/
Signed-off-by: Song Liu <song@kernel.org>
Tested-by: Xiao Ni <xni@redhat.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Acked-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/md.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8627,7 +8627,8 @@ static void md_end_io_acct(struct bio *b
struct md_io_acct *md_io_acct = bio->bi_private;
struct bio *orig_bio = md_io_acct->orig_bio;
- orig_bio->bi_status = bio->bi_status;
+ if (bio->bi_status && !orig_bio->bi_status)
+ orig_bio->bi_status = bio->bi_status;
bio_end_io_acct(orig_bio, md_io_acct->start_time);
bio_put(bio);
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 48/69] bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (46 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 47/69] md: fix bi_status reporting in md_end_clone_io Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 49/69] io_uring/fs: consider link->flags when getting path for LINKAT Greg Kroah-Hartman
` (23 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mingzhe Zou, Coly Li, Jens Axboe
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingzhe Zou <mingzhe.zou@easystack.cn>
commit 2faac25d7958c4761bb8cec54adb79f806783ad6 upstream.
We get a kernel crash about "unable to handle kernel paging request":
```dmesg
[368033.032005] BUG: unable to handle kernel paging request at ffffffffad9ae4b5
[368033.032007] PGD fc3a0d067 P4D fc3a0d067 PUD fc3a0e063 PMD 8000000fc38000e1
[368033.032012] Oops: 0003 [#1] SMP PTI
[368033.032015] CPU: 23 PID: 55090 Comm: bch_dirtcnt[0] Kdump: loaded Tainted: G OE --------- - - 4.18.0-147.5.1.es8_24.x86_64 #1
[368033.032017] Hardware name: Tsinghua Tongfang THTF Chaoqiang Server/072T6D, BIOS 2.4.3 01/17/2017
[368033.032027] RIP: 0010:native_queued_spin_lock_slowpath+0x183/0x1d0
[368033.032029] Code: 8b 02 48 85 c0 74 f6 48 89 c1 eb d0 c1 e9 12 83 e0
03 83 e9 01 48 c1 e0 05 48 63 c9 48 05 c0 3d 02 00 48 03 04 cd 60 68 93
ad <48> 89 10 8b 42 08 85 c0 75 09 f3 90 8b 42 08 85 c0 74 f7 48 8b 02
[368033.032031] RSP: 0018:ffffbb48852abe00 EFLAGS: 00010082
[368033.032032] RAX: ffffffffad9ae4b5 RBX: 0000000000000246 RCX: 0000000000003bf3
[368033.032033] RDX: ffff97b0ff8e3dc0 RSI: 0000000000600000 RDI: ffffbb4884743c68
[368033.032034] RBP: 0000000000000001 R08: 0000000000000000 R09: 000007ffffffffff
[368033.032035] R10: ffffbb486bb01000 R11: 0000000000000001 R12: ffffffffc068da70
[368033.032036] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
[368033.032038] FS: 0000000000000000(0000) GS:ffff97b0ff8c0000(0000) knlGS:0000000000000000
[368033.032039] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[368033.032040] CR2: ffffffffad9ae4b5 CR3: 0000000fc3a0a002 CR4: 00000000003626e0
[368033.032042] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[368033.032043] bcache: bch_cached_dev_attach() Caching rbd479 as bcache462 on set 8cff3c36-4a76-4242-afaa-7630206bc70b
[368033.032045] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[368033.032046] Call Trace:
[368033.032054] _raw_spin_lock_irqsave+0x32/0x40
[368033.032061] __wake_up_common_lock+0x63/0xc0
[368033.032073] ? bch_ptr_invalid+0x10/0x10 [bcache]
[368033.033502] bch_dirty_init_thread+0x14c/0x160 [bcache]
[368033.033511] ? read_dirty_submit+0x60/0x60 [bcache]
[368033.033516] kthread+0x112/0x130
[368033.033520] ? kthread_flush_work_fn+0x10/0x10
[368033.034505] ret_from_fork+0x35/0x40
```
The crash occurred when call wake_up(&state->wait), and then we want
to look at the value in the state. However, bch_sectors_dirty_init()
is not found in the stack of any task. Since state is allocated on
the stack, we guess that bch_sectors_dirty_init() has exited, causing
bch_dirty_init_thread() to be unable to handle kernel paging request.
In order to verify this idea, we added some printing information during
wake_up(&state->wait). We find that "wake up" is printed twice, however
we only expect the last thread to wake up once.
```dmesg
[ 994.641004] alcache: bch_dirty_init_thread() wake up
[ 994.641018] alcache: bch_dirty_init_thread() wake up
[ 994.641523] alcache: bch_sectors_dirty_init() init exit
```
There is a race. If bch_sectors_dirty_init() exits after the first wake
up, the second wake up will trigger this bug("unable to handle kernel
paging request").
Proceed as follows:
bch_sectors_dirty_init
kthread_run ==============> bch_dirty_init_thread(bch_dirtcnt[0])
... ...
atomic_inc(&state.started) ...
... ...
atomic_read(&state.enough) ...
... atomic_set(&state->enough, 1)
kthread_run ======================================================> bch_dirty_init_thread(bch_dirtcnt[1])
... atomic_dec_and_test(&state->started) ...
atomic_inc(&state.started) ... ...
... wake_up(&state->wait) ...
atomic_read(&state.enough) atomic_dec_and_test(&state->started)
... ...
wait_event(state.wait, atomic_read(&state.started) == 0) ...
return ...
wake_up(&state->wait)
We believe it is very common to wake up twice if there is no dirty, but
crash is an extremely low probability event. It's hard for us to reproduce
this issue. We attached and detached continuously for a week, with a total
of more than one million attaches and only one crash.
Putting atomic_inc(&state.started) before kthread_run() can avoid waking
up twice.
Fixes: b144e45fc576 ("bcache: make bch_sectors_dirty_init() to be multithreaded")
Signed-off-by: Mingzhe Zou <mingzhe.zou@easystack.cn>
Cc: <stable@vger.kernel.org>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20231120052503.6122-8-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/bcache/writeback.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/md/bcache/writeback.c
+++ b/drivers/md/bcache/writeback.c
@@ -1004,17 +1004,18 @@ void bch_sectors_dirty_init(struct bcach
if (atomic_read(&state.enough))
break;
+ atomic_inc(&state.started);
state.infos[i].state = &state;
state.infos[i].thread =
kthread_run(bch_dirty_init_thread, &state.infos[i],
"bch_dirtcnt[%d]", i);
if (IS_ERR(state.infos[i].thread)) {
pr_err("fails to run thread bch_dirty_init[%d]\n", i);
+ atomic_dec(&state.started);
for (--i; i >= 0; i--)
kthread_stop(state.infos[i].thread);
goto out;
}
- atomic_inc(&state.started);
}
out:
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 49/69] io_uring/fs: consider link->flags when getting path for LINKAT
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (47 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 48/69] bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 50/69] s390/dasd: protect device queue against concurrent access Greg Kroah-Hartman
` (22 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Charles Mirabile, Jens Axboe
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Mirabile <cmirabil@redhat.com>
commit 8479063f1fbee201a8739130e816cc331b675838 upstream.
In order for `AT_EMPTY_PATH` to work as expected, the fact
that the user wants that behavior needs to make it to `getname_flags`
or it will return ENOENT.
Fixes: cf30da90bc3a ("io_uring: add support for IORING_OP_LINKAT")
Cc: <stable@vger.kernel.org>
Link: https://github.com/axboe/liburing/issues/995
Signed-off-by: Charles Mirabile <cmirabil@redhat.com>
Link: https://lore.kernel.org/r/20231120105545.1209530-1-cmirabil@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -4049,7 +4049,7 @@ static int io_linkat_prep(struct io_kioc
newf = u64_to_user_ptr(READ_ONCE(sqe->addr2));
lnk->flags = READ_ONCE(sqe->hardlink_flags);
- lnk->oldpath = getname(oldf);
+ lnk->oldpath = getname_uflags(oldf, lnk->flags);
if (IS_ERR(lnk->oldpath))
return PTR_ERR(lnk->oldpath);
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 50/69] s390/dasd: protect device queue against concurrent access
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (48 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 49/69] io_uring/fs: consider link->flags when getting path for LINKAT Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 51/69] USB: serial: option: add Luat Air72*U series products Greg Kroah-Hartman
` (21 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stefan Haberland, Jan Höppner,
Jens Axboe
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Höppner <hoeppner@linux.ibm.com>
commit db46cd1e0426f52999d50fa72cfa97fa39952885 upstream.
In dasd_profile_start() the amount of requests on the device queue are
counted. The access to the device queue is unprotected against
concurrent access. With a lot of parallel I/O, especially with alias
devices enabled, the device queue can change while dasd_profile_start()
is accessing the queue. In the worst case this leads to a kernel panic
due to incorrect pointer accesses.
Fix this by taking the device lock before accessing the queue and
counting the requests. Additionally the check for a valid profile data
pointer can be done earlier to avoid unnecessary locking in a hot path.
Cc: <stable@vger.kernel.org>
Fixes: 4fa52aa7a82f ("[S390] dasd: add enhanced DASD statistics interface")
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20231025132437.1223363-3-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/s390/block/dasd.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -697,18 +697,20 @@ static void dasd_profile_start(struct da
* we count each request only once.
*/
device = cqr->startdev;
- if (device->profile.data) {
- counter = 1; /* request is not yet queued on the start device */
- list_for_each(l, &device->ccw_queue)
- if (++counter >= 31)
- break;
- }
+ if (!device->profile.data)
+ return;
+
+ spin_lock(get_ccwdev_lock(device->cdev));
+ counter = 1; /* request is not yet queued on the start device */
+ list_for_each(l, &device->ccw_queue)
+ if (++counter >= 31)
+ break;
+ spin_unlock(get_ccwdev_lock(device->cdev));
+
spin_lock(&device->profile.lock);
- if (device->profile.data) {
- device->profile.data->dasd_io_nr_req[counter]++;
- if (rq_data_dir(req) == READ)
- device->profile.data->dasd_read_nr_req[counter]++;
- }
+ device->profile.data->dasd_io_nr_req[counter]++;
+ if (rq_data_dir(req) == READ)
+ device->profile.data->dasd_read_nr_req[counter]++;
spin_unlock(&device->profile.lock);
}
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 51/69] USB: serial: option: add Luat Air72*U series products
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (49 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 50/69] s390/dasd: protect device queue against concurrent access Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 52/69] hv_netvsc: Fix race of register_netdevice_notifier and VF register Greg Kroah-Hartman
` (20 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yangyu Chen, Asuna Yang,
Johan Hovold
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Asuna Yang <spriteovo@gmail.com>
commit da90e45d5afc4da2de7cd3ea7943d0f1baa47cc2 upstream.
Update the USB serial option driver support for Luat Air72*U series
products.
ID 1782:4e00 Spreadtrum Communications Inc. UNISOC-8910
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 13 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1782 ProdID=4e00 Rev=00.00
S: Manufacturer=UNISOC
S: Product=UNISOC-8910
C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=400mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=4096ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
If#= 2: AT
If#= 3: PPP + AT
If#= 4: Debug
Co-developed-by: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Asuna Yang <SpriteOvO@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/option.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -609,6 +609,8 @@ static void option_instat_callback(struc
#define UNISOC_VENDOR_ID 0x1782
/* TOZED LT70-C based on UNISOC SL8563 uses UNISOC's vendor ID */
#define TOZED_PRODUCT_LT70C 0x4055
+/* Luat Air72*U series based on UNISOC UIS8910 uses UNISOC's vendor ID */
+#define LUAT_PRODUCT_AIR720U 0x4e00
/* Device flags */
@@ -2271,6 +2273,7 @@ static const struct usb_device_id option
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) },
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) },
+ { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, option_ids);
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 52/69] hv_netvsc: Fix race of register_netdevice_notifier and VF register
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (50 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 51/69] USB: serial: option: add Luat Air72*U series products Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 53/69] hv_netvsc: Mark VF as slave before exposing it to user-mode Greg Kroah-Hartman
` (19 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dexuan Cui, Haiyang Zhang,
Wojciech Drewek, Paolo Abeni
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haiyang Zhang <haiyangz@microsoft.com>
commit 85520856466ed6bc3b1ccb013cddac70ceb437db upstream.
If VF NIC is registered earlier, NETDEV_REGISTER event is replayed,
but NETDEV_POST_INIT is not.
Move register_netdevice_notifier() earlier, so the call back
function is set before probing.
Cc: stable@vger.kernel.org
Fixes: e04e7a7bbd4b ("hv_netvsc: Fix a deadlock by getting rtnl lock earlier in netvsc_probe()")
Reported-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/hyperv/netvsc_drv.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -2807,12 +2807,17 @@ static int __init netvsc_drv_init(void)
}
netvsc_ring_bytes = ring_size * PAGE_SIZE;
+ register_netdevice_notifier(&netvsc_netdev_notifier);
+
ret = vmbus_driver_register(&netvsc_drv);
if (ret)
- return ret;
+ goto err_vmbus_reg;
- register_netdevice_notifier(&netvsc_netdev_notifier);
return 0;
+
+err_vmbus_reg:
+ unregister_netdevice_notifier(&netvsc_netdev_notifier);
+ return ret;
}
MODULE_LICENSE("GPL");
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 53/69] hv_netvsc: Mark VF as slave before exposing it to user-mode
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (51 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 52/69] hv_netvsc: Fix race of register_netdevice_notifier and VF register Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 54/69] dm-delay: fix a race between delay_presuspend and delay_bio Greg Kroah-Hartman
` (18 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Long Li, Haiyang Zhang,
Stephen Hemminger, Dexuan Cui, Paolo Abeni
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Long Li <longli@microsoft.com>
commit c807d6cd089d2f4951baa838081ec5ae3e2360f8 upstream.
When a VF is being exposed form the kernel, it should be marked as "slave"
before exposing to the user-mode. The VF is not usable without netvsc
running as master. The user-mode should never see a VF without the "slave"
flag.
This commit moves the code of setting the slave flag to the time before
VF is exposed to user-mode.
Cc: stable@vger.kernel.org
Fixes: 0c195567a8f6 ("netvsc: transparent VF management")
Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/hyperv/netvsc_drv.c | 32 +++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -2227,9 +2227,6 @@ static int netvsc_vf_join(struct net_dev
goto upper_link_failed;
}
- /* set slave flag before open to prevent IPv6 addrconf */
- vf_netdev->flags |= IFF_SLAVE;
-
schedule_delayed_work(&ndev_ctx->vf_takeover, VF_TAKEOVER_INT);
call_netdevice_notifiers(NETDEV_JOIN, vf_netdev);
@@ -2336,16 +2333,18 @@ static struct net_device *get_netvsc_bys
}
- /* Fallback path to check synthetic vf with
- * help of mac addr
+ /* Fallback path to check synthetic vf with help of mac addr.
+ * Because this function can be called before vf_netdev is
+ * initialized (NETDEV_POST_INIT) when its perm_addr has not been copied
+ * from dev_addr, also try to match to its dev_addr.
+ * Note: On Hyper-V and Azure, it's not possible to set a MAC address
+ * on a VF that matches to the MAC of a unrelated NETVSC device.
*/
list_for_each_entry(ndev_ctx, &netvsc_dev_list, list) {
ndev = hv_get_drvdata(ndev_ctx->device_ctx);
- if (ether_addr_equal(vf_netdev->perm_addr, ndev->perm_addr)) {
- netdev_notice(vf_netdev,
- "falling back to mac addr based matching\n");
+ if (ether_addr_equal(vf_netdev->perm_addr, ndev->perm_addr) ||
+ ether_addr_equal(vf_netdev->dev_addr, ndev->perm_addr))
return ndev;
- }
}
netdev_notice(vf_netdev,
@@ -2353,6 +2352,19 @@ static struct net_device *get_netvsc_bys
return NULL;
}
+static int netvsc_prepare_bonding(struct net_device *vf_netdev)
+{
+ struct net_device *ndev;
+
+ ndev = get_netvsc_byslot(vf_netdev);
+ if (!ndev)
+ return NOTIFY_DONE;
+
+ /* set slave flag before open to prevent IPv6 addrconf */
+ vf_netdev->flags |= IFF_SLAVE;
+ return NOTIFY_DONE;
+}
+
static int netvsc_register_vf(struct net_device *vf_netdev)
{
struct net_device_context *net_device_ctx;
@@ -2772,6 +2784,8 @@ static int netvsc_netdev_event(struct no
return NOTIFY_DONE;
switch (event) {
+ case NETDEV_POST_INIT:
+ return netvsc_prepare_bonding(event_dev);
case NETDEV_REGISTER:
return netvsc_register_vf(event_dev);
case NETDEV_UNREGISTER:
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 54/69] dm-delay: fix a race between delay_presuspend and delay_bio
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (52 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 53/69] hv_netvsc: Mark VF as slave before exposing it to user-mode Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 55/69] bcache: check return value from btree_node_alloc_replacement() Greg Kroah-Hartman
` (17 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mikulas Patocka, Mike Snitzer,
Sasha Levin
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <mpatocka@redhat.com>
[ Upstream commit 6fc45b6ed921dc00dfb264dc08c7d67ee63d2656 ]
In delay_presuspend, we set the atomic variable may_delay and then stop
the timer and flush pending bios. The intention here is to prevent the
delay target from re-arming the timer again.
However, this test is racy. Suppose that one thread goes to delay_bio,
sees that dc->may_delay is one and proceeds; now, another thread executes
delay_presuspend, it sets dc->may_delay to zero, deletes the timer and
flushes pending bios. Then, the first thread continues and adds the bio to
delayed->list despite the fact that dc->may_delay is false.
Fix this bug by changing may_delay's type from atomic_t to bool and
only access it while holding the delayed_bios_lock mutex. Note that we
don't have to grab the mutex in delay_resume because there are no bios
in flight at this point.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/md/dm-delay.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c
index 59e51d285b0e5..238028056d0cc 100644
--- a/drivers/md/dm-delay.c
+++ b/drivers/md/dm-delay.c
@@ -30,7 +30,7 @@ struct delay_c {
struct workqueue_struct *kdelayd_wq;
struct work_struct flush_expired_bios;
struct list_head delayed_bios;
- atomic_t may_delay;
+ bool may_delay;
struct delay_class read;
struct delay_class write;
@@ -191,7 +191,7 @@ static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv)
INIT_WORK(&dc->flush_expired_bios, flush_expired_bios);
INIT_LIST_HEAD(&dc->delayed_bios);
mutex_init(&dc->timer_lock);
- atomic_set(&dc->may_delay, 1);
+ dc->may_delay = true;
dc->argc = argc;
ret = delay_class_ctr(ti, &dc->read, argv);
@@ -245,7 +245,7 @@ static int delay_bio(struct delay_c *dc, struct delay_class *c, struct bio *bio)
struct dm_delay_info *delayed;
unsigned long expires = 0;
- if (!c->delay || !atomic_read(&dc->may_delay))
+ if (!c->delay)
return DM_MAPIO_REMAPPED;
delayed = dm_per_bio_data(bio, sizeof(struct dm_delay_info));
@@ -254,6 +254,10 @@ static int delay_bio(struct delay_c *dc, struct delay_class *c, struct bio *bio)
delayed->expires = expires = jiffies + msecs_to_jiffies(c->delay);
mutex_lock(&delayed_bios_lock);
+ if (unlikely(!dc->may_delay)) {
+ mutex_unlock(&delayed_bios_lock);
+ return DM_MAPIO_REMAPPED;
+ }
c->ops++;
list_add_tail(&delayed->list, &dc->delayed_bios);
mutex_unlock(&delayed_bios_lock);
@@ -267,7 +271,10 @@ static void delay_presuspend(struct dm_target *ti)
{
struct delay_c *dc = ti->private;
- atomic_set(&dc->may_delay, 0);
+ mutex_lock(&delayed_bios_lock);
+ dc->may_delay = false;
+ mutex_unlock(&delayed_bios_lock);
+
del_timer_sync(&dc->delay_timer);
flush_bios(flush_delayed_bios(dc, 1));
}
@@ -276,7 +283,7 @@ static void delay_resume(struct dm_target *ti)
{
struct delay_c *dc = ti->private;
- atomic_set(&dc->may_delay, 1);
+ dc->may_delay = true;
}
static int delay_map(struct dm_target *ti, struct bio *bio)
--
2.42.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH 5.15 55/69] bcache: check return value from btree_node_alloc_replacement()
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (53 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 54/69] dm-delay: fix a race between delay_presuspend and delay_bio Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 56/69] bcache: prevent potential division by zero error Greg Kroah-Hartman
` (16 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Coly Li, Dan Carpenter, Jens Axboe
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Coly Li <colyli@suse.de>
commit 777967e7e9f6f5f3e153abffb562bffaf4430d26 upstream.
In btree_gc_rewrite_node(), pointer 'n' is not checked after it returns
from btree_gc_rewrite_node(). There is potential possibility that 'n' is
a non NULL ERR_PTR(), referencing such error code is not permitted in
following code. Therefore a return value checking is necessary after 'n'
is back from btree_node_alloc_replacement().
Signed-off-by: Coly Li <colyli@suse.de>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231120052503.6122-3-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/bcache/btree.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -1506,6 +1506,8 @@ static int btree_gc_rewrite_node(struct
return 0;
n = btree_node_alloc_replacement(replace, NULL);
+ if (IS_ERR(n))
+ return 0;
/* recheck reserve after allocating replacement node */
if (btree_check_reserve(b, NULL)) {
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 56/69] bcache: prevent potential division by zero error
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (54 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 55/69] bcache: check return value from btree_node_alloc_replacement() Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 57/69] bcache: fixup init dirty data errors Greg Kroah-Hartman
` (15 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Rand Deeb, Coly Li, Jens Axboe
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rand Deeb <rand.sec96@gmail.com>
commit 2c7f497ac274a14330208b18f6f734000868ebf9 upstream.
In SHOW(), the variable 'n' is of type 'size_t.' While there is a
conditional check to verify that 'n' is not equal to zero before
executing the 'do_div' macro, concerns arise regarding potential
division by zero error in 64-bit environments.
The concern arises when 'n' is 64 bits in size, greater than zero, and
the lower 32 bits of it are zeros. In such cases, the conditional check
passes because 'n' is non-zero, but the 'do_div' macro casts 'n' to
'uint32_t,' effectively truncating it to its lower 32 bits.
Consequently, the 'n' value becomes zero.
To fix this potential division by zero error and ensure precise
division handling, this commit replaces the 'do_div' macro with
div64_u64(). div64_u64() is designed to work with 64-bit operands,
guaranteeing that division is performed correctly.
This change enhances the robustness of the code, ensuring that division
operations yield accurate results in all scenarios, eliminating the
possibility of division by zero, and improving compatibility across
different 64-bit environments.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Rand Deeb <rand.sec96@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20231120052503.6122-5-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/bcache/sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -1099,7 +1099,7 @@ SHOW(__bch_cache)
sum += INITIAL_PRIO - cached[i];
if (n)
- do_div(sum, n);
+ sum = div64_u64(sum, n);
for (i = 0; i < ARRAY_SIZE(q); i++)
q[i] = INITIAL_PRIO - cached[n * (i + 1) /
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 57/69] bcache: fixup init dirty data errors
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (55 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 56/69] bcache: prevent potential division by zero error Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 58/69] bcache: fixup lock c->root error Greg Kroah-Hartman
` (14 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mingzhe Zou, Coly Li, Jens Axboe
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingzhe Zou <mingzhe.zou@easystack.cn>
commit 7cc47e64d3d69786a2711a4767e26b26ba63d7ed upstream.
We found that after long run, the dirty_data of the bcache device
will have errors. This error cannot be eliminated unless re-register.
We also found that reattach after detach, this error can accumulate.
In bch_sectors_dirty_init(), all inode <= d->id keys will be recounted
again. This is wrong, we only need to count the keys of the current
device.
Fixes: b144e45fc576 ("bcache: make bch_sectors_dirty_init() to be multithreaded")
Signed-off-by: Mingzhe Zou <mingzhe.zou@easystack.cn>
Cc: <stable@vger.kernel.org>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20231120052503.6122-6-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/bcache/writeback.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/md/bcache/writeback.c
+++ b/drivers/md/bcache/writeback.c
@@ -981,8 +981,11 @@ void bch_sectors_dirty_init(struct bcach
op.count = 0;
for_each_key_filter(&c->root->keys,
- k, &iter, bch_ptr_invalid)
+ k, &iter, bch_ptr_invalid) {
+ if (KEY_INODE(k) != op.inode)
+ continue;
sectors_dirty_init_fn(&op.op, c->root, k);
+ }
rw_unlock(0, c->root);
return;
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 58/69] bcache: fixup lock c->root error
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (56 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 57/69] bcache: fixup init dirty data errors Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 59/69] usb: cdnsp: Fix deadlock issue during using NCM gadget Greg Kroah-Hartman
` (13 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mingzhe Zou, Coly Li, Jens Axboe
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingzhe Zou <mingzhe.zou@easystack.cn>
commit e34820f984512b433ee1fc291417e60c47d56727 upstream.
We had a problem with io hung because it was waiting for c->root to
release the lock.
crash> cache_set.root -l cache_set.list ffffa03fde4c0050
root = 0xffff802ef454c800
crash> btree -o 0xffff802ef454c800 | grep rw_semaphore
[ffff802ef454c858] struct rw_semaphore lock;
crash> struct rw_semaphore ffff802ef454c858
struct rw_semaphore {
count = {
counter = -4294967297
},
wait_list = {
next = 0xffff00006786fc28,
prev = 0xffff00005d0efac8
},
wait_lock = {
raw_lock = {
{
val = {
counter = 0
},
{
locked = 0 '\000',
pending = 0 '\000'
},
{
locked_pending = 0,
tail = 0
}
}
}
},
osq = {
tail = {
counter = 0
}
},
owner = 0xffffa03fdc586603
}
The "counter = -4294967297" means that lock count is -1 and a write lock
is being attempted. Then, we found that there is a btree with a counter
of 1 in btree_cache_freeable.
crash> cache_set -l cache_set.list ffffa03fde4c0050 -o|grep btree_cache
[ffffa03fde4c1140] struct list_head btree_cache;
[ffffa03fde4c1150] struct list_head btree_cache_freeable;
[ffffa03fde4c1160] struct list_head btree_cache_freed;
[ffffa03fde4c1170] unsigned int btree_cache_used;
[ffffa03fde4c1178] wait_queue_head_t btree_cache_wait;
[ffffa03fde4c1190] struct task_struct *btree_cache_alloc_lock;
crash> list -H ffffa03fde4c1140|wc -l
973
crash> list -H ffffa03fde4c1150|wc -l
1123
crash> cache_set.btree_cache_used -l cache_set.list ffffa03fde4c0050
btree_cache_used = 2097
crash> list -s btree -l btree.list -H ffffa03fde4c1140|grep -E -A2 "^ lock = {" > btree_cache.txt
crash> list -s btree -l btree.list -H ffffa03fde4c1150|grep -E -A2 "^ lock = {" > btree_cache_freeable.txt
[root@node-3 127.0.0.1-2023-08-04-16:40:28]# pwd
/var/crash/127.0.0.1-2023-08-04-16:40:28
[root@node-3 127.0.0.1-2023-08-04-16:40:28]# cat btree_cache.txt|grep counter|grep -v "counter = 0"
[root@node-3 127.0.0.1-2023-08-04-16:40:28]# cat btree_cache_freeable.txt|grep counter|grep -v "counter = 0"
counter = 1
We found that this is a bug in bch_sectors_dirty_init() when locking c->root:
(1). Thread X has locked c->root(A) write.
(2). Thread Y failed to lock c->root(A), waiting for the lock(c->root A).
(3). Thread X bch_btree_set_root() changes c->root from A to B.
(4). Thread X releases the lock(c->root A).
(5). Thread Y successfully locks c->root(A).
(6). Thread Y releases the lock(c->root B).
down_write locked ---(1)----------------------┐
| |
| down_read waiting ---(2)----┐ |
| | ┌-------------┐ ┌-------------┐
bch_btree_set_root ===(3)========>> | c->root A | | c->root B |
| | └-------------┘ └-------------┘
up_write ---(4)---------------------┘ | |
| | |
down_read locked ---(5)-----------┘ |
| |
up_read ---(6)-----------------------------┘
Since c->root may change, the correct steps to lock c->root should be
the same as bch_root_usage(), compare after locking.
static unsigned int bch_root_usage(struct cache_set *c)
{
unsigned int bytes = 0;
struct bkey *k;
struct btree *b;
struct btree_iter iter;
goto lock_root;
do {
rw_unlock(false, b);
lock_root:
b = c->root;
rw_lock(false, b, b->level);
} while (b != c->root);
for_each_key_filter(&b->keys, k, &iter, bch_ptr_bad)
bytes += bkey_bytes(k);
rw_unlock(false, b);
return (bytes * 100) / btree_bytes(c);
}
Fixes: b144e45fc576 ("bcache: make bch_sectors_dirty_init() to be multithreaded")
Signed-off-by: Mingzhe Zou <mingzhe.zou@easystack.cn>
Cc: <stable@vger.kernel.org>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20231120052503.6122-7-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/bcache/writeback.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--- a/drivers/md/bcache/writeback.c
+++ b/drivers/md/bcache/writeback.c
@@ -967,14 +967,22 @@ static int bch_btre_dirty_init_thread_nr
void bch_sectors_dirty_init(struct bcache_device *d)
{
int i;
+ struct btree *b = NULL;
struct bkey *k = NULL;
struct btree_iter iter;
struct sectors_dirty_init op;
struct cache_set *c = d->c;
struct bch_dirty_init_state state;
+retry_lock:
+ b = c->root;
+ rw_lock(0, b, b->level);
+ if (b != c->root) {
+ rw_unlock(0, b);
+ goto retry_lock;
+ }
+
/* Just count root keys if no leaf node */
- rw_lock(0, c->root, c->root->level);
if (c->root->level == 0) {
bch_btree_op_init(&op.op, -1);
op.inode = d->id;
@@ -987,7 +995,7 @@ void bch_sectors_dirty_init(struct bcach
sectors_dirty_init_fn(&op.op, c->root, k);
}
- rw_unlock(0, c->root);
+ rw_unlock(0, b);
return;
}
@@ -1024,7 +1032,7 @@ void bch_sectors_dirty_init(struct bcach
out:
/* Must wait for all threads to stop. */
wait_event(state.wait, atomic_read(&state.started) == 0);
- rw_unlock(0, c->root);
+ rw_unlock(0, b);
}
void bch_cached_dev_writeback_init(struct cached_dev *dc)
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 59/69] usb: cdnsp: Fix deadlock issue during using NCM gadget
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (57 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 58/69] bcache: fixup lock c->root error Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 60/69] USB: serial: option: add Fibocom L7xx modules Greg Kroah-Hartman
` (12 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pawel Laszczak, Peter Chen
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pawel Laszczak <pawell@cadence.com>
commit 58f2fcb3a845fcbbad2f3196bb37d744e0506250 upstream.
The interrupt service routine registered for the gadget is a primary
handler which mask the interrupt source and a threaded handler which
handles the source of the interrupt. Since the threaded handler is
voluntary threaded, the IRQ-core does not disable bottom halves before
invoke the handler like it does for the forced-threaded handler.
Due to changes in networking it became visible that a network gadget's
completions handler may schedule a softirq which remains unprocessed.
The gadget's completion handler is usually invoked either in hard-IRQ or
soft-IRQ context. In this context it is enough to just raise the softirq
because the softirq itself will be handled once that context is left.
In the case of the voluntary threaded handler, there is nothing that
will process pending softirqs. Which means it remain queued until
another random interrupt (on this CPU) fires and handles it on its exit
path or another thread locks and unlocks a lock with the bh suffix.
Worst case is that the CPU goes idle and the NOHZ complains about
unhandled softirqs.
Disable bottom halves before acquiring the lock (and disabling
interrupts) and enable them after dropping the lock. This ensures that
any pending softirqs will handled right away.
cc: stable@vger.kernel.org
Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20231108093125.224963-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/cdns3/cdnsp-ring.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/cdns3/cdnsp-ring.c
+++ b/drivers/usb/cdns3/cdnsp-ring.c
@@ -1522,6 +1522,7 @@ irqreturn_t cdnsp_thread_irq_handler(int
unsigned long flags;
int counter = 0;
+ local_bh_disable();
spin_lock_irqsave(&pdev->lock, flags);
if (pdev->cdnsp_state & (CDNSP_STATE_HALTED | CDNSP_STATE_DYING)) {
@@ -1534,6 +1535,7 @@ irqreturn_t cdnsp_thread_irq_handler(int
cdnsp_died(pdev);
spin_unlock_irqrestore(&pdev->lock, flags);
+ local_bh_enable();
return IRQ_HANDLED;
}
@@ -1550,6 +1552,7 @@ irqreturn_t cdnsp_thread_irq_handler(int
cdnsp_update_erst_dequeue(pdev, event_ring_deq, 1);
spin_unlock_irqrestore(&pdev->lock, flags);
+ local_bh_enable();
return IRQ_HANDLED;
}
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 60/69] USB: serial: option: add Fibocom L7xx modules
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (58 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 59/69] usb: cdnsp: Fix deadlock issue during using NCM gadget Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 61/69] USB: serial: option: fix FM101R-GL defines Greg Kroah-Hartman
` (11 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Victor Fragoso, Lars Melin,
Johan Hovold
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Victor Fragoso <victorffs@hotmail.com>
commit e389fe8b68137344562fb6e4d53d8a89ef6212dd upstream.
Add support for Fibocom L716-EU module series.
L716-EU is a Fibocom module based on ZTE's V3E/V3T chipset.
Device creates multiple interfaces when connected to PC as follows:
- Network Interface: ECM or RNDIS (set by FW or AT Command)
- ttyUSB0: AT port
- ttyUSB1: Modem port
- ttyUSB2: AT2 port
- ttyUSB3: Trace port for log information
- ADB: ADB port for debugging. ("Driver=usbfs" when ADB server enabled)
Here are the outputs of lsusb and usb-devices:
$ ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
usb-devices:
L716-EU (ECM mode):
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 51 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2cb7 ProdID=0001 Rev= 1.00
S: Manufacturer=Fibocom,Incorporated
S: Product=Fibocom Mobile Boardband
S: SerialNumber=1234567890ABCDEF
C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
L716-EU (RNDIS mode):
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 49 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2cb7 ProdID=0001 Rev= 1.00
S: Manufacturer=Fibocom,Incorporated
S: Product=Fibocom Mobile Boardband
S: SerialNumber=1234567890ABCDEF
C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=rndis_host
E: Ad=87(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Signed-off-by: Victor Fragoso <victorffs@hotmail.com>
Reviewed-by: Lars Melin <larsm17@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/option.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2251,6 +2251,7 @@ static const struct usb_device_id option
.driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
{ USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */
{ USB_DEVICE_INTERFACE_CLASS(0x1782, 0x4d11, 0xff) }, /* Fibocom L610 (ECM/RNDIS mode) */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0001, 0xff, 0xff, 0xff) }, /* Fibocom L716-EU (ECM/RNDIS mode) */
{ USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */
.driver_info = RSVD(4) | RSVD(5) },
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 61/69] USB: serial: option: fix FM101R-GL defines
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (59 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 60/69] USB: serial: option: add Fibocom L7xx modules Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 62/69] USB: serial: option: dont claim interface 4 for ZTE MF290 Greg Kroah-Hartman
` (10 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Puliang Lu, Johan Hovold
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Puliang Lu <puliang.lu@fibocom.com>
commit a1092619dd28ac0fcf23016160a2fdccd98ef935 upstream.
Modify the definition of the two Fibocom FM101R-GL PID macros, which had
their PIDs switched.
The correct PIDs are:
- VID:PID 413C:8213, FM101R-GL ESIM are laptop M.2 cards (with
MBIM interfaces for Linux)
- VID:PID 413C:8215, FM101R-GL are laptop M.2 cards (with
MBIM interface for Linux)
0x8213: mbim, tty
0x8215: mbim, tty
Signed-off-by: Puliang Lu <puliang.lu@fibocom.com>
Fixes: 52480e1f1a25 ("USB: serial: option: add Fibocom to DELL custom modem FM101R-GL")
Link: https://lore.kernel.org/lkml/TYZPR02MB508845BAD7936A62A105CE5D89DFA@TYZPR02MB5088.apcprd02.prod.outlook.com/
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/option.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -203,8 +203,8 @@ static void option_instat_callback(struc
#define DELL_PRODUCT_5829E_ESIM 0x81e4
#define DELL_PRODUCT_5829E 0x81e6
-#define DELL_PRODUCT_FM101R 0x8213
-#define DELL_PRODUCT_FM101R_ESIM 0x8215
+#define DELL_PRODUCT_FM101R_ESIM 0x8213
+#define DELL_PRODUCT_FM101R 0x8215
#define KYOCERA_VENDOR_ID 0x0c88
#define KYOCERA_PRODUCT_KPC650 0x17da
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 62/69] USB: serial: option: dont claim interface 4 for ZTE MF290
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (60 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 61/69] USB: serial: option: fix FM101R-GL defines Greg Kroah-Hartman
@ 2023-11-30 16:22 ` Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 63/69] usb: typec: tcpm: Skip hard reset when in error recovery Greg Kroah-Hartman
` (9 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bjørn Mork, Lech Perczak,
Johan Hovold
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lech Perczak <lech.perczak@gmail.com>
commit 8771127e25d6c20d458ad27cf32f7fcfc1755e05 upstream.
Interface 4 is used by for QMI interface in stock firmware of MF28D, the
router which uses MF290 modem. Free the interface up, to rebind it to
qmi_wwan driver.
The proper configuration is:
Interface mapping is:
0: QCDM, 1: (unknown), 2: AT (PCUI), 2: AT (Modem), 4: QMI
T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=19d2 ProdID=0189 Rev= 0.00
S: Manufacturer=ZTE, Incorporated
S: Product=ZTE LTE Technologies MSM
C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=2ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=2ms
E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
Cc: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/option.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1548,7 +1548,8 @@ static const struct usb_device_id option
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff),
.driver_info = RSVD(4) },
- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff),
+ .driver_info = RSVD(4) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0191, 0xff, 0xff, 0xff), /* ZTE EuFi890 */
.driver_info = RSVD(4) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0196, 0xff, 0xff, 0xff) },
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 63/69] usb: typec: tcpm: Skip hard reset when in error recovery
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (61 preceding siblings ...)
2023-11-30 16:22 ` [PATCH 5.15 62/69] USB: serial: option: dont claim interface 4 for ZTE MF290 Greg Kroah-Hartman
@ 2023-11-30 16:23 ` Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 64/69] USB: dwc2: write HCINT with INTMASK applied Greg Kroah-Hartman
` (8 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:23 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Badhri Jagan Sridharan,
Heikki Krogeus, Guenter Roeck
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Badhri Jagan Sridharan <badhri@google.com>
commit a6fe37f428c19dd164c2111157d4a1029bd853aa upstream.
Hard reset queued prior to error recovery (or) received during
error recovery will make TCPM to prematurely exit error recovery
sequence. Ignore hard resets received during error recovery (or)
port reset sequence.
```
[46505.459688] state change SNK_READY -> ERROR_RECOVERY [rev3 NONE_AMS]
[46505.459706] state change ERROR_RECOVERY -> PORT_RESET [rev3 NONE_AMS]
[46505.460433] disable vbus discharge ret:0
[46505.461226] Setting usb_comm capable false
[46505.467244] Setting voltage/current limit 0 mV 0 mA
[46505.467262] polarity 0
[46505.470695] Requesting mux state 0, usb-role 0, orientation 0
[46505.475621] cc:=0
[46505.476012] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms [rev3 NONE_AMS]
[46505.476020] Received hard reset
[46505.476024] state change PORT_RESET -> HARD_RESET_START [rev3 HARD_RESET]
```
Cc: stable@vger.kernel.org
Fixes: f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)")
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Acked-by: Heikki Krogeus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20231101021909.2962679-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/typec/tcpm/tcpm.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -5350,6 +5350,15 @@ static void _tcpm_pd_hard_reset(struct t
if (port->bist_request == BDO_MODE_TESTDATA && port->tcpc->set_bist_data)
port->tcpc->set_bist_data(port->tcpc, false);
+ switch (port->state) {
+ case ERROR_RECOVERY:
+ case PORT_RESET:
+ case PORT_RESET_WAIT_OFF:
+ return;
+ default:
+ break;
+ }
+
if (port->ams != NONE_AMS)
port->ams = NONE_AMS;
if (port->hard_reset_count < PD_N_HARD_RESET_COUNT)
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 64/69] USB: dwc2: write HCINT with INTMASK applied
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (62 preceding siblings ...)
2023-11-30 16:23 ` [PATCH 5.15 63/69] usb: typec: tcpm: Skip hard reset when in error recovery Greg Kroah-Hartman
@ 2023-11-30 16:23 ` Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 65/69] usb: dwc3: Fix default mode initialization Greg Kroah-Hartman
` (7 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:23 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Oliver Neukum, Ivan Ivanov,
Andrea della Porta, stable
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <oneukum@suse.com>
commit 0583bc776ca5b5a3f5752869fc31cf7322df2b35 upstream.
dwc2_hc_n_intr() writes back INTMASK as read but evaluates it
with intmask applied. In stress testing this causes spurious
interrupts like this:
[Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 7 - ChHltd set, but reason is unknown
[Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 0 - ChHltd set, but reason is unknown
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001
[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_update_urb_state_abn(): trimming xfer length
Applying INTMASK prevents this. The issue exists in all versions of the
driver.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Tested-by: Ivan Ivanov <ivan.ivanov@suse.com>
Tested-by: Andrea della Porta <andrea.porta@suse.com>
Link: https://lore.kernel.org/r/20231115144514.15248-1-oneukum@suse.com
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc2/hcd_intr.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
--- a/drivers/usb/dwc2/hcd_intr.c
+++ b/drivers/usb/dwc2/hcd_intr.c
@@ -2045,15 +2045,17 @@ static void dwc2_hc_n_intr(struct dwc2_h
{
struct dwc2_qtd *qtd;
struct dwc2_host_chan *chan;
- u32 hcint, hcintmsk;
+ u32 hcint, hcintraw, hcintmsk;
chan = hsotg->hc_ptr_array[chnum];
- hcint = dwc2_readl(hsotg, HCINT(chnum));
+ hcintraw = dwc2_readl(hsotg, HCINT(chnum));
hcintmsk = dwc2_readl(hsotg, HCINTMSK(chnum));
+ hcint = hcintraw & hcintmsk;
+ dwc2_writel(hsotg, hcint, HCINT(chnum));
+
if (!chan) {
dev_err(hsotg->dev, "## hc_ptr_array for channel is NULL ##\n");
- dwc2_writel(hsotg, hcint, HCINT(chnum));
return;
}
@@ -2062,11 +2064,9 @@ static void dwc2_hc_n_intr(struct dwc2_h
chnum);
dev_vdbg(hsotg->dev,
" hcint 0x%08x, hcintmsk 0x%08x, hcint&hcintmsk 0x%08x\n",
- hcint, hcintmsk, hcint & hcintmsk);
+ hcintraw, hcintmsk, hcint);
}
- dwc2_writel(hsotg, hcint, HCINT(chnum));
-
/*
* If we got an interrupt after someone called
* dwc2_hcd_endpoint_disable() we don't want to crash below
@@ -2076,8 +2076,7 @@ static void dwc2_hc_n_intr(struct dwc2_h
return;
}
- chan->hcint = hcint;
- hcint &= hcintmsk;
+ chan->hcint = hcintraw;
/*
* If the channel was halted due to a dequeue, the qtd list might
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 65/69] usb: dwc3: Fix default mode initialization
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (63 preceding siblings ...)
2023-11-30 16:23 ` [PATCH 5.15 64/69] USB: dwc2: write HCINT with INTMASK applied Greg Kroah-Hartman
@ 2023-11-30 16:23 ` Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 66/69] usb: dwc3: set the dma max_seg_size Greg Kroah-Hartman
` (6 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:23 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, stable, Alexander Stein,
Thinh Nguyen
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Stein <alexander.stein@ew.tq-group.com>
commit 10d510abd096d620b9fda2dd3e0047c5efc4ad2b upstream.
The default mode, configurable by DT, shall be set before usb role switch
driver is registered. Otherwise there is a race between default mode
and mode set by usb role switch driver.
Fixes: 98ed256a4dbad ("usb: dwc3: Add support for role-switch-default-mode binding")
Cc: stable <stable@kernel.org>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20231025095110.2405281-1-alexander.stein@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc3/drd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/dwc3/drd.c
+++ b/drivers/usb/dwc3/drd.c
@@ -545,6 +545,7 @@ static int dwc3_setup_role_switch(struct
dwc->role_switch_default_mode = USB_DR_MODE_PERIPHERAL;
mode = DWC3_GCTL_PRTCAP_DEVICE;
}
+ dwc3_set_mode(dwc, mode);
dwc3_role_switch.fwnode = dev_fwnode(dwc->dev);
dwc3_role_switch.set = dwc3_usb_role_switch_set;
@@ -554,7 +555,6 @@ static int dwc3_setup_role_switch(struct
if (IS_ERR(dwc->role_sw))
return PTR_ERR(dwc->role_sw);
- dwc3_set_mode(dwc, mode);
return 0;
}
#else
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 66/69] usb: dwc3: set the dma max_seg_size
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (64 preceding siblings ...)
2023-11-30 16:23 ` [PATCH 5.15 65/69] usb: dwc3: Fix default mode initialization Greg Kroah-Hartman
@ 2023-11-30 16:23 ` Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 67/69] USB: dwc3: qcom: fix software node leak on probe errors Greg Kroah-Hartman
` (5 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:23 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Zubin Mithra, Ricardo Ribalda,
Thinh Nguyen
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <ribalda@chromium.org>
commit 8bbae288a85abed6a1cf7d185d8b9dc2f5dcb12c upstream.
Allow devices to have dma operations beyond 4K, and avoid warnings such
as:
DMA-API: dwc3 a600000.usb: mapping sg segment longer than device claims to support [len=86016] [max=65536]
Cc: stable@vger.kernel.org
Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")
Reported-by: Zubin Mithra <zsm@chromium.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20231026-dwc3-v2-1-1d4fd5c3e067@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc3/core.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1701,6 +1701,8 @@ static int dwc3_probe(struct platform_de
pm_runtime_put(dev);
+ dma_set_max_seg_size(dev, UINT_MAX);
+
return 0;
err5:
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 67/69] USB: dwc3: qcom: fix software node leak on probe errors
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (65 preceding siblings ...)
2023-11-30 16:23 ` [PATCH 5.15 66/69] usb: dwc3: set the dma max_seg_size Greg Kroah-Hartman
@ 2023-11-30 16:23 ` Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 68/69] USB: dwc3: qcom: fix wakeup after probe deferral Greg Kroah-Hartman
` (4 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:23 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Heikki Krogerus, Johan Hovold,
Andrew Halaney
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan+linaro@kernel.org>
commit 9feefbf57d92e8ee293dad67585d351c7d0b6e37 upstream.
Make sure to remove the software node also on (ACPI) probe errors to
avoid leaking the underlying resources.
Note that the software node is only used for ACPI probe so the driver
unbind tear down is updated to match probe.
Fixes: 8dc6e6dd1bee ("usb: dwc3: qcom: Constify the software node")
Cc: stable@vger.kernel.org # 5.12
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20231117173650.21161-3-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc3/dwc3-qcom.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -883,10 +883,12 @@ static int dwc3_qcom_probe(struct platfo
interconnect_exit:
dwc3_qcom_interconnect_exit(qcom);
depopulate:
- if (np)
+ if (np) {
of_platform_depopulate(&pdev->dev);
- else
+ } else {
+ device_remove_software_node(&qcom->dwc3->dev);
platform_device_del(qcom->dwc3);
+ }
platform_device_put(qcom->dwc3);
free_urs:
if (qcom->urs_usb)
@@ -909,11 +911,12 @@ static int dwc3_qcom_remove(struct platf
struct device *dev = &pdev->dev;
int i;
- device_remove_software_node(&qcom->dwc3->dev);
- if (np)
+ if (np) {
of_platform_depopulate(&pdev->dev);
- else
+ } else {
+ device_remove_software_node(&qcom->dwc3->dev);
platform_device_del(qcom->dwc3);
+ }
platform_device_put(qcom->dwc3);
if (qcom->urs_usb)
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 68/69] USB: dwc3: qcom: fix wakeup after probe deferral
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (66 preceding siblings ...)
2023-11-30 16:23 ` [PATCH 5.15 67/69] USB: dwc3: qcom: fix software node leak on probe errors Greg Kroah-Hartman
@ 2023-11-30 16:23 ` Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 69/69] io_uring: fix off-by one bvec index Greg Kroah-Hartman
` (3 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:23 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johan Hovold, Andrew Halaney
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan+linaro@kernel.org>
commit 41f5a0973259db9e4e3c9963d36505f80107d1a0 upstream.
The Qualcomm glue driver is overriding the interrupt trigger types
defined by firmware when requesting the wakeup interrupts during probe.
This can lead to a failure to map the DP/DM wakeup interrupts after a
probe deferral as the firmware defined trigger types do not match the
type used for the initial mapping:
irq: type mismatch, failed to map hwirq-14 for interrupt-controller@b220000!
irq: type mismatch, failed to map hwirq-15 for interrupt-controller@b220000!
Fix this by not overriding the firmware provided trigger types when
requesting the wakeup interrupts.
Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
Cc: stable@vger.kernel.org # 4.18
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20231120161607.7405-3-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc3/dwc3-qcom.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -492,7 +492,7 @@ static int dwc3_qcom_setup_irq(struct pl
irq_set_status_flags(irq, IRQ_NOAUTOEN);
ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
qcom_dwc3_resume_irq,
- IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
+ IRQF_ONESHOT,
"qcom_dwc3 HS", qcom);
if (ret) {
dev_err(qcom->dev, "hs_phy_irq failed: %d\n", ret);
@@ -507,7 +507,7 @@ static int dwc3_qcom_setup_irq(struct pl
irq_set_status_flags(irq, IRQ_NOAUTOEN);
ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
qcom_dwc3_resume_irq,
- IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
+ IRQF_ONESHOT,
"qcom_dwc3 DP_HS", qcom);
if (ret) {
dev_err(qcom->dev, "dp_hs_phy_irq failed: %d\n", ret);
@@ -522,7 +522,7 @@ static int dwc3_qcom_setup_irq(struct pl
irq_set_status_flags(irq, IRQ_NOAUTOEN);
ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
qcom_dwc3_resume_irq,
- IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
+ IRQF_ONESHOT,
"qcom_dwc3 DM_HS", qcom);
if (ret) {
dev_err(qcom->dev, "dm_hs_phy_irq failed: %d\n", ret);
@@ -537,7 +537,7 @@ static int dwc3_qcom_setup_irq(struct pl
irq_set_status_flags(irq, IRQ_NOAUTOEN);
ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
qcom_dwc3_resume_irq,
- IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
+ IRQF_ONESHOT,
"qcom_dwc3 SS", qcom);
if (ret) {
dev_err(qcom->dev, "ss_phy_irq failed: %d\n", ret);
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH 5.15 69/69] io_uring: fix off-by one bvec index
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (67 preceding siblings ...)
2023-11-30 16:23 ` [PATCH 5.15 68/69] USB: dwc3: qcom: fix wakeup after probe deferral Greg Kroah-Hartman
@ 2023-11-30 16:23 ` Greg Kroah-Hartman
2023-11-30 17:21 ` [PATCH 5.15 00/69] 5.15.141-rc1 review Daniel Díaz
` (2 subsequent siblings)
71 siblings, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-11-30 16:23 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Keith Busch, Jens Axboe
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keith Busch <kbusch@kernel.org>
commit d6fef34ee4d102be448146f24caf96d7b4a05401 upstream.
If the offset equals the bv_len of the first registered bvec, then the
request does not include any of that first bvec. Skip it so that drivers
don't have to deal with a zero length bvec, which was observed to break
NVMe's PRP list creation.
Cc: stable@vger.kernel.org
Fixes: bd11b3a391e3 ("io_uring: don't use iov_iter_advance() for fixed buffers")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20231120221831.2646460-1-kbusch@meta.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -3152,7 +3152,7 @@ static int __io_import_fixed(struct io_k
*/
const struct bio_vec *bvec = imu->bvec;
- if (offset <= bvec->bv_len) {
+ if (offset < bvec->bv_len) {
iov_iter_advance(iter, offset);
} else {
unsigned long seg_skip;
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (68 preceding siblings ...)
2023-11-30 16:23 ` [PATCH 5.15 69/69] io_uring: fix off-by one bvec index Greg Kroah-Hartman
@ 2023-11-30 17:21 ` Daniel Díaz
2023-11-30 17:44 ` Guenter Roeck
2023-11-30 22:27 ` Pavel Machek
2023-11-30 18:57 ` Florian Fainelli
2023-12-01 0:08 ` Shuah Khan
71 siblings, 2 replies; 84+ messages in thread
From: Daniel Díaz @ 2023-11-30 17:21 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, allen.lkml
Hello!
Lots of failures everywhere:
* clang-17-lkftconfig arm64
* clang-17-lkftconfig arm64
* clang-17-lkftconfig arm64
* clang-lkftconfig arm64
* clang-lkftconfig arm
* clang-lkftconfig i386
* clang-lkftconfig x86_64
* gcc-12-lkftconfig arm64
* gcc-12-lkftconfig arm
* gcc-12-lkftconfig i386
* gcc-12-lkftconfig x86_64
* gcc-12-lkftconfig-64k_page_size arm64
* gcc-12-lkftconfig-64k_page_size arm64
* gcc-12-lkftconfig-armv8_features arm64
* gcc-12-lkftconfig-debug arm64
* gcc-12-lkftconfig-debug arm64
* gcc-12-lkftconfig-debug arm
* gcc-12-lkftconfig-debug i386
* gcc-12-lkftconfig-debug x86_64
* gcc-12-lkftconfig-debug-kmemleak arm64
* gcc-12-lkftconfig-debug-kmemleak arm
* gcc-12-lkftconfig-debug-kmemleak i386
* gcc-12-lkftconfig-debug-kmemleak x86_64
* gcc-12-lkftconfig-devicetree arm64
* gcc-12-lkftconfig-kasan arm64
* gcc-12-lkftconfig-kasan arm64
* gcc-12-lkftconfig-kasan x86_64
* gcc-12-lkftconfig-kselftest arm64
* gcc-12-lkftconfig-kselftest-kernel arm64
* gcc-12-lkftconfig-kselftest-kernel arm
* gcc-12-lkftconfig-kselftest-kernel i386
* gcc-12-lkftconfig-kunit arm64
* gcc-12-lkftconfig-kunit arm64
* gcc-12-lkftconfig-kunit arm
* gcc-12-lkftconfig-kunit i386
* gcc-12-lkftconfig-kunit x86_64
* gcc-12-lkftconfig-libgpiod arm64
* gcc-12-lkftconfig-libgpiod arm
* gcc-12-lkftconfig-libgpiod i386
* gcc-12-lkftconfig-libgpiod x86_64
* gcc-12-lkftconfig-perf arm64
* gcc-12-lkftconfig-perf-kernel arm64
* gcc-12-lkftconfig-perf-kernel arm
* gcc-12-lkftconfig-perf-kernel i386
* gcc-12-lkftconfig-perf-kernel x86_64
* gcc-12-lkftconfig-rcutorture arm64
* gcc-12-lkftconfig-rcutorture arm64
* gcc-12-lkftconfig-rcutorture arm
* gcc-12-lkftconfig-rcutorture i386
* gcc-12-lkftconfig-rcutorture x86_64
It's essentially this:
-----8<-----
make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86
CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc'
'HOSTCC=sccache gcc'
arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x51:
unreachable instruction
x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
`__trace_kprobe_create':
trace_kprobe.c:(.text+0x2f39): undefined reference to
`kallsyms_on_each_symbol'
x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
`create_local_trace_kprobe':
trace_kprobe.c:(.text+0x384b): undefined reference to
`kallsyms_on_each_symbol'
make[1]: *** [/builds/linux/Makefile:1227: vmlinux] Error 1
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:226: __sub-make] Error 2
make: Target '__all' not remade because of errors.
----->8-----
It only affects 5.15. Bisection in progress.
Greetings!
Daniel Díaz
daniel.diaz@linaro.org
On Thu, 30 Nov 2023 at 10:32, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 5.15.141 release.
> There are 69 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, 02 Dec 2023 16:21:18 +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.141-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-5.15.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
> -------------
> Pseudo-Shortlog of commits:
>
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Linux 5.15.141-rc1
>
> Keith Busch <kbusch@kernel.org>
> io_uring: fix off-by one bvec index
>
> Johan Hovold <johan+linaro@kernel.org>
> USB: dwc3: qcom: fix wakeup after probe deferral
>
> Johan Hovold <johan+linaro@kernel.org>
> USB: dwc3: qcom: fix software node leak on probe errors
>
> Ricardo Ribalda <ribalda@chromium.org>
> usb: dwc3: set the dma max_seg_size
>
> Alexander Stein <alexander.stein@ew.tq-group.com>
> usb: dwc3: Fix default mode initialization
>
> Oliver Neukum <oneukum@suse.com>
> USB: dwc2: write HCINT with INTMASK applied
>
> Badhri Jagan Sridharan <badhri@google.com>
> usb: typec: tcpm: Skip hard reset when in error recovery
>
> Lech Perczak <lech.perczak@gmail.com>
> USB: serial: option: don't claim interface 4 for ZTE MF290
>
> Puliang Lu <puliang.lu@fibocom.com>
> USB: serial: option: fix FM101R-GL defines
>
> Victor Fragoso <victorffs@hotmail.com>
> USB: serial: option: add Fibocom L7xx modules
>
> Pawel Laszczak <pawell@cadence.com>
> usb: cdnsp: Fix deadlock issue during using NCM gadget
>
> Mingzhe Zou <mingzhe.zou@easystack.cn>
> bcache: fixup lock c->root error
>
> Mingzhe Zou <mingzhe.zou@easystack.cn>
> bcache: fixup init dirty data errors
>
> Rand Deeb <rand.sec96@gmail.com>
> bcache: prevent potential division by zero error
>
> Coly Li <colyli@suse.de>
> bcache: check return value from btree_node_alloc_replacement()
>
> Mikulas Patocka <mpatocka@redhat.com>
> dm-delay: fix a race between delay_presuspend and delay_bio
>
> Long Li <longli@microsoft.com>
> hv_netvsc: Mark VF as slave before exposing it to user-mode
>
> Haiyang Zhang <haiyangz@microsoft.com>
> hv_netvsc: Fix race of register_netdevice_notifier and VF register
>
> Asuna Yang <spriteovo@gmail.com>
> USB: serial: option: add Luat Air72*U series products
>
> Jan Höppner <hoeppner@linux.ibm.com>
> s390/dasd: protect device queue against concurrent access
>
> Charles Mirabile <cmirabil@redhat.com>
> io_uring/fs: consider link->flags when getting path for LINKAT
>
> Mingzhe Zou <mingzhe.zou@easystack.cn>
> bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race
>
> Song Liu <song@kernel.org>
> md: fix bi_status reporting in md_end_clone_io
>
> Coly Li <colyli@suse.de>
> bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
>
> Keith Busch <kbusch@kernel.org>
> swiotlb-xen: provide the "max_mapping_size" method
>
> Hans de Goede <hdegoede@redhat.com>
> ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA
>
> Krister Johansen <kjlx@templeofstupid.com>
> proc: sysctl: prevent aliased sysctls from getting passed to init
>
> Francis Laniel <flaniel@linux.microsoft.com>
> tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
>
> Zhang Yi <yi.zhang@huawei.com>
> ext4: make sure allocate pending entry not fail
>
> Baokun Li <libaokun1@huawei.com>
> ext4: fix slab-use-after-free in ext4_es_insert_extent()
>
> Baokun Li <libaokun1@huawei.com>
> ext4: using nofail preallocation in ext4_es_insert_extent()
>
> Baokun Li <libaokun1@huawei.com>
> ext4: using nofail preallocation in ext4_es_insert_delayed_block()
>
> Baokun Li <libaokun1@huawei.com>
> ext4: using nofail preallocation in ext4_es_remove_extent()
>
> Baokun Li <libaokun1@huawei.com>
> ext4: use pre-allocated es in __es_remove_extent()
>
> Baokun Li <libaokun1@huawei.com>
> ext4: use pre-allocated es in __es_insert_extent()
>
> Baokun Li <libaokun1@huawei.com>
> ext4: factor out __es_alloc_extent() and __es_free_extent()
>
> Baokun Li <libaokun1@huawei.com>
> ext4: add a new helper to check if es must be kept
>
> Andrey Konovalov <andrey.konovalov@linaro.org>
> media: qcom: camss: Fix csid-gen2 for test pattern generator
>
> Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> media: qcom: camss: Fix set CSI2_RX_CFG1_VC_MODE when VC is greater than 3
>
> Milen Mitkov <quic_mmitkov@quicinc.com>
> media: camss: sm8250: Virtual channels for CSID
>
> Souptick Joarder (HPE) <jrdr.linux@gmail.com>
> media: camss: Replace hard coded value with parameter
>
> Huacai Chen <chenhuacai@kernel.org>
> MIPS: KVM: Fix a build warning about variable set but not used
>
> Peter Zijlstra <peterz@infradead.org>
> lockdep: Fix block chain corruption
>
> Johan Hovold <johan+linaro@kernel.org>
> USB: dwc3: qcom: fix ACPI platform device leak
>
> Johan Hovold <johan+linaro@kernel.org>
> USB: dwc3: qcom: fix resource leaks on probe deferral
>
> Christoph Hellwig <hch@lst.de>
> nvmet: nul-terminate the NQNs passed in the connect command
>
> David Howells <dhowells@redhat.com>
> afs: Fix file locking on R/O volumes to operate in local mode
>
> David Howells <dhowells@redhat.com>
> afs: Return ENOENT if no cell DNS record can be found
>
> Samuel Holland <samuel.holland@sifive.com>
> net: axienet: Fix check for partial TX checksum
>
> Raju Rangoju <Raju.Rangoju@amd.com>
> amd-xgbe: propagate the correct speed and duplex status
>
> Raju Rangoju <Raju.Rangoju@amd.com>
> amd-xgbe: handle the corner-case during tx completion
>
> Raju Rangoju <Raju.Rangoju@amd.com>
> amd-xgbe: handle corner-case during sfp hotplug
>
> Suman Ghosh <sumang@marvell.com>
> octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF
>
> Stefano Stabellini <sstabellini@kernel.org>
> arm/xen: fix xen_vcpu_info allocation alignment
>
> D. Wythe <alibuda@linux.alibaba.com>
> net/smc: avoid data corruption caused by decline
>
> Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
> net: usb: ax88179_178a: fix failed operations during ax88179_reset
>
> Kunwu Chan <chentao@kylinos.cn>
> ipv4: Correct/silence an endian warning in __ip_do_redirect
>
> Charles Yi <be286@163.com>
> HID: fix HID device resource race between HID core and debugging support
>
> Benjamin Tissoires <benjamin.tissoires@redhat.com>
> HID: core: store the unique system identifier in hid_device
>
> Jonas Karlman <jonas@kwiboo.se>
> drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
>
> Chen Ni <nichen@iscas.ac.cn>
> ata: pata_isapnp: Add missing error check for devm_ioport_map()
>
> Suman Ghosh <sumang@marvell.com>
> octeontx2-pf: Fix memory leak during interface down
>
> Eric Dumazet <edumazet@google.com>
> wireguard: use DEV_STATS_INC()
>
> Marek Vasut <marex@denx.de>
> drm/panel: simple: Fix Innolux G101ICE-L01 timings
>
> Marek Vasut <marex@denx.de>
> drm/panel: simple: Fix Innolux G101ICE-L01 bus flags
>
> Xuxin Xiong <xuxinxiong@huaqin.corp-partner.google.com>
> drm/panel: auo,b101uan08.3: Fine tune the panel power sequence
>
> Shuijing Li <shuijing.li@mediatek.com>
> drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence
>
> David Howells <dhowells@redhat.com>
> afs: Make error on cell lookup failure consistent with OpenAFS
>
> David Howells <dhowells@redhat.com>
> afs: Fix afs_server_list to be cleaned up with RCU
>
>
> -------------
>
> Diffstat:
>
> Makefile | 4 +-
> arch/arm/xen/enlighten.c | 3 +-
> arch/mips/kvm/mmu.c | 3 +-
> drivers/acpi/resource.c | 7 +
> drivers/ata/pata_isapnp.c | 3 +
> drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 7 +
> drivers/gpu/drm/panel/panel-simple.c | 13 +-
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 +-
> drivers/hid/hid-core.c | 16 +-
> drivers/hid/hid-debug.c | 3 +
> drivers/md/bcache/btree.c | 4 +-
> drivers/md/bcache/sysfs.c | 2 +-
> drivers/md/bcache/writeback.c | 22 +-
> drivers/md/dm-delay.c | 17 +-
> drivers/md/md.c | 3 +-
> drivers/media/platform/qcom/camss/camss-csid-170.c | 65 +++--
> drivers/media/platform/qcom/camss/camss-csid.c | 44 ++-
> drivers/media/platform/qcom/camss/camss-csid.h | 11 +-
> drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 14 +
> drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 +-
> drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 14 +-
> .../ethernet/marvell/octeontx2/nic/otx2_flows.c | 20 +-
> .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
> drivers/net/hyperv/netvsc_drv.c | 41 ++-
> drivers/net/usb/ax88179_178a.c | 4 +-
> drivers/net/wireguard/device.c | 4 +-
> drivers/net/wireguard/receive.c | 12 +-
> drivers/net/wireguard/send.c | 3 +-
> drivers/nvme/target/fabrics-cmd.c | 4 +
> drivers/s390/block/dasd.c | 24 +-
> drivers/usb/cdns3/cdnsp-ring.c | 3 +
> drivers/usb/dwc2/hcd_intr.c | 15 +-
> drivers/usb/dwc3/core.c | 2 +
> drivers/usb/dwc3/drd.c | 2 +-
> drivers/usb/dwc3/dwc3-qcom.c | 65 +++--
> drivers/usb/serial/option.c | 11 +-
> drivers/usb/typec/tcpm/tcpm.c | 9 +
> drivers/xen/swiotlb-xen.c | 1 +
> fs/afs/dynroot.c | 4 +-
> fs/afs/internal.h | 1 +
> fs/afs/server_list.c | 2 +-
> fs/afs/super.c | 2 +
> fs/afs/vl_rotate.c | 10 +
> fs/ext4/extents_status.c | 306 +++++++++++++++------
> fs/proc/proc_sysctl.c | 7 +
> include/linux/hid.h | 5 +
> include/linux/sysctl.h | 6 +
> init/main.c | 4 +
> io_uring/io_uring.c | 4 +-
> kernel/locking/lockdep.c | 3 +-
> kernel/trace/trace_kprobe.c | 74 +++++
> kernel/trace/trace_probe.h | 1 +
> net/ipv4/route.c | 2 +-
> net/smc/af_smc.c | 8 +-
> 55 files changed, 704 insertions(+), 239 deletions(-)
>
>
>
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-11-30 17:21 ` [PATCH 5.15 00/69] 5.15.141-rc1 review Daniel Díaz
@ 2023-11-30 17:44 ` Guenter Roeck
2023-11-30 18:11 ` Daniel Díaz
2023-12-01 6:31 ` Harshit Mogalapalli
2023-11-30 22:27 ` Pavel Machek
1 sibling, 2 replies; 84+ messages in thread
From: Guenter Roeck @ 2023-11-30 17:44 UTC (permalink / raw)
To: Daniel Díaz, Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, allen.lkml
On 11/30/23 09:21, Daniel Díaz wrote:
> Hello!
>
> Lots of failures everywhere:
> * clang-17-lkftconfig arm64
> * clang-17-lkftconfig arm64
> * clang-17-lkftconfig arm64
> * clang-lkftconfig arm64
> * clang-lkftconfig arm
> * clang-lkftconfig i386
> * clang-lkftconfig x86_64
> * gcc-12-lkftconfig arm64
> * gcc-12-lkftconfig arm
> * gcc-12-lkftconfig i386
> * gcc-12-lkftconfig x86_64
> * gcc-12-lkftconfig-64k_page_size arm64
> * gcc-12-lkftconfig-64k_page_size arm64
> * gcc-12-lkftconfig-armv8_features arm64
> * gcc-12-lkftconfig-debug arm64
> * gcc-12-lkftconfig-debug arm64
> * gcc-12-lkftconfig-debug arm
> * gcc-12-lkftconfig-debug i386
> * gcc-12-lkftconfig-debug x86_64
> * gcc-12-lkftconfig-debug-kmemleak arm64
> * gcc-12-lkftconfig-debug-kmemleak arm
> * gcc-12-lkftconfig-debug-kmemleak i386
> * gcc-12-lkftconfig-debug-kmemleak x86_64
> * gcc-12-lkftconfig-devicetree arm64
> * gcc-12-lkftconfig-kasan arm64
> * gcc-12-lkftconfig-kasan arm64
> * gcc-12-lkftconfig-kasan x86_64
> * gcc-12-lkftconfig-kselftest arm64
> * gcc-12-lkftconfig-kselftest-kernel arm64
> * gcc-12-lkftconfig-kselftest-kernel arm
> * gcc-12-lkftconfig-kselftest-kernel i386
> * gcc-12-lkftconfig-kunit arm64
> * gcc-12-lkftconfig-kunit arm64
> * gcc-12-lkftconfig-kunit arm
> * gcc-12-lkftconfig-kunit i386
> * gcc-12-lkftconfig-kunit x86_64
> * gcc-12-lkftconfig-libgpiod arm64
> * gcc-12-lkftconfig-libgpiod arm
> * gcc-12-lkftconfig-libgpiod i386
> * gcc-12-lkftconfig-libgpiod x86_64
> * gcc-12-lkftconfig-perf arm64
> * gcc-12-lkftconfig-perf-kernel arm64
> * gcc-12-lkftconfig-perf-kernel arm
> * gcc-12-lkftconfig-perf-kernel i386
> * gcc-12-lkftconfig-perf-kernel x86_64
> * gcc-12-lkftconfig-rcutorture arm64
> * gcc-12-lkftconfig-rcutorture arm64
> * gcc-12-lkftconfig-rcutorture arm
> * gcc-12-lkftconfig-rcutorture i386
> * gcc-12-lkftconfig-rcutorture x86_64
>
> It's essentially this:
>
> -----8<-----
> make --silent --keep-going --jobs=8
> O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86
> CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc'
> 'HOSTCC=sccache gcc'
> arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x51:
> unreachable instruction
> x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> `__trace_kprobe_create':
> trace_kprobe.c:(.text+0x2f39): undefined reference to
> `kallsyms_on_each_symbol'
> x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> `create_local_trace_kprobe':
> trace_kprobe.c:(.text+0x384b): undefined reference to
> `kallsyms_on_each_symbol'
> make[1]: *** [/builds/linux/Makefile:1227: vmlinux] Error 1
> make[1]: Target '__all' not remade because of errors.
> make: *** [Makefile:226: __sub-make] Error 2
> make: Target '__all' not remade because of errors.
> ----->8-----
>
> It only affects 5.15. Bisection in progress.
>
I guess it will point to
>> Francis Laniel <flaniel@linux.microsoft.com>
>> tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
>>
Guenter
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-11-30 17:44 ` Guenter Roeck
@ 2023-11-30 18:11 ` Daniel Díaz
2023-11-30 18:56 ` Guenter Roeck
2023-12-01 8:21 ` Greg Kroah-Hartman
2023-12-01 6:31 ` Harshit Mogalapalli
1 sibling, 2 replies; 84+ messages in thread
From: Daniel Díaz @ 2023-11-30 18:11 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, allen.lkml, Guenter Roeck, flaniel
Hello!
On Thu, 30 Nov 2023 at 11:44, Guenter Roeck <linux@roeck-us.net> wrote:
> On 11/30/23 09:21, Daniel Díaz wrote:
> > Hello!
> >
> > Lots of failures everywhere:
> > * clang-17-lkftconfig arm64
> > * clang-17-lkftconfig arm64
> > * clang-17-lkftconfig arm64
> > * clang-lkftconfig arm64
> > * clang-lkftconfig arm
> > * clang-lkftconfig i386
> > * clang-lkftconfig x86_64
> > * gcc-12-lkftconfig arm64
> > * gcc-12-lkftconfig arm
> > * gcc-12-lkftconfig i386
> > * gcc-12-lkftconfig x86_64
> > * gcc-12-lkftconfig-64k_page_size arm64
> > * gcc-12-lkftconfig-64k_page_size arm64
> > * gcc-12-lkftconfig-armv8_features arm64
> > * gcc-12-lkftconfig-debug arm64
> > * gcc-12-lkftconfig-debug arm64
> > * gcc-12-lkftconfig-debug arm
> > * gcc-12-lkftconfig-debug i386
> > * gcc-12-lkftconfig-debug x86_64
> > * gcc-12-lkftconfig-debug-kmemleak arm64
> > * gcc-12-lkftconfig-debug-kmemleak arm
> > * gcc-12-lkftconfig-debug-kmemleak i386
> > * gcc-12-lkftconfig-debug-kmemleak x86_64
> > * gcc-12-lkftconfig-devicetree arm64
> > * gcc-12-lkftconfig-kasan arm64
> > * gcc-12-lkftconfig-kasan arm64
> > * gcc-12-lkftconfig-kasan x86_64
> > * gcc-12-lkftconfig-kselftest arm64
> > * gcc-12-lkftconfig-kselftest-kernel arm64
> > * gcc-12-lkftconfig-kselftest-kernel arm
> > * gcc-12-lkftconfig-kselftest-kernel i386
> > * gcc-12-lkftconfig-kunit arm64
> > * gcc-12-lkftconfig-kunit arm64
> > * gcc-12-lkftconfig-kunit arm
> > * gcc-12-lkftconfig-kunit i386
> > * gcc-12-lkftconfig-kunit x86_64
> > * gcc-12-lkftconfig-libgpiod arm64
> > * gcc-12-lkftconfig-libgpiod arm
> > * gcc-12-lkftconfig-libgpiod i386
> > * gcc-12-lkftconfig-libgpiod x86_64
> > * gcc-12-lkftconfig-perf arm64
> > * gcc-12-lkftconfig-perf-kernel arm64
> > * gcc-12-lkftconfig-perf-kernel arm
> > * gcc-12-lkftconfig-perf-kernel i386
> > * gcc-12-lkftconfig-perf-kernel x86_64
> > * gcc-12-lkftconfig-rcutorture arm64
> > * gcc-12-lkftconfig-rcutorture arm64
> > * gcc-12-lkftconfig-rcutorture arm
> > * gcc-12-lkftconfig-rcutorture i386
> > * gcc-12-lkftconfig-rcutorture x86_64
> >
> > It's essentially this:
> >
> > -----8<-----
> > make --silent --keep-going --jobs=8
> > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86
> > CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc'
> > 'HOSTCC=sccache gcc'
> > arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x51:
> > unreachable instruction
> > x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> > `__trace_kprobe_create':
> > trace_kprobe.c:(.text+0x2f39): undefined reference to
> > `kallsyms_on_each_symbol'
> > x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> > `create_local_trace_kprobe':
> > trace_kprobe.c:(.text+0x384b): undefined reference to
> > `kallsyms_on_each_symbol'
> > make[1]: *** [/builds/linux/Makefile:1227: vmlinux] Error 1
> > make[1]: Target '__all' not remade because of errors.
> > make: *** [Makefile:226: __sub-make] Error 2
> > make: Target '__all' not remade because of errors.
> > ----->8-----
> >
> > It only affects 5.15. Bisection in progress.
>
> I guess it will point to
>
> >> Francis Laniel <flaniel@linux.microsoft.com>
> >> tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
It sure did!:
commit 7b4375c36a4c0e1b4b97ccbcdd427db5a460e04f
Author: Francis Laniel <flaniel@linux.microsoft.com>
Date: Fri Oct 20 13:42:49 2023 +0300
tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
commit b022f0c7e404887a7c5229788fc99eff9f9a80d5 upstream.
Reverting that commit made the build pass again.
Greetings!
Daniel Díaz
daniel.diaz@linaro.org
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-11-30 18:11 ` Daniel Díaz
@ 2023-11-30 18:56 ` Guenter Roeck
2023-12-01 8:21 ` Greg Kroah-Hartman
1 sibling, 0 replies; 84+ messages in thread
From: Guenter Roeck @ 2023-11-30 18:56 UTC (permalink / raw)
To: Daniel Díaz, Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, allen.lkml, flaniel
On 11/30/23 10:11, Daniel Díaz wrote:
> Hello!
>
> On Thu, 30 Nov 2023 at 11:44, Guenter Roeck <linux@roeck-us.net> wrote:
>> On 11/30/23 09:21, Daniel Díaz wrote:
>>> Hello!
>>>
>>> Lots of failures everywhere:
>>> * clang-17-lkftconfig arm64
>>> * clang-17-lkftconfig arm64
>>> * clang-17-lkftconfig arm64
>>> * clang-lkftconfig arm64
>>> * clang-lkftconfig arm
>>> * clang-lkftconfig i386
>>> * clang-lkftconfig x86_64
>>> * gcc-12-lkftconfig arm64
>>> * gcc-12-lkftconfig arm
>>> * gcc-12-lkftconfig i386
>>> * gcc-12-lkftconfig x86_64
>>> * gcc-12-lkftconfig-64k_page_size arm64
>>> * gcc-12-lkftconfig-64k_page_size arm64
>>> * gcc-12-lkftconfig-armv8_features arm64
>>> * gcc-12-lkftconfig-debug arm64
>>> * gcc-12-lkftconfig-debug arm64
>>> * gcc-12-lkftconfig-debug arm
>>> * gcc-12-lkftconfig-debug i386
>>> * gcc-12-lkftconfig-debug x86_64
>>> * gcc-12-lkftconfig-debug-kmemleak arm64
>>> * gcc-12-lkftconfig-debug-kmemleak arm
>>> * gcc-12-lkftconfig-debug-kmemleak i386
>>> * gcc-12-lkftconfig-debug-kmemleak x86_64
>>> * gcc-12-lkftconfig-devicetree arm64
>>> * gcc-12-lkftconfig-kasan arm64
>>> * gcc-12-lkftconfig-kasan arm64
>>> * gcc-12-lkftconfig-kasan x86_64
>>> * gcc-12-lkftconfig-kselftest arm64
>>> * gcc-12-lkftconfig-kselftest-kernel arm64
>>> * gcc-12-lkftconfig-kselftest-kernel arm
>>> * gcc-12-lkftconfig-kselftest-kernel i386
>>> * gcc-12-lkftconfig-kunit arm64
>>> * gcc-12-lkftconfig-kunit arm64
>>> * gcc-12-lkftconfig-kunit arm
>>> * gcc-12-lkftconfig-kunit i386
>>> * gcc-12-lkftconfig-kunit x86_64
>>> * gcc-12-lkftconfig-libgpiod arm64
>>> * gcc-12-lkftconfig-libgpiod arm
>>> * gcc-12-lkftconfig-libgpiod i386
>>> * gcc-12-lkftconfig-libgpiod x86_64
>>> * gcc-12-lkftconfig-perf arm64
>>> * gcc-12-lkftconfig-perf-kernel arm64
>>> * gcc-12-lkftconfig-perf-kernel arm
>>> * gcc-12-lkftconfig-perf-kernel i386
>>> * gcc-12-lkftconfig-perf-kernel x86_64
>>> * gcc-12-lkftconfig-rcutorture arm64
>>> * gcc-12-lkftconfig-rcutorture arm64
>>> * gcc-12-lkftconfig-rcutorture arm
>>> * gcc-12-lkftconfig-rcutorture i386
>>> * gcc-12-lkftconfig-rcutorture x86_64
>>>
>>> It's essentially this:
>>>
>>> -----8<-----
>>> make --silent --keep-going --jobs=8
>>> O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86
>>> CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc'
>>> 'HOSTCC=sccache gcc'
>>> arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x51:
>>> unreachable instruction
>>> x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
>>> `__trace_kprobe_create':
>>> trace_kprobe.c:(.text+0x2f39): undefined reference to
>>> `kallsyms_on_each_symbol'
>>> x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
>>> `create_local_trace_kprobe':
>>> trace_kprobe.c:(.text+0x384b): undefined reference to
>>> `kallsyms_on_each_symbol'
>>> make[1]: *** [/builds/linux/Makefile:1227: vmlinux] Error 1
>>> make[1]: Target '__all' not remade because of errors.
>>> make: *** [Makefile:226: __sub-make] Error 2
>>> make: Target '__all' not remade because of errors.
>>> ----->8-----
>>>
>>> It only affects 5.15. Bisection in progress.
>>
>> I guess it will point to
>>
>>>> Francis Laniel <flaniel@linux.microsoft.com>
>>>> tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
>
> It sure did!:
>
> commit 7b4375c36a4c0e1b4b97ccbcdd427db5a460e04f
> Author: Francis Laniel <flaniel@linux.microsoft.com>
> Date: Fri Oct 20 13:42:49 2023 +0300
>
> tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
>
> commit b022f0c7e404887a7c5229788fc99eff9f9a80d5 upstream.
>
> Reverting that commit made the build pass again.
>
It looks like it depends on commit d721def7392a ("kallsyms: Make kallsyms_on_each_symbol
generally available"), but that doesn't apply cleanly.
Guenter
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (69 preceding siblings ...)
2023-11-30 17:21 ` [PATCH 5.15 00/69] 5.15.141-rc1 review Daniel Díaz
@ 2023-11-30 18:57 ` Florian Fainelli
2023-12-01 0:08 ` Shuah Khan
71 siblings, 0 replies; 84+ messages in thread
From: Florian Fainelli @ 2023-11-30 18:57 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, sudipm.mukherjee, srw, rwarsow,
conor, allen.lkml
On 11/30/23 08:21, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.15.141 release.
> There are 69 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, 02 Dec 2023 16:21:18 +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.141-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-5.15.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:
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-11-30 17:21 ` [PATCH 5.15 00/69] 5.15.141-rc1 review Daniel Díaz
2023-11-30 17:44 ` Guenter Roeck
@ 2023-11-30 22:27 ` Pavel Machek
1 sibling, 0 replies; 84+ messages in thread
From: Pavel Machek @ 2023-11-30 22:27 UTC (permalink / raw)
To: Daniel Díaz
Cc: Greg Kroah-Hartman, stable, patches, linux-kernel, torvalds, akpm,
linux, shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, allen.lkml
[-- Attachment #1: Type: text/plain, Size: 509 bytes --]
Hi!
> Lots of failures everywhere:
> * clang-17-lkftconfig arm64
> * clang-17-lkftconfig arm64
> * clang-17-lkftconfig arm64
Yes, we see the same failures:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/1091365008
5.10 and 6.1 build ok.
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
` (70 preceding siblings ...)
2023-11-30 18:57 ` Florian Fainelli
@ 2023-12-01 0:08 ` Shuah Khan
71 siblings, 0 replies; 84+ messages in thread
From: Shuah Khan @ 2023-12-01 0:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, allen.lkml, Shuah Khan
On 11/30/23 09:21, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.15.141 release.
> There are 69 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, 02 Dec 2023 16:21:18 +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.141-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-5.15.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Compiled and booted on my test system. No dmesg regressions.
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-11-30 17:44 ` Guenter Roeck
2023-11-30 18:11 ` Daniel Díaz
@ 2023-12-01 6:31 ` Harshit Mogalapalli
1 sibling, 0 replies; 84+ messages in thread
From: Harshit Mogalapalli @ 2023-12-01 6:31 UTC (permalink / raw)
To: Guenter Roeck, Daniel Díaz, Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, allen.lkml, Vegard Nossum, Darren Kenny
Hi Greg,
Some notes below:
On 30/11/23 11:14 pm, Guenter Roeck wrote:
> On 11/30/23 09:21, Daniel Díaz wrote:
>> Hello!
>>
>> make --silent --keep-going --jobs=8
>> O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86
>> CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc'
>> 'HOSTCC=sccache gcc'
>> arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x51:
>> unreachable instruction
>> x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
>> `__trace_kprobe_create':
>> trace_kprobe.c:(.text+0x2f39): undefined reference to
>> `kallsyms_on_each_symbol'
>> x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
>> `create_local_trace_kprobe':
>> trace_kprobe.c:(.text+0x384b): undefined reference to
>> `kallsyms_on_each_symbol'
>> make[1]: *** [/builds/linux/Makefile:1227: vmlinux] Error 1
>> make[1]: Target '__all' not remade because of errors.
>> make: *** [Makefile:226: __sub-make] Error 2
>> make: Target '__all' not remade because of errors.
>> ----->8-----
>>
>> It only affects 5.15. Bisection in progress.
>>
I have seen this too in our testing.
>
> I guess it will point to
>
>>> Francis Laniel <flaniel@linux.microsoft.com>
>>> tracing/kprobes: Return EADDRNOTAVAIL when func matches several
>>> symbols
>>>
Note:
1. This above commit also have a fix upstream,
926fe783c8a6 ("tracing/kprobes: Fix symbol counting logic by looking at
modules as well")
2. I see the patch causing build failure is also queued in 5.10, 5.4 and
4.19, 4.14 [1]
Thanks,
Harshit
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.14/tracing-kprobes-return-eaddrnotavail-when-func-matches-several-symbols.patch?id=1d4fa85848f798e9f2b141101cd0f9aa6af93395
>
> Guenter
>
>
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-11-30 18:11 ` Daniel Díaz
2023-11-30 18:56 ` Guenter Roeck
@ 2023-12-01 8:21 ` Greg Kroah-Hartman
2023-12-01 9:35 ` Francis Laniel
1 sibling, 1 reply; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-12-01 8:21 UTC (permalink / raw)
To: flaniel, Daniel Díaz
Cc: stable, patches, linux-kernel, torvalds, akpm, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, allen.lkml, Guenter Roeck, flaniel
On Thu, Nov 30, 2023 at 12:11:31PM -0600, Daniel Díaz wrote:
> Hello!
>
> On Thu, 30 Nov 2023 at 11:44, Guenter Roeck <linux@roeck-us.net> wrote:
> > On 11/30/23 09:21, Daniel Díaz wrote:
> > > Hello!
> > >
> > > Lots of failures everywhere:
> > > * clang-17-lkftconfig arm64
> > > * clang-17-lkftconfig arm64
> > > * clang-17-lkftconfig arm64
> > > * clang-lkftconfig arm64
> > > * clang-lkftconfig arm
> > > * clang-lkftconfig i386
> > > * clang-lkftconfig x86_64
> > > * gcc-12-lkftconfig arm64
> > > * gcc-12-lkftconfig arm
> > > * gcc-12-lkftconfig i386
> > > * gcc-12-lkftconfig x86_64
> > > * gcc-12-lkftconfig-64k_page_size arm64
> > > * gcc-12-lkftconfig-64k_page_size arm64
> > > * gcc-12-lkftconfig-armv8_features arm64
> > > * gcc-12-lkftconfig-debug arm64
> > > * gcc-12-lkftconfig-debug arm64
> > > * gcc-12-lkftconfig-debug arm
> > > * gcc-12-lkftconfig-debug i386
> > > * gcc-12-lkftconfig-debug x86_64
> > > * gcc-12-lkftconfig-debug-kmemleak arm64
> > > * gcc-12-lkftconfig-debug-kmemleak arm
> > > * gcc-12-lkftconfig-debug-kmemleak i386
> > > * gcc-12-lkftconfig-debug-kmemleak x86_64
> > > * gcc-12-lkftconfig-devicetree arm64
> > > * gcc-12-lkftconfig-kasan arm64
> > > * gcc-12-lkftconfig-kasan arm64
> > > * gcc-12-lkftconfig-kasan x86_64
> > > * gcc-12-lkftconfig-kselftest arm64
> > > * gcc-12-lkftconfig-kselftest-kernel arm64
> > > * gcc-12-lkftconfig-kselftest-kernel arm
> > > * gcc-12-lkftconfig-kselftest-kernel i386
> > > * gcc-12-lkftconfig-kunit arm64
> > > * gcc-12-lkftconfig-kunit arm64
> > > * gcc-12-lkftconfig-kunit arm
> > > * gcc-12-lkftconfig-kunit i386
> > > * gcc-12-lkftconfig-kunit x86_64
> > > * gcc-12-lkftconfig-libgpiod arm64
> > > * gcc-12-lkftconfig-libgpiod arm
> > > * gcc-12-lkftconfig-libgpiod i386
> > > * gcc-12-lkftconfig-libgpiod x86_64
> > > * gcc-12-lkftconfig-perf arm64
> > > * gcc-12-lkftconfig-perf-kernel arm64
> > > * gcc-12-lkftconfig-perf-kernel arm
> > > * gcc-12-lkftconfig-perf-kernel i386
> > > * gcc-12-lkftconfig-perf-kernel x86_64
> > > * gcc-12-lkftconfig-rcutorture arm64
> > > * gcc-12-lkftconfig-rcutorture arm64
> > > * gcc-12-lkftconfig-rcutorture arm
> > > * gcc-12-lkftconfig-rcutorture i386
> > > * gcc-12-lkftconfig-rcutorture x86_64
> > >
> > > It's essentially this:
> > >
> > > -----8<-----
> > > make --silent --keep-going --jobs=8
> > > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86
> > > CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc'
> > > 'HOSTCC=sccache gcc'
> > > arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x51:
> > > unreachable instruction
> > > x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> > > `__trace_kprobe_create':
> > > trace_kprobe.c:(.text+0x2f39): undefined reference to
> > > `kallsyms_on_each_symbol'
> > > x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> > > `create_local_trace_kprobe':
> > > trace_kprobe.c:(.text+0x384b): undefined reference to
> > > `kallsyms_on_each_symbol'
> > > make[1]: *** [/builds/linux/Makefile:1227: vmlinux] Error 1
> > > make[1]: Target '__all' not remade because of errors.
> > > make: *** [Makefile:226: __sub-make] Error 2
> > > make: Target '__all' not remade because of errors.
> > > ----->8-----
> > >
> > > It only affects 5.15. Bisection in progress.
> >
> > I guess it will point to
> >
> > >> Francis Laniel <flaniel@linux.microsoft.com>
> > >> tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
>
> It sure did!:
>
> commit 7b4375c36a4c0e1b4b97ccbcdd427db5a460e04f
> Author: Francis Laniel <flaniel@linux.microsoft.com>
> Date: Fri Oct 20 13:42:49 2023 +0300
>
> tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
>
> commit b022f0c7e404887a7c5229788fc99eff9f9a80d5 upstream.
>
> Reverting that commit made the build pass again.
{sigh}
Francis, I think this is the second or third time this has happened with
the attempt to get this patch merged. I'm going to go drop it from all
of the pending stable queues again, and please, if you wish to have it
applied in the future, I am going to have to see some proof it was
actually tested on the architectures that it keeps breaking.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-12-01 8:21 ` Greg Kroah-Hartman
@ 2023-12-01 9:35 ` Francis Laniel
2023-12-01 9:44 ` Greg Kroah-Hartman
0 siblings, 1 reply; 84+ messages in thread
From: Francis Laniel @ 2023-12-01 9:35 UTC (permalink / raw)
To: Daniel Díaz, Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, allen.lkml, Guenter Roeck
Hi!
Le vendredi 1 décembre 2023, 09:21:33 CET Greg Kroah-Hartman a écrit :
> On Thu, Nov 30, 2023 at 12:11:31PM -0600, Daniel Díaz wrote:
> > Hello!
> >
> > On Thu, 30 Nov 2023 at 11:44, Guenter Roeck <linux@roeck-us.net> wrote:
> > > On 11/30/23 09:21, Daniel Díaz wrote:
> > > > Hello!
> > > >
> > > > Lots of failures everywhere:
> > > > * clang-17-lkftconfig arm64
> > > > * clang-17-lkftconfig arm64
> > > > * clang-17-lkftconfig arm64
> > > > * clang-lkftconfig arm64
> > > > * clang-lkftconfig arm
> > > > * clang-lkftconfig i386
> > > > * clang-lkftconfig x86_64
> > > > * gcc-12-lkftconfig arm64
> > > > * gcc-12-lkftconfig arm
> > > > * gcc-12-lkftconfig i386
> > > > * gcc-12-lkftconfig x86_64
> > > > * gcc-12-lkftconfig-64k_page_size arm64
> > > > * gcc-12-lkftconfig-64k_page_size arm64
> > > > * gcc-12-lkftconfig-armv8_features arm64
> > > > * gcc-12-lkftconfig-debug arm64
> > > > * gcc-12-lkftconfig-debug arm64
> > > > * gcc-12-lkftconfig-debug arm
> > > > * gcc-12-lkftconfig-debug i386
> > > > * gcc-12-lkftconfig-debug x86_64
> > > > * gcc-12-lkftconfig-debug-kmemleak arm64
> > > > * gcc-12-lkftconfig-debug-kmemleak arm
> > > > * gcc-12-lkftconfig-debug-kmemleak i386
> > > > * gcc-12-lkftconfig-debug-kmemleak x86_64
> > > > * gcc-12-lkftconfig-devicetree arm64
> > > > * gcc-12-lkftconfig-kasan arm64
> > > > * gcc-12-lkftconfig-kasan arm64
> > > > * gcc-12-lkftconfig-kasan x86_64
> > > > * gcc-12-lkftconfig-kselftest arm64
> > > > * gcc-12-lkftconfig-kselftest-kernel arm64
> > > > * gcc-12-lkftconfig-kselftest-kernel arm
> > > > * gcc-12-lkftconfig-kselftest-kernel i386
> > > > * gcc-12-lkftconfig-kunit arm64
> > > > * gcc-12-lkftconfig-kunit arm64
> > > > * gcc-12-lkftconfig-kunit arm
> > > > * gcc-12-lkftconfig-kunit i386
> > > > * gcc-12-lkftconfig-kunit x86_64
> > > > * gcc-12-lkftconfig-libgpiod arm64
> > > > * gcc-12-lkftconfig-libgpiod arm
> > > > * gcc-12-lkftconfig-libgpiod i386
> > > > * gcc-12-lkftconfig-libgpiod x86_64
> > > > * gcc-12-lkftconfig-perf arm64
> > > > * gcc-12-lkftconfig-perf-kernel arm64
> > > > * gcc-12-lkftconfig-perf-kernel arm
> > > > * gcc-12-lkftconfig-perf-kernel i386
> > > > * gcc-12-lkftconfig-perf-kernel x86_64
> > > > * gcc-12-lkftconfig-rcutorture arm64
> > > > * gcc-12-lkftconfig-rcutorture arm64
> > > > * gcc-12-lkftconfig-rcutorture arm
> > > > * gcc-12-lkftconfig-rcutorture i386
> > > > * gcc-12-lkftconfig-rcutorture x86_64
> > > >
> > > > It's essentially this:
> > > >
> > > > -----8<-----
> > > >
> > > > make --silent --keep-going --jobs=8
> > > >
> > > > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86
> > > > CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc'
> > > > 'HOSTCC=sccache gcc'
> > > >
> > > > arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x51:
> > > > unreachable instruction
> > > >
> > > > x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> > > >
> > > > `__trace_kprobe_create':
> > > > trace_kprobe.c:(.text+0x2f39): undefined reference to
> > > >
> > > > `kallsyms_on_each_symbol'
> > > >
> > > > x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> > > >
> > > > `create_local_trace_kprobe':
> > > > trace_kprobe.c:(.text+0x384b): undefined reference to
> > > >
> > > > `kallsyms_on_each_symbol'
> > > >
> > > > make[1]: *** [/builds/linux/Makefile:1227: vmlinux] Error 1
> > > > make[1]: Target '__all' not remade because of errors.
> > > > make: *** [Makefile:226: __sub-make] Error 2
> > > > make: Target '__all' not remade because of errors.
> > > >
> > > > ----->8-----
> > > >
> > > > It only affects 5.15. Bisection in progress.
> > >
> > > I guess it will point to
> > >
> > > >> Francis Laniel <flaniel@linux.microsoft.com>
> > > >>
> > > >> tracing/kprobes: Return EADDRNOTAVAIL when func matches several
> > > >> symbols
> >
> > It sure did!:
> > commit 7b4375c36a4c0e1b4b97ccbcdd427db5a460e04f
> > Author: Francis Laniel <flaniel@linux.microsoft.com>
> > Date: Fri Oct 20 13:42:49 2023 +0300
> >
> > tracing/kprobes: Return EADDRNOTAVAIL when func matches several
> > symbols
> >
> > commit b022f0c7e404887a7c5229788fc99eff9f9a80d5 upstream.
> >
> > Reverting that commit made the build pass again.
>
> {sigh}
>
> Francis, I think this is the second or third time this has happened with
> the attempt to get this patch merged. I'm going to go drop it from all
> of the pending stable queues again, and please, if you wish to have it
> applied in the future, I am going to have to see some proof it was
> actually tested on the architectures that it keeps breaking.
Sorry for the disagreement, for this one, I had to add the CONFIG_LIVEPATCH to
then be able to call kallsyms_on_each_symbol(), as on 5.15, this function is
within a ifdef guard [1].
I suppose you do not want to add CONFIG_LIVEPATCH to default config, so I will
try to find a way for this specific kernel!
Did you get problems only for 5.15 kernel? Or others too?
In the second case, can you please link me the problems and I will polish
everything.
> thanks,
>
> greg k-h
Best regards.
---
[1]: https://elixir.bootlin.com/linux/v5.15.140/source/kernel/kallsyms.c#L207
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-12-01 9:35 ` Francis Laniel
@ 2023-12-01 9:44 ` Greg Kroah-Hartman
2023-12-01 14:34 ` Daniel Díaz
0 siblings, 1 reply; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-12-01 9:44 UTC (permalink / raw)
To: Francis Laniel
Cc: Daniel Díaz, stable, patches, linux-kernel, torvalds, akpm,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, allen.lkml, Guenter Roeck
On Fri, Dec 01, 2023 at 10:35:33AM +0100, Francis Laniel wrote:
> Hi!
>
> Le vendredi 1 décembre 2023, 09:21:33 CET Greg Kroah-Hartman a écrit :
> > On Thu, Nov 30, 2023 at 12:11:31PM -0600, Daniel Díaz wrote:
> > > Hello!
> > >
> > > On Thu, 30 Nov 2023 at 11:44, Guenter Roeck <linux@roeck-us.net> wrote:
> > > > On 11/30/23 09:21, Daniel Díaz wrote:
> > > > > Hello!
> > > > >
> > > > > Lots of failures everywhere:
> > > > > * clang-17-lkftconfig arm64
> > > > > * clang-17-lkftconfig arm64
> > > > > * clang-17-lkftconfig arm64
> > > > > * clang-lkftconfig arm64
> > > > > * clang-lkftconfig arm
> > > > > * clang-lkftconfig i386
> > > > > * clang-lkftconfig x86_64
> > > > > * gcc-12-lkftconfig arm64
> > > > > * gcc-12-lkftconfig arm
> > > > > * gcc-12-lkftconfig i386
> > > > > * gcc-12-lkftconfig x86_64
> > > > > * gcc-12-lkftconfig-64k_page_size arm64
> > > > > * gcc-12-lkftconfig-64k_page_size arm64
> > > > > * gcc-12-lkftconfig-armv8_features arm64
> > > > > * gcc-12-lkftconfig-debug arm64
> > > > > * gcc-12-lkftconfig-debug arm64
> > > > > * gcc-12-lkftconfig-debug arm
> > > > > * gcc-12-lkftconfig-debug i386
> > > > > * gcc-12-lkftconfig-debug x86_64
> > > > > * gcc-12-lkftconfig-debug-kmemleak arm64
> > > > > * gcc-12-lkftconfig-debug-kmemleak arm
> > > > > * gcc-12-lkftconfig-debug-kmemleak i386
> > > > > * gcc-12-lkftconfig-debug-kmemleak x86_64
> > > > > * gcc-12-lkftconfig-devicetree arm64
> > > > > * gcc-12-lkftconfig-kasan arm64
> > > > > * gcc-12-lkftconfig-kasan arm64
> > > > > * gcc-12-lkftconfig-kasan x86_64
> > > > > * gcc-12-lkftconfig-kselftest arm64
> > > > > * gcc-12-lkftconfig-kselftest-kernel arm64
> > > > > * gcc-12-lkftconfig-kselftest-kernel arm
> > > > > * gcc-12-lkftconfig-kselftest-kernel i386
> > > > > * gcc-12-lkftconfig-kunit arm64
> > > > > * gcc-12-lkftconfig-kunit arm64
> > > > > * gcc-12-lkftconfig-kunit arm
> > > > > * gcc-12-lkftconfig-kunit i386
> > > > > * gcc-12-lkftconfig-kunit x86_64
> > > > > * gcc-12-lkftconfig-libgpiod arm64
> > > > > * gcc-12-lkftconfig-libgpiod arm
> > > > > * gcc-12-lkftconfig-libgpiod i386
> > > > > * gcc-12-lkftconfig-libgpiod x86_64
> > > > > * gcc-12-lkftconfig-perf arm64
> > > > > * gcc-12-lkftconfig-perf-kernel arm64
> > > > > * gcc-12-lkftconfig-perf-kernel arm
> > > > > * gcc-12-lkftconfig-perf-kernel i386
> > > > > * gcc-12-lkftconfig-perf-kernel x86_64
> > > > > * gcc-12-lkftconfig-rcutorture arm64
> > > > > * gcc-12-lkftconfig-rcutorture arm64
> > > > > * gcc-12-lkftconfig-rcutorture arm
> > > > > * gcc-12-lkftconfig-rcutorture i386
> > > > > * gcc-12-lkftconfig-rcutorture x86_64
> > > > >
> > > > > It's essentially this:
> > > > >
> > > > > -----8<-----
> > > > >
> > > > > make --silent --keep-going --jobs=8
> > > > >
> > > > > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86
> > > > > CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc'
> > > > > 'HOSTCC=sccache gcc'
> > > > >
> > > > > arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x51:
> > > > > unreachable instruction
> > > > >
> > > > > x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> > > > >
> > > > > `__trace_kprobe_create':
> > > > > trace_kprobe.c:(.text+0x2f39): undefined reference to
> > > > >
> > > > > `kallsyms_on_each_symbol'
> > > > >
> > > > > x86_64-linux-gnu-ld: kernel/trace/trace_kprobe.o: in function
> > > > >
> > > > > `create_local_trace_kprobe':
> > > > > trace_kprobe.c:(.text+0x384b): undefined reference to
> > > > >
> > > > > `kallsyms_on_each_symbol'
> > > > >
> > > > > make[1]: *** [/builds/linux/Makefile:1227: vmlinux] Error 1
> > > > > make[1]: Target '__all' not remade because of errors.
> > > > > make: *** [Makefile:226: __sub-make] Error 2
> > > > > make: Target '__all' not remade because of errors.
> > > > >
> > > > > ----->8-----
> > > > >
> > > > > It only affects 5.15. Bisection in progress.
> > > >
> > > > I guess it will point to
> > > >
> > > > >> Francis Laniel <flaniel@linux.microsoft.com>
> > > > >>
> > > > >> tracing/kprobes: Return EADDRNOTAVAIL when func matches several
> > > > >> symbols
> > >
> > > It sure did!:
> > > commit 7b4375c36a4c0e1b4b97ccbcdd427db5a460e04f
> > > Author: Francis Laniel <flaniel@linux.microsoft.com>
> > > Date: Fri Oct 20 13:42:49 2023 +0300
> > >
> > > tracing/kprobes: Return EADDRNOTAVAIL when func matches several
> > > symbols
> > >
> > > commit b022f0c7e404887a7c5229788fc99eff9f9a80d5 upstream.
> > >
> > > Reverting that commit made the build pass again.
> >
> > {sigh}
> >
> > Francis, I think this is the second or third time this has happened with
> > the attempt to get this patch merged. I'm going to go drop it from all
> > of the pending stable queues again, and please, if you wish to have it
> > applied in the future, I am going to have to see some proof it was
> > actually tested on the architectures that it keeps breaking.
>
> Sorry for the disagreement, for this one, I had to add the CONFIG_LIVEPATCH to
> then be able to call kallsyms_on_each_symbol(), as on 5.15, this function is
> within a ifdef guard [1].
>
> I suppose you do not want to add CONFIG_LIVEPATCH to default config, so I will
> try to find a way for this specific kernel!
It doesn't matter about any "default config", you can not break the
build of any config.
> Did you get problems only for 5.15 kernel? Or others too?
I don't know, but for obvious reasons if it is not working in 5.15.y, we
can't take it in older kernels as that would be a regression when people
move to a newer one.
> In the second case, can you please link me the problems and I will polish
> everything.
Please take some time with a cross-compiler on the above listed
architectures and configurations to verify your changes do not break
anything again.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-12-01 9:44 ` Greg Kroah-Hartman
@ 2023-12-01 14:34 ` Daniel Díaz
2023-12-01 23:04 ` Greg Kroah-Hartman
0 siblings, 1 reply; 84+ messages in thread
From: Daniel Díaz @ 2023-12-01 14:34 UTC (permalink / raw)
To: Francis Laniel
Cc: Greg Kroah-Hartman, stable, patches, linux-kernel, torvalds, akpm,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, allen.lkml, Guenter Roeck
Hello!
On 01/12/23 3:44 a. m., Greg Kroah-Hartman wrote:
> Please take some time with a cross-compiler on the above listed
> architectures and configurations to verify your changes do not break
> anything again.
It failed in more architectures than we initially reported. FWIW, this error can be easily reproduced this way:
tuxmake --runtime podman --target-arch arm --toolchain gcc-8 --kconfig imx_v4_v5_defconfig
tuxmake --runtime podman --target-arch arm64 --toolchain gcc-12 --kconfig allmodconfig
tuxmake --runtime podman --target-arch i386 --toolchain gcc-12 --kconfig defconfig
tuxmake --runtime podman --target-arch x86_64 --toolchain gcc-12 --kconfig defconfig
tuxmake --runtime podman --target-arch mips --toolchain gcc-12 --kconfig allmodconfig
tuxmake --runtime podman --target-arch parisc --toolchain gcc-11 --kconfig allmodconfig
tuxmake --runtime podman --target-arch powerpc --toolchain gcc-12 --kconfig defconfig
tuxmake --runtime podman --target-arch riscv --toolchain gcc-12 --kconfig allmodconfig
tuxmake --runtime podman --target-arch sh --toolchain gcc-11 --kconfig defconfig
tuxmake --runtime podman --target-arch sparc --toolchain gcc-11 --kconfig sparc64_defconfig
Greetings!
Daniel Díaz
daniel.diaz@linaro.org
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-12-01 14:34 ` Daniel Díaz
@ 2023-12-01 23:04 ` Greg Kroah-Hartman
2023-12-04 14:55 ` Daniel Díaz
0 siblings, 1 reply; 84+ messages in thread
From: Greg Kroah-Hartman @ 2023-12-01 23:04 UTC (permalink / raw)
To: Daniel Díaz
Cc: Francis Laniel, stable, patches, linux-kernel, torvalds, akpm,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, allen.lkml, Guenter Roeck
On Fri, Dec 01, 2023 at 08:34:26AM -0600, Daniel Díaz wrote:
> Hello!
>
> On 01/12/23 3:44 a. m., Greg Kroah-Hartman wrote:
> > Please take some time with a cross-compiler on the above listed
> > architectures and configurations to verify your changes do not break
> > anything again.
>
> It failed in more architectures than we initially reported. FWIW, this error can be easily reproduced this way:
>
> tuxmake --runtime podman --target-arch arm --toolchain gcc-8 --kconfig imx_v4_v5_defconfig
Fails for me:
$ ~/.local/bin/tuxmake --runtime podman --target-arch arm --toolchain gcc-8 --kconfig imx_v4_v5_defconfig
Traceback (most recent call last):
File "/home/gregkh/.local/bin/tuxmake", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/cli.py", line 170, in main
build.run()
File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/build.py", line 652, in run
self.prepare()
File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/build.py", line 318, in prepare
self.runtime.prepare()
File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/runtime.py", line 423, in prepare
self.prepare_image()
File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/runtime.py", line 443, in prepare_image
do_pull()
File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/utils.py", line 36, in retry_wrapper
ret = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/runtime.py", line 441, in do_pull
subprocess.check_call(pull)
File "/usr/lib/python3.11/subprocess.py", line 408, in check_call
retcode = call(*popenargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 389, in call
with Popen(*popenargs, **kwargs) as p:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.11/subprocess.py", line 1950, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'podman'
Are you sure that's the right command line to use? :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH 5.15 00/69] 5.15.141-rc1 review
2023-12-01 23:04 ` Greg Kroah-Hartman
@ 2023-12-04 14:55 ` Daniel Díaz
0 siblings, 0 replies; 84+ messages in thread
From: Daniel Díaz @ 2023-12-04 14:55 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Francis Laniel, stable, patches, linux-kernel, torvalds, akpm,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, allen.lkml, Guenter Roeck
Hello!
On Fri, 1 Dec 2023 at 17:05, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Fri, Dec 01, 2023 at 08:34:26AM -0600, Daniel Díaz wrote:
[...]
> > It failed in more architectures than we initially reported. FWIW, this error can be easily reproduced this way:
> >
> > tuxmake --runtime podman --target-arch arm --toolchain gcc-8 --kconfig imx_v4_v5_defconfig
>
> Fails for me:
>
> $ ~/.local/bin/tuxmake --runtime podman --target-arch arm --toolchain gcc-8 --kconfig imx_v4_v5_defconfig
> Traceback (most recent call last):
> File "/home/gregkh/.local/bin/tuxmake", line 8, in <module>
> sys.exit(main())
> ^^^^^^
> File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/cli.py", line 170, in main
> build.run()
> File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/build.py", line 652, in run
> self.prepare()
> File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/build.py", line 318, in prepare
> self.runtime.prepare()
> File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/runtime.py", line 423, in prepare
> self.prepare_image()
> File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/runtime.py", line 443, in prepare_image
> do_pull()
> File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/utils.py", line 36, in retry_wrapper
> ret = func(*args, **kwargs)
> ^^^^^^^^^^^^^^^^^^^^^
> File "/home/gregkh/.local/pipx/venvs/tuxmake/lib/python3.11/site-packages/tuxmake/runtime.py", line 441, in do_pull
> subprocess.check_call(pull)
> File "/usr/lib/python3.11/subprocess.py", line 408, in check_call
> retcode = call(*popenargs, **kwargs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/subprocess.py", line 389, in call
> with Popen(*popenargs, **kwargs) as p:
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
> self._execute_child(args, executable, preexec_fn, close_fds,
> File "/usr/lib/python3.11/subprocess.py", line 1950, in _execute_child
> raise child_exception_type(errno_num, err_msg, err_filename)
> FileNotFoundError: [Errno 2] No such file or directory: 'podman'
>
> Are you sure that's the right command line to use? :)
Yes, it just needs `podman' to be installed. The Tuxmake team will
change that cryptic message into something easier to parse.
FWIW, `--runtime docker` also works (if Docker is installed), and
`--runtime null` simply makes Tuxmake rely on the cross-compilers you
have installed.
Greetings!
Daniel Díaz
daniel.diaz@linaro.org
^ permalink raw reply [flat|nested] 84+ messages in thread
end of thread, other threads:[~2023-12-04 14:55 UTC | newest]
Thread overview: 84+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 16:21 [PATCH 5.15 00/69] 5.15.141-rc1 review Greg Kroah-Hartman
2023-11-30 16:21 ` [PATCH 5.15 01/69] afs: Fix afs_server_list to be cleaned up with RCU Greg Kroah-Hartman
2023-11-30 16:21 ` [PATCH 5.15 02/69] afs: Make error on cell lookup failure consistent with OpenAFS Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 03/69] drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 04/69] drm/panel: auo,b101uan08.3: " Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 05/69] drm/panel: simple: Fix Innolux G101ICE-L01 bus flags Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 06/69] drm/panel: simple: Fix Innolux G101ICE-L01 timings Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 07/69] wireguard: use DEV_STATS_INC() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 08/69] octeontx2-pf: Fix memory leak during interface down Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 09/69] ata: pata_isapnp: Add missing error check for devm_ioport_map() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 10/69] drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 11/69] HID: core: store the unique system identifier in hid_device Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 12/69] HID: fix HID device resource race between HID core and debugging support Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 13/69] ipv4: Correct/silence an endian warning in __ip_do_redirect Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 14/69] net: usb: ax88179_178a: fix failed operations during ax88179_reset Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 15/69] net/smc: avoid data corruption caused by decline Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 16/69] arm/xen: fix xen_vcpu_info allocation alignment Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 17/69] octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 18/69] amd-xgbe: handle corner-case during sfp hotplug Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 19/69] amd-xgbe: handle the corner-case during tx completion Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 20/69] amd-xgbe: propagate the correct speed and duplex status Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 21/69] net: axienet: Fix check for partial TX checksum Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 22/69] afs: Return ENOENT if no cell DNS record can be found Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 23/69] afs: Fix file locking on R/O volumes to operate in local mode Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 24/69] nvmet: nul-terminate the NQNs passed in the connect command Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 25/69] USB: dwc3: qcom: fix resource leaks on probe deferral Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 26/69] USB: dwc3: qcom: fix ACPI platform device leak Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 27/69] lockdep: Fix block chain corruption Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 28/69] MIPS: KVM: Fix a build warning about variable set but not used Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 29/69] media: camss: Replace hard coded value with parameter Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 30/69] media: camss: sm8250: Virtual channels for CSID Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 31/69] media: qcom: camss: Fix set CSI2_RX_CFG1_VC_MODE when VC is greater than 3 Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 32/69] media: qcom: camss: Fix csid-gen2 for test pattern generator Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 33/69] ext4: add a new helper to check if es must be kept Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 34/69] ext4: factor out __es_alloc_extent() and __es_free_extent() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 35/69] ext4: use pre-allocated es in __es_insert_extent() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 36/69] ext4: use pre-allocated es in __es_remove_extent() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 37/69] ext4: using nofail preallocation in ext4_es_remove_extent() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 38/69] ext4: using nofail preallocation in ext4_es_insert_delayed_block() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 39/69] ext4: using nofail preallocation in ext4_es_insert_extent() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 40/69] ext4: fix slab-use-after-free " Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 41/69] ext4: make sure allocate pending entry not fail Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 42/69] tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 43/69] proc: sysctl: prevent aliased sysctls from getting passed to init Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 44/69] ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 45/69] swiotlb-xen: provide the "max_mapping_size" method Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 46/69] bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 47/69] md: fix bi_status reporting in md_end_clone_io Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 48/69] bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 49/69] io_uring/fs: consider link->flags when getting path for LINKAT Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 50/69] s390/dasd: protect device queue against concurrent access Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 51/69] USB: serial: option: add Luat Air72*U series products Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 52/69] hv_netvsc: Fix race of register_netdevice_notifier and VF register Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 53/69] hv_netvsc: Mark VF as slave before exposing it to user-mode Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 54/69] dm-delay: fix a race between delay_presuspend and delay_bio Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 55/69] bcache: check return value from btree_node_alloc_replacement() Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 56/69] bcache: prevent potential division by zero error Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 57/69] bcache: fixup init dirty data errors Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 58/69] bcache: fixup lock c->root error Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 59/69] usb: cdnsp: Fix deadlock issue during using NCM gadget Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 60/69] USB: serial: option: add Fibocom L7xx modules Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 61/69] USB: serial: option: fix FM101R-GL defines Greg Kroah-Hartman
2023-11-30 16:22 ` [PATCH 5.15 62/69] USB: serial: option: dont claim interface 4 for ZTE MF290 Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 63/69] usb: typec: tcpm: Skip hard reset when in error recovery Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 64/69] USB: dwc2: write HCINT with INTMASK applied Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 65/69] usb: dwc3: Fix default mode initialization Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 66/69] usb: dwc3: set the dma max_seg_size Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 67/69] USB: dwc3: qcom: fix software node leak on probe errors Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 68/69] USB: dwc3: qcom: fix wakeup after probe deferral Greg Kroah-Hartman
2023-11-30 16:23 ` [PATCH 5.15 69/69] io_uring: fix off-by one bvec index Greg Kroah-Hartman
2023-11-30 17:21 ` [PATCH 5.15 00/69] 5.15.141-rc1 review Daniel Díaz
2023-11-30 17:44 ` Guenter Roeck
2023-11-30 18:11 ` Daniel Díaz
2023-11-30 18:56 ` Guenter Roeck
2023-12-01 8:21 ` Greg Kroah-Hartman
2023-12-01 9:35 ` Francis Laniel
2023-12-01 9:44 ` Greg Kroah-Hartman
2023-12-01 14:34 ` Daniel Díaz
2023-12-01 23:04 ` Greg Kroah-Hartman
2023-12-04 14:55 ` Daniel Díaz
2023-12-01 6:31 ` Harshit Mogalapalli
2023-11-30 22:27 ` Pavel Machek
2023-11-30 18:57 ` Florian Fainelli
2023-12-01 0:08 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox