max_mapnr variable is utilized in the pfn_valid() method in order to
determine the upper PFN space boundary. Having it uninitialized
effectively makes any PFN passed to that method invalid. That in its turn
causes the kernel mm-subsystem occasion malfunctions even after the
max_mapnr variable is actually properly updated. For instance,
pfn_valid() is called in the init_unavailable_range() method in the
framework of the calls-chain on MIPS:
setup_arch()
+-> paging_init()
+-> free_area_init()
+-> memmap_init()
+-> memmap_init_zone_range()
+-> init_unavailable_range()
Since pfn_valid() always returns "false" value before max_mapnr is
initialized in the mem_init() method, any flatmem page-holes will be left
in the poisoned/uninitialized state including the IO-memory pages. Thus
any further attempts to map/remap the IO-memory by using MMU may fail.
In particular it happened in my case on attempt to map the SRAM region.
The kernel bootup procedure just crashed on the unhandled unaligned access
bug raised in the __update_cache() method:
> Unhandled kernel unaligned access[#1]:
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.7.0-rc1-XXX-dirty #2056
> ...
> Call Trace:
> [<8011ef9c>] __update_cache+0x88/0x1bc
> [<80385944>] ioremap_page_range+0x110/0x2a4
> [<80126948>] ioremap_prot+0x17c/0x1f4
> [<80711b80>] __devm_ioremap+0x8c/0x120
> [<80711e0c>] __devm_ioremap_resource+0xf4/0x218
> [<808bf244>] sram_probe+0x4f4/0x930
> [<80889d20>] platform_probe+0x68/0xec
> ...
Let's fix the problem by initializing the max_mapnr variable as soon as
the required data is available. In particular it can be done right in the
paging_init() method before free_area_init() is called since all the PFN
zone boundaries have already been calculated by that time.
Cc: stable(a)vger.kernel.org
Signed-off-by: Serge Semin <fancer.lancer(a)gmail.com>
---
Note I don't really know since what point that problem actually exists.
Based on the commits log it might had been persistent even before the
boot_mem_map allocator was dropped. On the other hand I hadn't seen it
actually come out before moving my working tree from kernel 6.5-rc4 to
6.7-rc1. So after updating the kernel I got the unhandled unaligned access
BUG() due to the access to compound head pointer the __update_cache()
method (see the commit log). After enabling the DEBUG_VM config I managed
to find out that the IO-memory pages were just left uninitialized and
poisoned:
> page:81367080 is uninitialized and poisoned (pfn 8192)
> page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p))
> Kernel bug detected[#1]:
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.7.0-rc1-00298-g88721b1a9ad5-dirty
> $ 0 : 00000000 812d0000 00000034 dced7cdf
> $ 4 : dced7cdf 00594000 10000000 ffff00fe
> $ 8 : 8196bfe0 00000000 00000001 818458c0
> $12 : 00000000 00000000 00000000 00000216
> $16 : 00002800 81227b80 00000000 00000000
> $20 : 00000000 00000000 00000000 00000000
> $24 : 0000022b 818458c0
> $28 : 81968000 8196be68 00000000 803a0920
> Hi : 00000000
> Lo : 00000000
> epc : 8039d2a4 BUG+0x0/0x4
> ra : 803a0920 post_alloc_hook+0x0/0x128
> Status: 10000003 KERNEL EXL IE
> Cause : 00800424 (ExcCode 09)
> PrId : 0001a830 (MIPS P5600)
> Modules linked in:
> Process swapper/0 (pid: 1, threadinfo=81968000, task=819a0000, tls=00000000)
> Stack : 00000000 8101ccb0 00000000 8196bd00 00000000 80359768 818a8300 00000001
> 81139088 8114438c 8042e4f8 81297a2c 81297a2c 81255e90 819a1b50 dced7cdf
> 81297a2c 81297a2c 00000000 81227b80 00000000 81241168 811394b0 00000000
> 81140000 80e2cee0 00000000 00000000 00000000 00000000 00000000 819b0000
> 81140000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> ...
> Call Trace:
> [<8039d2a4>] BUG+0x0/0x4
> [<803a0920>] post_alloc_hook+0x0/0x128
>
> Code: 01001025 03e00008 24020001 <000c000d> 2403003c 27bdffd0 afb2001c 3c12812f 8e4269e4
Which in its turn made me digging deeper into the way the MMIO-space pages
are initialized. That's how I got into the pfn_valid() and
init_unavailable_range() working improperly on my setup.
Anyway none of the problems above I spotted on kernel 6.5-rc4. So what
actually triggered having them finally popped up isn't that easy to be
foundn seeing the involved code hasn't changed much.
---
arch/mips/mm/init.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 5dcb525a8995..6e368a4658b5 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -422,7 +422,12 @@ void __init paging_init(void)
(highend_pfn - max_low_pfn) << (PAGE_SHIFT - 10));
max_zone_pfns[ZONE_HIGHMEM] = max_low_pfn;
}
+
+ max_mapnr = highend_pfn ? highend_pfn : max_low_pfn;
+#else
+ max_mapnr = max_low_pfn;
#endif
+ high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
free_area_init(max_zone_pfns);
}
@@ -458,13 +463,6 @@ void __init mem_init(void)
*/
BUILD_BUG_ON(IS_ENABLED(CONFIG_32BIT) && (PFN_PTE_SHIFT > PAGE_SHIFT));
-#ifdef CONFIG_HIGHMEM
- max_mapnr = highend_pfn ? highend_pfn : max_low_pfn;
-#else
- max_mapnr = max_low_pfn;
-#endif
- high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
-
maar_init();
memblock_free_all();
setup_zero_pages(); /* Setup zeroed pages. */
--
2.42.1
Dear stable maintainers,
I like to indicate the oops encountered and request the below patch to
be backported to v 5.15. The fix is important to avoid recurring oops
in context of rcu detected stalls.
subject: rcu: Avoid tracing a few functions executed in stop machine
commit 48f8070f5dd8
Target kernel version v 5.15
Reason for Application: To avoid oops due to rcu_prempt detect stalls
on cpus/tasks
Environment and oops context: Issue was observed in my environment on
5.15.193 kernel (arm platform). The patch is helpful to avoid the
below oops indicated in [1] and [2]
log :
root@ls1021atwr:~# uname -r
5.15.93-rt58+ge0f69a158d5b
oops dump stack
** ID_531 main/smp_fsm.c:1884 <inrcu: INFO: rcu_preempt detected
stalls on CPUs/tasks: <<< [1]
rcu: Tasks blocked on level-0 rcu_node (CPUs 0-1): P116/2:b..l
(detected by 1, t=2102 jiffies, g=12741, q=1154)
task:irq/31-arm-irq1 state:D stack: 0 pid: 116 ppid: 2 flags:0x00000000
[<8064b97f>] (__schedule) from [<8064bb01>] (schedule+0x8d/0xc2)
[<8064bb01>] (schedule) from [<8064fa65>] (schedule_timeout+0x6d/0xa0)
[<8064fa65>] (schedule_timeout) from [<804ba353>]
(fsl_ifc_run_command+0x6f/0x178)
[<804ba353>] (fsl_ifc_run_command) from [<804ba72f>]
(fsl_ifc_cmdfunc+0x203/0x2b8)
[<804ba72f>] (fsl_ifc_cmdfunc) from [<804b135f>] (nand_status_op+0xaf/0xe0)
[<804b135f>] (nand_status_op) from [<804b13b3>] (nand_check_wp+0x23/0x48)
....
< snipped >
Exception stack(0x822bbfb0 to 0x822bbff8)
bfa0: 00000000 00000000 00000000 00000000
bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
rcu: rcu_preempt kthread timer wakeup didn't happen for 764 jiffies!
g12741 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x1000
rcu: Possible timer handling issue on cpu=0 timer-softirq=1095
rcu: rcu_preempt kthread starved for 765 jiffies! g12741 f0x0
RCU_GP_WAIT_FQS(5) ->state=0x1000 ->cpu=0 <<< [2]
rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is
now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt state:D stack: 0 pid: 13 ppid: 2 flags:0x00000000
[<8064b97f>] (__schedule) from [<8064ba03>] (schedule_rtlock+0x1b/0x2e)
[<8064ba03>] (schedule_rtlock) from [<8064ea6f>]
(rtlock_slowlock_locked+0x93/0x108)
[<8064ea6f>] (rtlock_slowlock_locked) from [<8064eb1b>] (rt_spin_lock+0x37/0x4a)
[<8064eb1b>] (rt_spin_lock) from [<8021b723>] (__local_bh_disable_ip+0x6b/0x110)
[<8021b723>] (__local_bh_disable_ip) from [<8025a90f>]
(del_timer_sync+0x7f/0xe0)
[<8025a90f>] (del_timer_sync) from [<8064fa6b>] (schedule_timeout+0x73/0xa0)
[<8064fa6b>] (schedule_timeout) from [<80254677>] (rcu_gp_fqs_loop+0x8b/0x1bc)
[<80254677>] (rcu_gp_fqs_loop) from [<8025483f>] (rcu_gp_kthread+0x97/0xbc)
[<8025483f>] (rcu_gp_kthread) from [<8022ca67>] (kthread+0xcf/0xe4)
[<8022ca67>] (kthread) from [<80200149>] (ret_from_fork+0x11/0x28)
Exception stack(0x820fffb0 to 0x820ffff8)
ffa0: 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
rcu: Stack dump where RCU GP kthread last ran:
<<
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
< .. >
Thank you for your time and consideration. Please let me know if you
require any additional information
Best Regards,
Ronald Monthero
This is the start of the stable review cycle for the 5.15.141 release.
There are 68 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 03 Dec 2023 08:23:33 +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-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.15.141-rc2
Keith Busch <kbusch(a)kernel.org>
io_uring: fix off-by one bvec index
Johan Hovold <johan+linaro(a)kernel.org>
USB: dwc3: qcom: fix wakeup after probe deferral
Johan Hovold <johan+linaro(a)kernel.org>
USB: dwc3: qcom: fix software node leak on probe errors
Ricardo Ribalda <ribalda(a)chromium.org>
usb: dwc3: set the dma max_seg_size
Alexander Stein <alexander.stein(a)ew.tq-group.com>
usb: dwc3: Fix default mode initialization
Oliver Neukum <oneukum(a)suse.com>
USB: dwc2: write HCINT with INTMASK applied
Badhri Jagan Sridharan <badhri(a)google.com>
usb: typec: tcpm: Skip hard reset when in error recovery
Lech Perczak <lech.perczak(a)gmail.com>
USB: serial: option: don't claim interface 4 for ZTE MF290
Puliang Lu <puliang.lu(a)fibocom.com>
USB: serial: option: fix FM101R-GL defines
Victor Fragoso <victorffs(a)hotmail.com>
USB: serial: option: add Fibocom L7xx modules
Pawel Laszczak <pawell(a)cadence.com>
usb: cdnsp: Fix deadlock issue during using NCM gadget
Mingzhe Zou <mingzhe.zou(a)easystack.cn>
bcache: fixup lock c->root error
Mingzhe Zou <mingzhe.zou(a)easystack.cn>
bcache: fixup init dirty data errors
Rand Deeb <rand.sec96(a)gmail.com>
bcache: prevent potential division by zero error
Coly Li <colyli(a)suse.de>
bcache: check return value from btree_node_alloc_replacement()
Mikulas Patocka <mpatocka(a)redhat.com>
dm-delay: fix a race between delay_presuspend and delay_bio
Long Li <longli(a)microsoft.com>
hv_netvsc: Mark VF as slave before exposing it to user-mode
Haiyang Zhang <haiyangz(a)microsoft.com>
hv_netvsc: Fix race of register_netdevice_notifier and VF register
Asuna Yang <spriteovo(a)gmail.com>
USB: serial: option: add Luat Air72*U series products
Jan Höppner <hoeppner(a)linux.ibm.com>
s390/dasd: protect device queue against concurrent access
Charles Mirabile <cmirabil(a)redhat.com>
io_uring/fs: consider link->flags when getting path for LINKAT
Mingzhe Zou <mingzhe.zou(a)easystack.cn>
bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race
Song Liu <song(a)kernel.org>
md: fix bi_status reporting in md_end_clone_io
Coly Li <colyli(a)suse.de>
bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
Keith Busch <kbusch(a)kernel.org>
swiotlb-xen: provide the "max_mapping_size" method
Hans de Goede <hdegoede(a)redhat.com>
ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA
Krister Johansen <kjlx(a)templeofstupid.com>
proc: sysctl: prevent aliased sysctls from getting passed to init
Zhang Yi <yi.zhang(a)huawei.com>
ext4: make sure allocate pending entry not fail
Baokun Li <libaokun1(a)huawei.com>
ext4: fix slab-use-after-free in ext4_es_insert_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: using nofail preallocation in ext4_es_insert_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: using nofail preallocation in ext4_es_insert_delayed_block()
Baokun Li <libaokun1(a)huawei.com>
ext4: using nofail preallocation in ext4_es_remove_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: use pre-allocated es in __es_remove_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: use pre-allocated es in __es_insert_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: factor out __es_alloc_extent() and __es_free_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: add a new helper to check if es must be kept
Andrey Konovalov <andrey.konovalov(a)linaro.org>
media: qcom: camss: Fix csid-gen2 for test pattern generator
Bryan O'Donoghue <bryan.odonoghue(a)linaro.org>
media: qcom: camss: Fix set CSI2_RX_CFG1_VC_MODE when VC is greater than 3
Milen Mitkov <quic_mmitkov(a)quicinc.com>
media: camss: sm8250: Virtual channels for CSID
Souptick Joarder (HPE) <jrdr.linux(a)gmail.com>
media: camss: Replace hard coded value with parameter
Huacai Chen <chenhuacai(a)kernel.org>
MIPS: KVM: Fix a build warning about variable set but not used
Peter Zijlstra <peterz(a)infradead.org>
lockdep: Fix block chain corruption
Johan Hovold <johan+linaro(a)kernel.org>
USB: dwc3: qcom: fix ACPI platform device leak
Johan Hovold <johan+linaro(a)kernel.org>
USB: dwc3: qcom: fix resource leaks on probe deferral
Christoph Hellwig <hch(a)lst.de>
nvmet: nul-terminate the NQNs passed in the connect command
David Howells <dhowells(a)redhat.com>
afs: Fix file locking on R/O volumes to operate in local mode
David Howells <dhowells(a)redhat.com>
afs: Return ENOENT if no cell DNS record can be found
Samuel Holland <samuel.holland(a)sifive.com>
net: axienet: Fix check for partial TX checksum
Raju Rangoju <Raju.Rangoju(a)amd.com>
amd-xgbe: propagate the correct speed and duplex status
Raju Rangoju <Raju.Rangoju(a)amd.com>
amd-xgbe: handle the corner-case during tx completion
Raju Rangoju <Raju.Rangoju(a)amd.com>
amd-xgbe: handle corner-case during sfp hotplug
Suman Ghosh <sumang(a)marvell.com>
octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF
Stefano Stabellini <sstabellini(a)kernel.org>
arm/xen: fix xen_vcpu_info allocation alignment
D. Wythe <alibuda(a)linux.alibaba.com>
net/smc: avoid data corruption caused by decline
Jose Ignacio Tornos Martinez <jtornosm(a)redhat.com>
net: usb: ax88179_178a: fix failed operations during ax88179_reset
Kunwu Chan <chentao(a)kylinos.cn>
ipv4: Correct/silence an endian warning in __ip_do_redirect
Charles Yi <be286(a)163.com>
HID: fix HID device resource race between HID core and debugging support
Benjamin Tissoires <benjamin.tissoires(a)redhat.com>
HID: core: store the unique system identifier in hid_device
Jonas Karlman <jonas(a)kwiboo.se>
drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
Chen Ni <nichen(a)iscas.ac.cn>
ata: pata_isapnp: Add missing error check for devm_ioport_map()
Suman Ghosh <sumang(a)marvell.com>
octeontx2-pf: Fix memory leak during interface down
Eric Dumazet <edumazet(a)google.com>
wireguard: use DEV_STATS_INC()
Marek Vasut <marex(a)denx.de>
drm/panel: simple: Fix Innolux G101ICE-L01 timings
Marek Vasut <marex(a)denx.de>
drm/panel: simple: Fix Innolux G101ICE-L01 bus flags
Xuxin Xiong <xuxinxiong(a)huaqin.corp-partner.google.com>
drm/panel: auo,b101uan08.3: Fine tune the panel power sequence
Shuijing Li <shuijing.li(a)mediatek.com>
drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence
David Howells <dhowells(a)redhat.com>
afs: Make error on cell lookup failure consistent with OpenAFS
David Howells <dhowells(a)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 +-
net/ipv4/route.c | 2 +-
net/smc/af_smc.c | 8 +-
53 files changed, 629 insertions(+), 239 deletions(-)
This is the start of the stable review cycle for the 6.1.65 release.
There are 82 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/v6.x/stable-review/patch-6.1.65-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.1.65-rc1
Keith Busch <kbusch(a)kernel.org>
io_uring: fix off-by one bvec index
Johan Hovold <johan+linaro(a)kernel.org>
USB: dwc3: qcom: fix wakeup after probe deferral
Johan Hovold <johan+linaro(a)kernel.org>
USB: dwc3: qcom: fix software node leak on probe errors
Ricardo Ribalda <ribalda(a)chromium.org>
usb: dwc3: set the dma max_seg_size
Alexander Stein <alexander.stein(a)ew.tq-group.com>
usb: dwc3: Fix default mode initialization
Oliver Neukum <oneukum(a)suse.com>
USB: dwc2: write HCINT with INTMASK applied
Badhri Jagan Sridharan <badhri(a)google.com>
usb: typec: tcpm: Skip hard reset when in error recovery
Lech Perczak <lech.perczak(a)gmail.com>
USB: serial: option: don't claim interface 4 for ZTE MF290
Puliang Lu <puliang.lu(a)fibocom.com>
USB: serial: option: fix FM101R-GL defines
Victor Fragoso <victorffs(a)hotmail.com>
USB: serial: option: add Fibocom L7xx modules
Pawel Laszczak <pawell(a)cadence.com>
usb: cdnsp: Fix deadlock issue during using NCM gadget
Mingzhe Zou <mingzhe.zou(a)easystack.cn>
bcache: fixup lock c->root error
Mingzhe Zou <mingzhe.zou(a)easystack.cn>
bcache: fixup init dirty data errors
Rand Deeb <rand.sec96(a)gmail.com>
bcache: prevent potential division by zero error
Coly Li <colyli(a)suse.de>
bcache: check return value from btree_node_alloc_replacement()
Mikulas Patocka <mpatocka(a)redhat.com>
dm-delay: fix a race between delay_presuspend and delay_bio
Long Li <longli(a)microsoft.com>
hv_netvsc: Mark VF as slave before exposing it to user-mode
Haiyang Zhang <haiyangz(a)microsoft.com>
hv_netvsc: Fix race of register_netdevice_notifier and VF register
Haiyang Zhang <haiyangz(a)microsoft.com>
hv_netvsc: fix race of netvsc and VF register_netdevice
Asuna Yang <spriteovo(a)gmail.com>
USB: serial: option: add Luat Air72*U series products
Jan Höppner <hoeppner(a)linux.ibm.com>
s390/dasd: protect device queue against concurrent access
Charles Mirabile <cmirabil(a)redhat.com>
io_uring/fs: consider link->flags when getting path for LINKAT
Mingzhe Zou <mingzhe.zou(a)easystack.cn>
bcache: fixup multi-threaded bch_sectors_dirty_init() wake-up race
Song Liu <song(a)kernel.org>
md: fix bi_status reporting in md_end_clone_io
Coly Li <colyli(a)suse.de>
bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
Keith Busch <kbusch(a)kernel.org>
swiotlb-xen: provide the "max_mapping_size" method
Hans de Goede <hdegoede(a)redhat.com>
ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
arm64: dts: imx8mn-var-som: add 20ms delay to ethernet regulator enable
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix checksum mismatches in the duplicate reply cache
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix "start of NFS reply" pointer passed to nfsd_cache_update()
Zhang Yi <yi.zhang(a)huawei.com>
ext4: make sure allocate pending entry not fail
Baokun Li <libaokun1(a)huawei.com>
ext4: fix slab-use-after-free in ext4_es_insert_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: using nofail preallocation in ext4_es_insert_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: using nofail preallocation in ext4_es_insert_delayed_block()
Baokun Li <libaokun1(a)huawei.com>
ext4: using nofail preallocation in ext4_es_remove_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: use pre-allocated es in __es_remove_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: use pre-allocated es in __es_insert_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: factor out __es_alloc_extent() and __es_free_extent()
Baokun Li <libaokun1(a)huawei.com>
ext4: add a new helper to check if es must be kept
Bryan O'Donoghue <bryan.odonoghue(a)linaro.org>
media: qcom: camss: Fix genpd cleanup
Bryan O'Donoghue <bryan.odonoghue(a)linaro.org>
media: qcom: camss: Fix V4L2 async notifier error path
Sakari Ailus <sakari.ailus(a)linux.intel.com>
media: qcom: Initialise V4L2 async notifier later
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
media: camss: Convert to platform remove callback returning void
Vladimir Zapolskiy <vladimir.zapolskiy(a)linaro.org>
media: camss: Split power domain management
Huacai Chen <chenhuacai(a)kernel.org>
MIPS: KVM: Fix a build warning about variable set but not used
Shyam Prasad N <sprasad(a)microsoft.com>
cifs: fix leak of iface for primary channel
Shyam Prasad N <sprasad(a)microsoft.com>
cifs: account for primary channel in the interface list
Shyam Prasad N <sprasad(a)microsoft.com>
cifs: distribute channels across interfaces based on speed
Shyam Prasad N <sprasad(a)microsoft.com>
cifs: print last update time for interface list
Steve French <stfrench(a)microsoft.com>
smb3: allow dumping session and tcon id to improve stats analysis and debugging
Steve French <stfrench(a)microsoft.com>
cifs: minor cleanup of some headers
Peter Zijlstra <peterz(a)infradead.org>
lockdep: Fix block chain corruption
Johan Hovold <johan+linaro(a)kernel.org>
USB: dwc3: qcom: fix ACPI platform device leak
Johan Hovold <johan+linaro(a)kernel.org>
USB: dwc3: qcom: fix resource leaks on probe deferral
Christoph Hellwig <hch(a)lst.de>
nvmet: nul-terminate the NQNs passed in the connect command
Ivan Vecera <ivecera(a)redhat.com>
i40e: Fix adding unsupported cloud filters
Jan Sokolowski <jan.sokolowski(a)intel.com>
i40e: use ERR_PTR error print in i40e messages
Will Deacon <will(a)kernel.org>
arm64: mm: Fix "rodata=on" when CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
Zhenhua Huang <quic_zhenhuah(a)quicinc.com>
mm,kfence: decouple kfence from page granularity mapping judgement
David Howells <dhowells(a)redhat.com>
afs: Fix file locking on R/O volumes to operate in local mode
David Howells <dhowells(a)redhat.com>
afs: Return ENOENT if no cell DNS record can be found
Samuel Holland <samuel.holland(a)sifive.com>
net: axienet: Fix check for partial TX checksum
Raju Rangoju <Raju.Rangoju(a)amd.com>
amd-xgbe: propagate the correct speed and duplex status
Raju Rangoju <Raju.Rangoju(a)amd.com>
amd-xgbe: handle the corner-case during tx completion
Raju Rangoju <Raju.Rangoju(a)amd.com>
amd-xgbe: handle corner-case during sfp hotplug
Suman Ghosh <sumang(a)marvell.com>
octeontx2-pf: Fix ntuple rule creation to direct packet to VF with higher Rx queue than its PF
Stefano Stabellini <sstabellini(a)kernel.org>
arm/xen: fix xen_vcpu_info allocation alignment
D. Wythe <alibuda(a)linux.alibaba.com>
net/smc: avoid data corruption caused by decline
Jose Ignacio Tornos Martinez <jtornosm(a)redhat.com>
net: usb: ax88179_178a: fix failed operations during ax88179_reset
Kunwu Chan <chentao(a)kylinos.cn>
ipv4: Correct/silence an endian warning in __ip_do_redirect
Charles Yi <be286(a)163.com>
HID: fix HID device resource race between HID core and debugging support
Jonas Karlman <jonas(a)kwiboo.se>
drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
Andrzej Hajda <andrzej.hajda(a)intel.com>
drm/i915: do not clean GT table on error path
Chen Ni <nichen(a)iscas.ac.cn>
ata: pata_isapnp: Add missing error check for devm_ioport_map()
Suman Ghosh <sumang(a)marvell.com>
octeontx2-pf: Fix memory leak during interface down
Eric Dumazet <edumazet(a)google.com>
wireguard: use DEV_STATS_INC()
Marek Vasut <marex(a)denx.de>
drm/panel: simple: Fix Innolux G101ICE-L01 timings
Marek Vasut <marex(a)denx.de>
drm/panel: simple: Fix Innolux G101ICE-L01 bus flags
Xuxin Xiong <xuxinxiong(a)huaqin.corp-partner.google.com>
drm/panel: auo,b101uan08.3: Fine tune the panel power sequence
Shuijing Li <shuijing.li(a)mediatek.com>
drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence
David Howells <dhowells(a)redhat.com>
afs: Make error on cell lookup failure consistent with OpenAFS
David Howells <dhowells(a)redhat.com>
afs: Fix afs_server_list to be cleaned up with RCU
-------------
Diffstat:
Makefile | 4 +-
arch/arm/xen/enlighten.c | 3 +-
arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 1 +
arch/arm64/include/asm/kfence.h | 10 +
arch/arm64/include/asm/setup.h | 17 +-
arch/arm64/mm/mmu.c | 61 ++++
arch/arm64/mm/pageattr.c | 12 +-
arch/mips/kvm/mmu.c | 3 +-
drivers/acpi/resource.c | 7 +
drivers/ata/pata_isapnp.c | 3 +
drivers/gpu/drm/i915/gt/intel_gt.c | 11 -
drivers/gpu/drm/i915/i915_driver.c | 4 +-
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 | 12 +-
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-vfe-170.c | 20 +-
drivers/media/platform/qcom/camss/camss-vfe-480.c | 20 +-
drivers/media/platform/qcom/camss/camss.c | 86 +++---
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 +-
drivers/net/ethernet/intel/i40e/i40e_client.c | 8 +-
drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 16 +-
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 40 +--
drivers/net/ethernet/intel/i40e/i40e_main.c | 299 ++++++++++----------
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 4 +-
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 42 +--
.../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 | 66 +++--
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/nfsd/cache.h | 3 +-
fs/nfsd/nfscache.c | 65 +++--
fs/nfsd/nfssvc.c | 15 +-
fs/smb/client/cifs_debug.c | 22 +-
fs/smb/client/cifs_ioctl.h | 8 +-
fs/smb/client/cifsfs.h | 4 +-
fs/smb/client/cifsglob.h | 9 +-
fs/smb/client/connect.c | 6 +
fs/smb/client/ioctl.c | 25 ++
fs/smb/client/sess.c | 112 +++++++-
fs/smb/client/smb2ops.c | 6 +
include/linux/hid.h | 3 +
io_uring/fs.c | 2 +-
io_uring/rsrc.c | 2 +-
kernel/locking/lockdep.c | 3 +-
mm/kfence/core.c | 4 +
net/ipv4/route.c | 2 +-
net/smc/af_smc.c | 8 +-
76 files changed, 1162 insertions(+), 518 deletions(-)
The commit 407d1a51921e ("PCI: Create device tree node for bridge")
creates of_node for PCI devices.
During the insertion handling of these new DT nodes done by of_platform,
new devices (struct device) are created.
For each PCI devices a struct device is already present (created and
handled by the PCI core).
Having a second struct device to represent the exact same PCI device is
not correct.
On the of_node creation, tell the of_platform that there is no need to
create a device for this node (OF_POPULATED flag), link this newly
created of_node to the already present device and tell fwnode that the
device attached to this of_node is ready (fwnode_dev_initialized()).
With this fix, the of_node are available in the sysfs device tree:
/sys/devices/platform/soc/d0070000.pcie/
+ of_node -> .../devicetree/base/soc/pcie@d0070000
+ pci0000:00
+ 0000:00:00.0
+ of_node -> .../devicetree/base/soc/pcie@d0070000/pci@0,0
+ 0000:01:00.0
+ of_node -> .../devicetree/base/soc/pcie@d0070000/pci@0,0/dev@0,0
On the of_node removal, revert the operations.
Fixes: 407d1a51921e ("PCI: Create device tree node for bridge")
Cc: stable(a)vger.kernel.org
Signed-off-by: Herve Codina <herve.codina(a)bootlin.com>
---
drivers/pci/of.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index 51e3dd0ea5ab..5afd2731e876 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -615,7 +615,8 @@ void of_pci_remove_node(struct pci_dev *pdev)
np = pci_device_to_OF_node(pdev);
if (!np || !of_node_check_flag(np, OF_DYNAMIC))
return;
- pdev->dev.of_node = NULL;
+
+ device_remove_of_node(&pdev->dev);
of_changeset_revert(np->data);
of_changeset_destroy(np->data);
@@ -668,12 +669,22 @@ void of_pci_make_dev_node(struct pci_dev *pdev)
if (ret)
goto out_free_node;
+ /*
+ * This of_node will be added to an existing device.
+ * Avoid any device creation and use the existing device
+ */
+ of_node_set_flag(np, OF_POPULATED);
+ np->fwnode.dev = &pdev->dev;
+ fwnode_dev_initialized(&np->fwnode, true);
+
ret = of_changeset_apply(cset);
if (ret)
goto out_free_node;
np->data = cset;
- pdev->dev.of_node = np;
+
+ /* Add the of_node to the existing device */
+ device_add_of_node(&pdev->dev, np);
kfree(name);
return;
--
2.42.0
[CCing stable list and Mario, who submitted this to 6.1.y]
On 01.12.23 01:30, Bagas Sanjaya wrote:
>
> I notice a regression report on Bugzilla [1]. Quoting from it:
>
>> Since kernel version 6.1.57 I have problems with external monitor
>> wakeup after suspend on Thinkpad X13 AMD Gen2 Notebook.
>>
>> Notebook is in docking station with closed lid. Suspend & Resume.
>> The external monitor gets no signal. After randomly typing
>> Ctrl+Alt+Fn for switchung consoles, the monitor at some point gets
>> signal and is usable again.
>>
>> It worked with kernel 6.1.56.
>>
>> I managed to compile a 6.1.57 kernel and also a 6.1.64 kernel by
>> reverting the changes from commit ec5fa9 "drm/amd/display: Adjust
>> the MST resume flow"
>> (https://github.com/torvalds/linux/commit/ec5fa9fcdeca69edf7dab5ca3b2e0ceb1c…)
>> and with this suspend & resume worked like before without any
>> problems.
> [...]
> [1]: https://bugzilla.kernel.org/show_bug.cgi?id=218211
We have a small problem here: that error might happen because
ec5fa9fcdeca69 ("drm/amd/display: Adjust the MST resume flow")
[v6.6-rc2] contains a bug or because something it needs was not
backported to 6.1.y.
Maybe one of the developers among the recipients has a idea. Oliver, but
if none of them replies any time soon, it would be best if you'd check
if 6.6 (and/or 6.7-rc) is affected as well; and if reverting it there
fixes it, too.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.
Update the comments of binder_alloc_new_buf() to reflect that the return
value of the function is now ERR_PTR(-errno) on failure.
No functional changes in this patch.
Cc: stable(a)vger.kernel.org
Fixes: 57ada2fb2250 ("binder: add log information for binder transaction failures")
Reviewed-by: Alice Ryhl <aliceryhl(a)google.com>
Signed-off-by: Carlos Llamas <cmllamas(a)google.com>
---
drivers/android/binder_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index a124d2743c69..a56cbfd9ba44 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -556,7 +556,7 @@ static struct binder_buffer *binder_alloc_new_buf_locked(
* is the sum of the three given sizes (each rounded up to
* pointer-sized boundary)
*
- * Return: The allocated buffer or %NULL if error
+ * Return: The allocated buffer or %ERR_PTR(-errno) if error
*/
struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc,
size_t data_size,
--
2.43.0.rc2.451.g8631bc7472-goog
Fix minor misspelling of the function in the comment section.
No functional changes in this patch.
Cc: stable(a)vger.kernel.org
Fixes: 0f966cba95c7 ("binder: add flag to clear buffer on txn complete")
Reviewed-by: Alice Ryhl <aliceryhl(a)google.com>
Signed-off-by: Carlos Llamas <cmllamas(a)google.com>
---
drivers/android/binder_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index 9b5c4d446efa..a124d2743c69 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -704,7 +704,7 @@ void binder_alloc_free_buf(struct binder_alloc *alloc,
/*
* We could eliminate the call to binder_alloc_clear_buf()
* from binder_alloc_deferred_release() by moving this to
- * binder_alloc_free_buf_locked(). However, that could
+ * binder_free_buf_locked(). However, that could
* increase contention for the alloc mutex if clear_on_free
* is used frequently for large buffers. The mutex is not
* needed for correctness here.
--
2.43.0.rc2.451.g8631bc7472-goog