6.12.64-rc1 review
Subsystems (4)
Greg Kroah-Hartman
maintainerPATCH 554/567 PCI: brcmstb: Fix disabling L0s capability
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jim Quinlan <[email protected]>
[ Upstream commit 9583f9d22991d2cfb5cc59a2552040c4ae98d998 ]
caab002d5069 ("PCI: brcmstb: Disable L0s component of ASPM if requested") set PCI_EXP_LNKCAP_ASPM_L1 and (optionally) PCI_EXP_LNKCAP_ASPM_L0S in PCI_EXP_LNKCAP (aka PCIE_RC_CFG_PRIV1_LINK_CAPABILITY in brcmstb).
But instead of using PCI_EXP_LNKCAP_ASPM_L1 and PCI_EXP_LNKCAP_ASPM_L0S directly, it used PCIE_LINK_STATE_L1 and PCIE_LINK_STATE_L0S, which are Linux-created values that only coincidentally matched the PCIe spec. b478e162f227 ("PCI/ASPM: Consolidate link state defines") later changed them so they no longer matched the PCIe spec, so the bits ended up in the wrong place in PCI_EXP_LNKCAP.
Use PCI_EXP_LNKCAP_ASPM_L0S to clear L0s support when there's an 'aspm-no-l0s' property. Rely on brcmstb hardware to advertise L0s and/or L1 support otherwise.
--- drivers/pci/controller/pcie-brcmstb.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/pci/controller/pcie-brcmstb.c +3 -7
@@ -47,7 +47,6 @@#define PCIE_RC_CFG_PRIV1_LINK_CAPABILITY 0x04dc#define PCIE_RC_CFG_PRIV1_LINK_CAPABILITY_MAX_LINK_WIDTH_MASK 0x1f0 -#define PCIE_RC_CFG_PRIV1_LINK_CAPABILITY_ASPM_SUPPORT_MASK 0xc00#define PCIE_RC_CFG_PRIV1_ROOT_CAP 0x4f8#define PCIE_RC_CFG_PRIV1_ROOT_CAP_L1SS_MODE_MASK 0xf8
@@ -1029,7 +1028,7 @@ static int brcm_pcie_setup(struct brcm_pvoid __iomem *base = pcie->base;struct pci_host_bridge *bridge;struct resource_entry *entry; -u32 tmp, burst, aspm_support, num_lanes, num_lanes_cap; +u32 tmp, burst, num_lanes, num_lanes_cap;u8 num_out_wins =0 ;int num_inbound_wins =0 ;int memc, ret;
@@ -1129,12 +1128,9 @@ static int brcm_pcie_setup(struct brcm_p/* Don't advertise L0s capability if 'aspm-no-l0s' */ - aspm_support =PCIE_LINK_STATE_L1 ; -if (!of_property_read_bool (pcie->np,"aspm-no-l0s" )) - aspm_support |=PCIE_LINK_STATE_L0S ; tmp =readl (base +PCIE_RC_CFG_PRIV1_LINK_CAPABILITY ); -u32p_replace_bits (&tmp, aspm_support, -PCIE_RC_CFG_PRIV1_LINK_CAPABILITY_ASPM_SUPPORT_MASK ); +if (of_property_read_bool (pcie->np,"aspm-no-l0s" )) + tmp &= ~PCI_EXP_LNKCAP_ASPM_L0S ;writel (tmp, base +PCIE_RC_CFG_PRIV1_LINK_CAPABILITY );/* 'tmp' still holds the contents of PRIV1_LINK_CAPABILITY */
Greg Kroah-Hartman
maintainerPATCH 528/567 net: use dst_dev_rcu() in sk_setup_caps()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 99a2ace61b211b0be861b07fbaa062fca4b58879 ]
Use RCU to protect accesses to dst->dev from sk_setup_caps() and sk_dst_gso_max_size().
Also use dst_dev_rcu() in ip6_dst_mtu_maybe_forward(), and ip_dst_mtu_maybe_forward().
ip4_dst_hoplimit() can use dst_dev_net_rcu().
[Harshit: Backport to 6.12.y, resolve conflict due to missing commit:22d6c9eebf2e ("net: Unexport shared functions for DCCP.") in 6.12.y]
--- include/net/ip.h | 6 ++++-- include/net/ip6_route.h | 2 +- include/net/route.h | 2 +- net/core/sock.c | 16 ++++++++++------ 4 files changed, 16 insertions(+), 10 deletions(-)
include/net/ip.h +4 -2
@@ -470,12 +470,14 @@ static inline unsigned int ip_dst_mtu_ma bool forwarding) {const struct rtable *rt =dst_rtable (dst); +const struct net_device *dev;unsigned int mtu, res;struct net *net;rcu_read_lock (); - net =dev_net_rcu (dst_dev (dst)); + dev =dst_dev_rcu (dst); + net =dev_net_rcu (dev);if (READ_ONCE (net->ipv4.sysctl_ip_fwd_use_pmtu) ||ip_mtu_locked (dst) || !forwarding) {
@@ -489,7 +491,7 @@ static inline unsigned int ip_dst_mtu_maif (mtu) goto out; - mtu =READ_ONCE (dst_dev (dst)->mtu); + mtu =READ_ONCE (dev->mtu);if (unlikely (ip_mtu_locked (dst))) {if (rt->rt_uses_gateway && mtu >576 )
include/net/ip6_route.h +1 -1
@@ -337,7 +337,7 @@ static inline unsigned int ip6_dst_mtu_m mtu =IPV6_MIN_MTU ;rcu_read_lock (); - idev =__in6_dev_get (dst_dev (dst)); + idev =__in6_dev_get (dst_dev_rcu (dst));if (idev) mtu =READ_ONCE (idev->cnf.mtu6);rcu_read_unlock ();
include/net/route.h +1 -1
@@ -369,7 +369,7 @@ static inline int ip4_dst_hoplimit(constconst struct net *net;rcu_read_lock (); - net =dev_net_rcu (dst_dev (dst)); + net =dst_dev_net_rcu (dst); hoplimit =READ_ONCE (net->ipv4.sysctl_ip_default_ttl);rcu_read_unlock (); }
net/core/sock.c +10 -6
@@ -2524,7 +2524,7 @@ void sk_free_unlock_clone(struct sock *s }EXPORT_SYMBOL_GPL (sk_free_unlock_clone); -static u32 sk_dst_gso_max_size (struct sock *sk,struct dst_entry *dst) +static u32 sk_dst_gso_max_size (struct sock *sk,const struct net_device *dev) {bool is_ipv6 = false;u32 max_size;
@@ -2534,8 +2534,8 @@ static u32 sk_dst_gso_max_size(struct so !ipv6_addr_v4mapped(&sk->sk_v6_rcv_saddr));#endif /* pairs with the WRITE_ONCE() in netif_set_gso(_ipv4)_max_size() */ - max_size = is_ipv6 ?READ_ONCE (dst_dev (dst)->gso_max_size) : -READ_ONCE (dst_dev (dst)->gso_ipv4_max_size); + max_size = is_ipv6 ?READ_ONCE (dev->gso_max_size) : +READ_ONCE (dev->gso_ipv4_max_size);if (max_size >GSO_LEGACY_MAX_SIZE && !sk_is_tcp (sk)) max_size =GSO_LEGACY_MAX_SIZE ;
@@ -2544,9 +2544,12 @@ static u32 sk_dst_gso_max_size(struct sovoid sk_setup_caps (struct sock *sk,struct dst_entry *dst) { +const struct net_device *dev;u32 max_segs =1 ; - sk->sk_route_caps =dst_dev (dst)->features; +rcu_read_lock (); + dev =dst_dev_rcu (dst); + sk->sk_route_caps = dev->features;if (sk_is_tcp (sk)) {struct inet_connection_sock *icsk =inet_csk (sk);
@@ -2562,13 +2565,14 @@ void sk_setup_caps(struct sock *sk, stru sk->sk_route_caps &= ~NETIF_F_GSO_MASK ; }else { sk->sk_route_caps |=NETIF_F_SG |NETIF_F_HW_CSUM ; - sk->sk_gso_max_size =sk_dst_gso_max_size (sk, dst); + sk->sk_gso_max_size =sk_dst_gso_max_size (sk, dev);/* pairs with the WRITE_ONCE() in netif_set_gso_max_segs() */ - max_segs =max_t (u32,READ_ONCE (dst_dev (dst)->gso_max_segs),1 ); + max_segs =max_t (u32,READ_ONCE (dev->gso_max_segs),1 ); } } sk->sk_gso_max_segs = max_segs;sk_dst_set (sk, dst); +rcu_read_unlock (); }EXPORT_SYMBOL_GPL (sk_setup_caps);
Greg Kroah-Hartman
maintainerPATCH 555/567 mm/balloon_compaction: we cannot have isolated pages in the balloon list
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand <[email protected]>
[ Upstream commit fb05f992b6bbb4702307d96f00703ee637b24dbf ]
Patch series "mm/migration: rework movable_ops page migration (part 1)", v2.
In the future, as we decouple "struct page" from "struct folio", pages that support "non-lru page migration" -- movable_ops page migration such as memory balloons and zsmalloc -- will no longer be folios. They will not have ->mapping, ->lru, and likely no refcount and no page lock. But they will have a type and flags 🙂
This is the first part (other parts not written yet) of decoupling movable_ops page migration from folio migration.
In this series, we get rid of the ->mapping usage, and start cleaning up the code + separating it from folio migration.
Migration core will have to be further reworked to not treat movable_ops pages like folios. This is the first step into that direction.
This patch (of 29):
The core will set PG_isolated only after mops->isolate_page() was called. In case of the balloon, that is where we will remove it from the balloon list. So we cannot have isolated pages in the balloon list.
Let's drop this unnecessary check.
Stable-dep-of: 0da2ba35c0d5 ("powerpc/pseries/cmm: adjust BALLOON_MIGRATE when migrating pages")
--- mm/balloon_compaction.c | 6 ------ 1 file changed, 6 deletions(-)
mm/balloon_compaction.c +0 -6
@@ -93,12 +93,6 @@ size_t balloon_page_list_dequeue(structif (!trylock_page (page))continue ; -if (IS_ENABLED (CONFIG_BALLOON_COMPACTION ) && -PageIsolated (page)) { -/* raced with isolation */ -unlock_page (page); -continue ; - }balloon_page_delete (page);__count_vm_event (BALLOON_DEFLATE );list_add (&page->lru, pages);
Greg Kroah-Hartman
maintainerPATCH 556/567 mm/balloon_compaction: convert balloon_page_delete() to balloon_page_finalize()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand <[email protected]>
[ Upstream commit 15504b1163007bbfbd9a63460d5c14737c16e96d ]
Let's move the removal of the page from the balloon list into the single caller, to remove the dependency on the PG_isolated flag and clarify locking requirements.
Note that for now, balloon_page_delete() was used on two paths:
(1) Removing a page from the balloon for deflation through balloon_page_list_dequeue()
(2) Removing an isolated page from the balloon for migration in the per-driver migration handlers. Isolated pages were already removed from the balloon list during isolation.
So instead of relying on the flag, we can just distinguish both cases directly and handle it accordingly in the caller.
We'll shuffle the operations a bit such that they logically make more sense (e.g., remove from the list before clearing flags).
In balloon migration functions we can now move the balloon_page_finalize() out of the balloon lock and perform the finalization just before dropping the balloon reference.
Document that the page lock is currently required when modifying the movability aspects of a page; hopefully we can soon decouple this from the page lock.
Stable-dep-of: 0da2ba35c0d5 ("powerpc/pseries/cmm: adjust BALLOON_MIGRATE when migrating pages")
--- arch/powerpc/platforms/pseries/cmm.c | 2 - drivers/misc/vmw_balloon.c | 3 -- drivers/virtio/virtio_balloon.c | 4 --- include/linux/balloon_compaction.h | 43 +++++++++++++---------------------- mm/balloon_compaction.c | 3 +- 5 files changed, 21 insertions(+), 34 deletions(-)
arch/powerpc/platforms/pseries/cmm.c +1 -1
@@ -532,7 +532,6 @@ static int cmm_migratepage(struct balloospin_lock_irqsave (&b_dev_info->pages_lock, flags);balloon_page_insert (b_dev_info, newpage); -balloon_page_delete (page); b_dev_info->isolated_pages--;spin_unlock_irqrestore (&b_dev_info->pages_lock, flags);
@@ -542,6 +541,7 @@ static int cmm_migratepage(struct balloo*/ plpar_page_set_active (page); +balloon_page_finalize (page);/* balloon page list reference */ put_page (page);
drivers/misc/vmw_balloon.c +1 -2
@@ -1778,8 +1778,7 @@ static int vmballoon_migratepage(struct* @pages_lock . We keep holding @comm_lock since we will need it in a * second. */ -balloon_page_delete (page); - +balloon_page_finalize (page);put_page (page);/* Inflate */
drivers/virtio/virtio_balloon.c +1 -3
@@ -866,15 +866,13 @@ static int virtballoon_migratepage(structell_host (vb, vb->inflate_vq);/* balloon's page migration 2nd step -- deflate "page" */ -spin_lock_irqsave (&vb_dev_info->pages_lock, flags); -balloon_page_delete (page); -spin_unlock_irqrestore (&vb_dev_info->pages_lock, flags); vb->num_pfns =VIRTIO_BALLOON_PAGES_PER_PAGE ;set_page_pfns (vb, vb->pfns, page);tell_host (vb, vb->deflate_vq);mutex_unlock (&vb->balloon_lock); +balloon_page_finalize (page);put_page (page);/* balloon reference */ return MIGRATEPAGE_SUCCESS ;
include/linux/balloon_compaction.h +16 -27
61 lines not on this page · raw message
mm/balloon_compaction.c +2 -1
@@ -93,7 +93,8 @@ size_t balloon_page_list_dequeue(structif (!trylock_page (page))continue ; -balloon_page_delete (page); +list_del (&page->lru); +balloon_page_finalize (page);__count_vm_event (BALLOON_DEFLATE );list_add (&page->lru, pages);unlock_page (page);
Greg Kroah-Hartman
maintainerPATCH 557/567 powerpc/pseries/cmm: adjust BALLOON_MIGRATE when migrating pages
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand <[email protected]>
[ Upstream commit 0da2ba35c0d532ca0fe7af698b17d74c4d084b9a ]
Let's properly adjust BALLOON_MIGRATE like the other drivers.
Note that the INFLATE/DEFLATE events are triggered from the core when enqueueing/dequeueing pages.
This was found by code inspection.
--- arch/powerpc/platforms/pseries/cmm.c | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/platforms/pseries/cmm.c +1 -0
@@ -532,6 +532,7 @@ static int cmm_migratepage(struct balloospin_lock_irqsave (&b_dev_info->pages_lock, flags);balloon_page_insert (b_dev_info, newpage); +__count_vm_event (BALLOON_MIGRATE ); b_dev_info->isolated_pages--;spin_unlock_irqrestore (&b_dev_info->pages_lock, flags);
Greg Kroah-Hartman
maintainerPATCH 558/567 media: mediatek: vcodec: Use spinlock for context list protection lock
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit a5844227e0f030d2af2d85d4aed10c5eca6ca176 ]
Previously a mutex was added to protect the encoder and decoder context lists from unexpected changes originating from the SCP IP block, causing the context pointer to go invalid, resulting in a NULL pointer dereference in the IPI handler.
Turns out on the MT8173, the VPU IPI handler is called from hard IRQ context. This causes a big warning from the scheduler. This was first reported downstream on the ChromeOS kernels, but is also reproducible on mainline using Fluster with the FFmpeg v4l2m2m decoders. Even though the actual capture format is not supported, the affected code paths are triggered.
Since this lock just protects the context list and operations on it are very fast, it should be OK to switch to a spinlock.
--- drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c | 10 +++++--- drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 12 +++++----- drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h | 2 - drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c | 5 ++-- drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c | 12 +++++----- drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h | 2 - drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c | 5 ++-- 7 files changed, 28 insertions(+), 20 deletions(-)
drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c +6 -4
@@ -47,30 +47,32 @@ static void mtk_vcodec_vpu_reset_dec_han {struct mtk_vcodec_dec_dev *dev = priv;struct mtk_vcodec_dec_ctx *ctx; +unsigned long flags;dev_err (&dev->plat_dev->dev,"Watchdog timeout!!" ); -mutex_lock (&dev->dev_ctx_lock); +spin_lock_irqsave (&dev->dev_ctx_lock, flags);list_for_each_entry (ctx, &dev->ctx_list, list) { ctx->state =MTK_STATE_ABORT ;mtk_v4l2_vdec_dbg (0 , ctx,"[%d] Change to state MTK_STATE_ABORT" , ctx->id); } -mutex_unlock (&dev->dev_ctx_lock); +spin_unlock_irqrestore (&dev->dev_ctx_lock, flags); }static void mtk_vcodec_vpu_reset_enc_handler (void *priv) {struct mtk_vcodec_enc_dev *dev = priv;struct mtk_vcodec_enc_ctx *ctx; +unsigned long flags;dev_err (&dev->plat_dev->dev,"Watchdog timeout!!" ); -mutex_lock (&dev->dev_ctx_lock); +spin_lock_irqsave (&dev->dev_ctx_lock, flags);list_for_each_entry (ctx, &dev->ctx_list, list) { ctx->state =MTK_STATE_ABORT ;mtk_v4l2_vdec_dbg (0 , ctx,"[%d] Change to state MTK_STATE_ABORT" , ctx->id); } -mutex_unlock (&dev->dev_ctx_lock); +spin_unlock_irqrestore (&dev->dev_ctx_lock, flags); }static const struct mtk_vcodec_fw_ops mtk_vcodec_vpu_msg = {
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c +7 -5
@@ -198,6 +198,7 @@ static int fops_vcodec_open(struct filestruct mtk_vcodec_dec_ctx *ctx =NULL ;int ret =0 , i, hw_count;struct vb2_queue *src_vq; +unsigned long flags; ctx =kzalloc (sizeof (*ctx),GFP_KERNEL );if (!ctx)
@@ -268,9 +269,9 @@ static int fops_vcodec_open(struct file ctx->dev->vdec_pdata->init_vdec_params (ctx); -mutex_lock (&dev->dev_ctx_lock); +spin_lock_irqsave (&dev->dev_ctx_lock, flags);list_add (&ctx->list, &dev->ctx_list); -mutex_unlock (&dev->dev_ctx_lock); +spin_unlock_irqrestore (&dev->dev_ctx_lock, flags);mtk_vcodec_dbgfs_create (ctx);mutex_unlock (&dev->dev_mutex);
@@ -295,6 +296,7 @@ static int fops_vcodec_release(struct fi {struct mtk_vcodec_dec_dev *dev =video_drvdata (file);struct mtk_vcodec_dec_ctx *ctx =fh_to_dec_ctx (file->private_data); +unsigned long flags;mtk_v4l2_vdec_dbg (0 , ctx,"[%d] decoder" , ctx->id);mutex_lock (&dev->dev_mutex);
@@ -313,9 +315,9 @@ static int fops_vcodec_release(struct fiv4l2_ctrl_handler_free (&ctx->ctrl_hdl);mtk_vcodec_dbgfs_remove (dev, ctx->id); -mutex_lock (&dev->dev_ctx_lock); +spin_lock_irqsave (&dev->dev_ctx_lock, flags);list_del_init (&ctx->list); -mutex_unlock (&dev->dev_ctx_lock); +spin_unlock_irqrestore (&dev->dev_ctx_lock, flags);kfree (ctx);mutex_unlock (&dev->dev_mutex);return 0 ;
@@ -408,7 +410,7 @@ static int mtk_vcodec_probe(struct platffor (i =0 ; i <MTK_VDEC_HW_MAX ; i++)mutex_init (&dev->dec_mutex[i]);mutex_init (&dev->dev_mutex); -mutex_init (&dev->dev_ctx_lock); +spin_lock_init (&dev->dev_ctx_lock);spin_lock_init (&dev->irqlock); snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h +1 -1
@@ -283,7 +283,7 @@ struct mtk_vcodec_dec_dev {/* decoder hardware mutex lock */ struct mutex dec_mutex[MTK_VDEC_HW_MAX ];struct mutex dev_mutex; -struct mutex dev_ctx_lock; +spinlock_t dev_ctx_lock;struct workqueue_struct *decode_workqueue;spinlock_t irqlock;
drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c +3 -2
@@ -75,16 +75,17 @@ static void handle_get_param_msg_ack(constatic bool vpu_dec_check_ap_inst (struct mtk_vcodec_dec_dev *dec_dev,struct vdec_vpu_inst *vpu) {struct mtk_vcodec_dec_ctx *ctx; +unsigned long flags;int ret = false; -mutex_lock (&dec_dev->dev_ctx_lock); +spin_lock_irqsave (&dec_dev->dev_ctx_lock, flags);list_for_each_entry (ctx, &dec_dev->ctx_list, list) {if (!IS_ERR_OR_NULL (ctx) && ctx->vpu_inst == vpu) { ret = true;break ; } } -mutex_unlock (&dec_dev->dev_ctx_lock); +spin_unlock_irqrestore (&dec_dev->dev_ctx_lock, flags);return ret; }
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c +7 -5
@@ -117,6 +117,7 @@ static int fops_vcodec_open(struct filestruct mtk_vcodec_enc_ctx *ctx =NULL ;int ret =0 ;struct vb2_queue *src_vq; +unsigned long flags; ctx =kzalloc (sizeof (*ctx),GFP_KERNEL );if (!ctx)
@@ -177,9 +178,9 @@ static int fops_vcodec_open(struct filemtk_v4l2_venc_dbg (2 , ctx,"Create instance [%d]@%p m2m_ctx=%p " , ctx->id, ctx, ctx->m2m_ctx); -mutex_lock (&dev->dev_ctx_lock); +spin_lock_irqsave (&dev->dev_ctx_lock, flags);list_add (&ctx->list, &dev->ctx_list); -mutex_unlock (&dev->dev_ctx_lock); +spin_unlock_irqrestore (&dev->dev_ctx_lock, flags);mutex_unlock (&dev->dev_mutex); mtk_v4l2_venc_dbg(0, ctx, "%s encoder [%d]", dev_name(&dev->plat_dev->dev),
@@ -204,6 +205,7 @@ static int fops_vcodec_release(struct fi {struct mtk_vcodec_enc_dev *dev =video_drvdata (file);struct mtk_vcodec_enc_ctx *ctx =fh_to_enc_ctx (file->private_data); +unsigned long flags;mtk_v4l2_venc_dbg (1 , ctx,"[%d] encoder" , ctx->id);mutex_lock (&dev->dev_mutex);
@@ -214,9 +216,9 @@ static int fops_vcodec_release(struct fiv4l2_fh_exit (&ctx->fh);v4l2_ctrl_handler_free (&ctx->ctrl_hdl); -mutex_lock (&dev->dev_ctx_lock); +spin_lock_irqsave (&dev->dev_ctx_lock, flags);list_del_init (&ctx->list); -mutex_unlock (&dev->dev_ctx_lock); +spin_unlock_irqrestore (&dev->dev_ctx_lock, flags);kfree (ctx);mutex_unlock (&dev->dev_mutex);return 0 ;
@@ -298,7 +300,7 @@ static int mtk_vcodec_probe(struct platfmutex_init (&dev->enc_mutex);mutex_init (&dev->dev_mutex); -mutex_init (&dev->dev_ctx_lock); +spin_lock_init (&dev->dev_ctx_lock);spin_lock_init (&dev->irqlock); snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.h +1 -1
@@ -206,7 +206,7 @@ struct mtk_vcodec_enc_dev {/* encoder hardware mutex lock */ struct mutex enc_mutex;struct mutex dev_mutex; -struct mutex dev_ctx_lock; +spinlock_t dev_ctx_lock;struct workqueue_struct *encode_workqueue;int enc_irq;
drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c +3 -2
@@ -45,16 +45,17 @@ static void handle_enc_encode_msg(structstatic bool vpu_enc_check_ap_inst (struct mtk_vcodec_enc_dev *enc_dev,struct venc_vpu_inst *vpu) {struct mtk_vcodec_enc_ctx *ctx; +unsigned long flags;int ret = false; -mutex_lock (&enc_dev->dev_ctx_lock); +spin_lock_irqsave (&enc_dev->dev_ctx_lock, flags);list_for_each_entry (ctx, &enc_dev->ctx_list, list) {if (!IS_ERR_OR_NULL (ctx) && ctx->vpu_inst == vpu) { ret = true;break ; } } -mutex_unlock (&enc_dev->dev_ctx_lock); +spin_unlock_irqrestore (&enc_dev->dev_ctx_lock, flags);return ret; }
Greg Kroah-Hartman
maintainerPATCH 559/567 media: amphion: Add a frame flush mode for decoder
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Qian <[email protected]>
[ Upstream commit 9ea16ba6eaf93f25f61855751f71e2e701709ddf ]
By default the amphion decoder will pre-parse 3 frames before starting to decode the first frame. Alternatively, a block of flush padding data can be appended to the frame, which will ensure that the decoder can start decoding immediately after parsing the flush padding data, thus potentially reducing decoding latency.
This mode was previously only enabled, when the display delay was set to
0. Allow the user to manually toggle the use of that mode via a module parameter called low_latency, which enables the mode without changing the display order.
Stable-dep-of: 634c2cd17bd0 ("media: amphion: Remove vpu_vb_is_codecconfig")
--- drivers/media/platform/amphion/vpu_malone.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/media/platform/amphion/vpu_malone.c +13 -1
@@ -25,6 +25,10 @@#include "vpu_imx8q.h" #include "vpu_malone.h" +static bool low_latency; +module_param (low_latency, bool,0644 ); +MODULE_PARM_DESC (low_latency,"Set low latency frame flush mode: 0 (disable) or 1 (enable)" ); +#define CMD_SIZE 25600#define MSG_SIZE 25600#define CODEC_SIZE 0x1000
@@ -1562,7 +1566,15 @@ static int vpu_malone_input_frame_data(svpu_malone_update_wptr (str_buf, wptr); -if (disp_imm && !vpu_vb_is_codecconfig (vbuf)) { +/* +* Enable the low latency flush mode if display delay is set to 0 +* or the low latency frame flush mode if it is set to 1. +* The low latency flush mode requires some padding data to be appended to each frame, +* but there must not be any padding data between the sequence header and the frame. +* This module is currently only supported for the H264 and HEVC formats, +* for other formats, vpu_malone_add_scode() will return 0. +*/ +if ((disp_imm || low_latency) && !vpu_vb_is_codecconfig (vbuf)) { ret = vpu_malone_add_scode(inst->core->iface, inst->id, &inst->stream_buffer,
Greg Kroah-Hartman
maintainerPATCH 529/567 usbnet: Fix using smp_processor_id() in preemptible code warnings
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zqiang <[email protected]>
[ Upstream commit 327cd4b68b4398b6c24f10eb2b2533ffbfc10185 ]
Syzbot reported the following warning:
BUG: using smp_processor_id() in preemptible [00000000] code: dhcpcd/2879 caller is usbnet_skb_return+0x74/0x490 drivers/net/usb/usbnet.c:331 CPU: 1 UID: 0 PID: 2879 Comm: dhcpcd Not tainted 6.15.0-rc4-syzkaller-00098-g615dca38c2ea #0 PREEMPT(voluntary) Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 check_preemption_disabled+0xd0/0xe0 lib/smp_processor_id.c:49 usbnet_skb_return+0x74/0x490 drivers/net/usb/usbnet.c:331 usbnet_resume_rx+0x4b/0x170 drivers/net/usb/usbnet.c:708 usbnet_change_mtu+0x1be/0x220 drivers/net/usb/usbnet.c:417 __dev_set_mtu net/core/dev.c:9443 [inline] netif_set_mtu_ext+0x369/0x5c0 net/core/dev.c:9496 netif_set_mtu+0xb0/0x160 net/core/dev.c:9520 dev_set_mtu+0xae/0x170 net/core/dev_api.c:247 dev_ifsioc+0xa31/0x18d0 net/core/dev_ioctl.c:572 dev_ioctl+0x223/0x10e0 net/core/dev_ioctl.c:821 sock_do_ioctl+0x19d/0x280 net/socket.c:1204 sock_ioctl+0x42f/0x6a0 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0x190/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f
For historical and portability reasons, the netif_rx() is usually run in the softirq or interrupt context, this commit therefore add local_bh_disable/enable() protection in the usbnet_resume_rx().
[Harshit: Resolved conflicts due to missing commit: 2c04d279e857 ("net:
usb: Convert tasklet API to new bottom half workqueue mechanism") in 6.12.y]
--- drivers/net/usb/usbnet.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/usb/usbnet.c +2 -0
@@ -702,6 +702,7 @@ void usbnet_resume_rx(struct usbnet *devstruct sk_buff *skb;int num =0 ; +local_bh_disable ();clear_bit (EVENT_RX_PAUSED , &dev->flags);while ((skb =skb_dequeue (&dev->rxq_pause)) !=NULL ) {
@@ -710,6 +711,7 @@ void usbnet_resume_rx(struct usbnet *dev }tasklet_schedule (&dev->bh); +local_bh_enable ();netif_dbg (dev, rx_status, dev->net,"paused rx queue disabled, %d skbs requeued\n" , num);
Greg Kroah-Hartman
maintainerPATCH 530/567 serial: core: Fix serial device initialization
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Stein <[email protected]>
commit f54151148b969fb4b62bec8093d255306d20df30 upstream.
During restoring sysfs fwnode information the information of_node_reused was dropped. This was previously set by device_set_of_node_from_dev(). Add it back manually
--- drivers/tty/serial/serial_base_bus.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serial/serial_base_bus.c +1 -0
@@ -74,6 +74,7 @@ static int serial_base_device_init(struc dev->parent = parent_dev; dev->bus = &serial_base_bus_type; dev->release = release; + dev->of_node_reused = true;device_set_node (dev,fwnode_handle_get (dev_fwnode (parent_dev)));
Greg Kroah-Hartman
maintainerPATCH 531/567 tty: fix tty_port_tty_*hangup() kernel-doc
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Slaby (SUSE) <[email protected]>
commit 6241b49540a65a6d5274fa938fd3eb4cbfe2e076 upstream.
The commit below added a new helper, but omitted to move (and add) the corressponding kernel-doc. Do it now.
--- Documentation/driver-api/tty/tty_port.rst | 5 +++-- drivers/tty/tty_port.c | 5 ----- include/linux/tty_port.h | 9 +++++++++ 3 files changed, 12 insertions(+), 7 deletions(-)
Documentation/driver-api/tty/tty_port.rst +3 -2
@@ -42,9 +42,10 @@ TTY Refcounting TTY Helpers ----------- +.. kernel-doc:: include/linux/tty_port.h + :identifiers: tty_port_tty_hangup tty_port_tty_vhangup .. kernel-doc:: drivers/tty/tty_port.c - :identifiers: tty_port_tty_hangup tty_port_tty_wakeup - + :identifiers: tty_port_tty_wakeup Modem Signals -------------
drivers/tty/tty_port.c +0 -5
@@ -411,11 +411,6 @@ void tty_port_hangup(struct tty_port *po }EXPORT_SYMBOL (tty_port_hangup); -/** -* tty_port_tty_hangup - helper to hang up a tty -* @port: tty port -* @check_clocal: hang only ttys with %CLOCAL unset? -*/ void __tty_port_tty_hangup (struct tty_port *port,bool check_clocal,bool async) {struct tty_struct *tty =tty_port_tty_get (port);
include/linux/tty_port.h +9 -0
@@ -254,11 +254,20 @@ static inline int tty_port_users(structreturn port->count + port->blocked_open; } +/** +* tty_port_tty_hangup - helper to hang up a tty asynchronously +* @port: tty port +* @check_clocal: hang only ttys with %CLOCAL unset? +*/ static inline void tty_port_tty_hangup (struct tty_port *port,bool check_clocal) {__tty_port_tty_hangup (port, check_clocal, true); } +/** +* tty_port_tty_vhangup - helper to hang up a tty synchronously +* @port: tty port +*/ static inline void tty_port_tty_vhangup (struct tty_port *port) {__tty_port_tty_hangup (port, false, false);
Greg Kroah-Hartman
maintainerPATCH 532/567 x86/microcode/AMD: Select which microcode patch to load
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Borislav Petkov (AMD) <[email protected]>
commit 8d171045069c804e5ffaa18be590c42c6af0cf3f upstream.
All microcode patches up to the proper BIOS Entrysign fix are loaded only after the sha256 signature carried in the driver has been verified.
Microcode patches after the Entrysign fix has been applied, do not need that signature verification anymore.
In order to not abandon machines which haven't received the BIOS update yet, add the capability to select which microcode patch to load.
The corresponding microcode container supplied through firmware-linux has been modified to carry two patches per CPU type (family/model/stepping) so that the proper one gets selected.
--- arch/x86/kernel/cpu/microcode/amd.c | 104 +++++++++++++++++++++++------------- 1 file changed, 67 insertions(+), 37 deletions(-)
arch/x86/kernel/cpu/microcode/amd.c +67 -37
@@ -174,50 +174,61 @@ static u32 cpuid_to_ucode_rev(unsigned ireturn p.ucode_rev; } +static u32 get_cutoff_revision (u32 rev) +{ +switch (rev >>8 ) { +case 0x80012 :return 0x8001277 ;break ; +case 0x80082 :return 0x800820f ;break ; +case 0x83010 :return 0x830107c ;break ; +case 0x86001 :return 0x860010e ;break ; +case 0x86081 :return 0x8608108 ;break ; +case 0x87010 :return 0x8701034 ;break ; +case 0x8a000 :return 0x8a0000a ;break ; +case 0xa0010 :return 0xa00107a ;break ; +case 0xa0011 :return 0xa0011da ;break ; +case 0xa0012 :return 0xa001243 ;break ; +case 0xa0082 :return 0xa00820e ;break ; +case 0xa1011 :return 0xa101153 ;break ; +case 0xa1012 :return 0xa10124e ;break ; +case 0xa1081 :return 0xa108109 ;break ; +case 0xa2010 :return 0xa20102f ;break ; +case 0xa2012 :return 0xa201212 ;break ; +case 0xa4041 :return 0xa404109 ;break ; +case 0xa5000 :return 0xa500013 ;break ; +case 0xa6012 :return 0xa60120a ;break ; +case 0xa7041 :return 0xa704109 ;break ; +case 0xa7052 :return 0xa705208 ;break ; +case 0xa7080 :return 0xa708009 ;break ; +case 0xa70c0 :return 0xa70C009 ;break ; +case 0xaa001 :return 0xaa00116 ;break ; +case 0xaa002 :return 0xaa00218 ;break ; +case 0xb0021 :return 0xb002146 ;break ; +case 0xb0081 :return 0xb008111 ;break ; +case 0xb1010 :return 0xb101046 ;break ; +case 0xb2040 :return 0xb204031 ;break ; +case 0xb4040 :return 0xb404031 ;break ; +case 0xb4041 :return 0xb404101 ;break ; +case 0xb6000 :return 0xb600031 ;break ; +case 0xb6080 :return 0xb608031 ;break ; +case 0xb7000 :return 0xb700031 ;break ; +default :break ; + + } +return 0 ; +} +static bool need_sha_check (u32 cur_rev) { +u32 cutoff; +if (!cur_rev) { cur_rev =cpuid_to_ucode_rev (bsp_cpuid_1_eax);pr_info_once ("No current revision, generating the lowest one: 0x%x\n" , cur_rev); } -switch (cur_rev >>8 ) { -case 0x80012 :return cur_rev <=0x8001277 ;break ; -case 0x80082 :return cur_rev <=0x800820f ;break ; -case 0x83010 :return cur_rev <=0x830107c ;break ; -case 0x86001 :return cur_rev <=0x860010e ;break ; -case 0x86081 :return cur_rev <=0x8608108 ;break ; -case 0x87010 :return cur_rev <=0x8701034 ;break ; -case 0x8a000 :return cur_rev <=0x8a0000a ;break ; -case 0xa0010 :return cur_rev <=0xa00107a ;break ; -case 0xa0011 :return cur_rev <=0xa0011da ;break ; -case 0xa0012 :return cur_rev <=0xa001243 ;break ; -case 0xa0082 :return cur_rev <=0xa00820e ;break ; -case 0xa1011 :return cur_rev <=0xa101153 ;break ; -case 0xa1012 :return cur_rev <=0xa10124e ;break ; -case 0xa1081 :return cur_rev <=0xa108109 ;break ; -case 0xa2010 :return cur_rev <=0xa20102f ;break ; -case 0xa2012 :return cur_rev <=0xa201212 ;break ; -case 0xa4041 :return cur_rev <=0xa404109 ;break ; -case 0xa5000 :return cur_rev <=0xa500013 ;break ; -case 0xa6012 :return cur_rev <=0xa60120a ;break ; -case 0xa7041 :return cur_rev <=0xa704109 ;break ; -case 0xa7052 :return cur_rev <=0xa705208 ;break ; -case 0xa7080 :return cur_rev <=0xa708009 ;break ; -case 0xa70c0 :return cur_rev <=0xa70C009 ;break ; -case 0xaa001 :return cur_rev <=0xaa00116 ;break ; -case 0xaa002 :return cur_rev <=0xaa00218 ;break ; -case 0xb0021 :return cur_rev <=0xb002146 ;break ; -case 0xb0081 :return cur_rev <=0xb008111 ;break ; -case 0xb1010 :return cur_rev <=0xb101046 ;break ; -case 0xb2040 :return cur_rev <=0xb204031 ;break ; -case 0xb4040 :return cur_rev <=0xb404031 ;break ; -case 0xb4041 :return cur_rev <=0xb404101 ;break ; -case 0xb6000 :return cur_rev <=0xb600031 ;break ; -case 0xb6080 :return cur_rev <=0xb608031 ;break ; -case 0xb7000 :return cur_rev <=0xb700031 ;break ; -default :break ; - } + cutoff =get_cutoff_revision (cur_rev); +if (cutoff) +return cur_rev <= cutoff;pr_info ("You should not be seeing this. Please send the following couple of lines to x86-<at>-kernel.org\n" );pr_info ("CPUID(1).EAX: 0x%x, current revision: 0x%x\n" , bsp_cpuid_1_eax, cur_rev);
@@ -468,6 +479,7 @@ static int verify_patch(const u8 *buf, s {u8 family =x86_family (bsp_cpuid_1_eax);struct microcode_header_amd *mc_hdr; +u32 cur_rev, cutoff, patch_rev;unsigned int ret;u32 sh_psize;u16 proc_id;
@@ -511,6 +523,24 @@ static int verify_patch(const u8 *buf, sif (patch_fam != family)return 1 ; + cur_rev =get_patch_level (); + +/* No cutoff revision means old/unaffected by signing algorithm weakness => matches */ + cutoff =get_cutoff_revision (cur_rev); +if (!cutoff) + goto ok; + + patch_rev = mc_hdr->patch_id; + +if (cur_rev <= cutoff && patch_rev <= cutoff) + goto ok; + +if (cur_rev > cutoff && patch_rev > cutoff) + goto ok; + +return 1 ; +ok: +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 533/567 media: i2c: imx219: Fix 1920x1080 mode to use 1:1 pixel aspect ratio
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Stevenson <[email protected]>
commit 9ef6e4db152c34580cc52792f32485c193945395 upstream.
Commit 0af46fbc333d ("media: i2c: imx219: Calculate crop rectangle dynamically") meant that the 1920x1080 mode switched from using no binning to using vertical binning but no horizontal binning, which resulted in stretched pixels.
Until proper controls are available to independently select horizontal and vertical binning, restore the original 1:1 pixel aspect ratio by forcing binning to be uniform in both directions.
--- drivers/media/i2c/imx219.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/media/i2c/imx219.c +6 -3
@@ -843,7 +843,7 @@ static int imx219_set_pad_format(structconst struct imx219_mode *mode;struct v4l2_mbus_framefmt *format;struct v4l2_rect *crop; -unsigned int bin_h, bin_v; +unsigned int bin_h, bin_v, binning; mode = v4l2_find_nearest_size(supported_modes, ARRAY_SIZE(supported_modes),
@@ -862,9 +862,12 @@ static int imx219_set_pad_format(struct bin_h =min (IMX219_PIXEL_ARRAY_WIDTH / format->width,2U ); bin_v =min (IMX219_PIXEL_ARRAY_HEIGHT / format->height,2U ); +/* Ensure bin_h and bin_v are same to avoid 1:2 or 2:1 stretching */ + binning =min (bin_h, bin_v); + crop =v4l2_subdev_state_get_crop (state,0 ); - crop->width = format->width * bin_h; - crop->height = format->height * bin_v; + crop->width = format->width * binning; + crop->height = format->height * binning; crop->left = (IMX219_NATIVE_WIDTH - crop->width) /2 ; crop->top = (IMX219_NATIVE_HEIGHT - crop->height) /2 ;
Greg Kroah-Hartman
maintainerPATCH 534/567 wifi: mt76: mt7925: fix the unfinished command of regd_notifier before suspend
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quan Zhou <[email protected]>
[ Upstream commit 1b97fc8443aea01922560de9f24a6383e6eb6ae8 ]
Before entering suspend, we need to ensure that all MCU command are completed. In some cases, such as with regd_notifier, there is a chance that CLC commands, will be executed before suspend.
--- drivers/net/wireless/mediatek/mt76/mt7925/init.c | 4 ++++ drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 3 +++ 2 files changed, 7 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7925/init.c +4 -0
@@ -81,11 +81,14 @@ mt7925_regd_notifier(struct wiphy *wiphy mdev->region = req->dfs_region; dev->country_ie_env = req->country_ie_env; + dev->regd_in_progress = true;mt792x_mutex_acquire (dev);mt7925_mcu_set_clc (dev, req->alpha2, req->country_ie_env);mt7925_mcu_set_channel_domain (hw->priv);mt7925_set_tx_sar_pwr (hw,NULL );mt792x_mutex_release (dev); + dev->regd_in_progress = false; +wake_up (&dev->wait); }static void mt7925_mac_init_basic_rates (struct mt792x_dev *dev)
@@ -235,6 +238,7 @@ int mt7925_register_device(struct mt792xspin_lock_init (&dev->pm.wake.lock);mutex_init (&dev->pm.mutex);init_waitqueue_head (&dev->pm.wait); +init_waitqueue_head (&dev->wait);spin_lock_init (&dev->pm.txq_lock);INIT_DELAYED_WORK (&dev->mphy.mac_work, mt792x_mac_work);INIT_DELAYED_WORK (&dev->phy.scan_work, mt7925_scan_work);
drivers/net/wireless/mediatek/mt76/mt7925/pci.c +3 -0
@@ -455,6 +455,9 @@ static int mt7925_pci_suspend(struct devif (err <0 ) goto restore_suspend; +wait_event_timeout (dev->wait, + !dev->regd_in_progress,5 *HZ ); +/* always enable deep sleep during suspend to reduce * power consumption */
Greg Kroah-Hartman
maintainerPATCH 525/567 drm/panthor: Flush shmem writes before mapping buffers CPU-uncached
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris Brezillon <[email protected]>
[ Upstream commit 576c930e5e7dcb937648490611a83f1bf0171048 ]
The shmem layer zeroes out the new pages using cached mappings, and if we don't CPU-flush we might leave dirty cachelines behind, leading to potential data leaks and/or asynchronous buffer corruption when dirty cachelines are evicted.
[Harshit: Resolve conflicts due to missing commit: fe69a3918084 ("drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code") in 6.12.y]
--- drivers/gpu/drm/panthor/panthor_gem.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/gpu/drm/panthor/panthor_gem.c +18 -0
@@ -214,6 +214,23 @@ panthor_gem_create_with_handle(struct dr bo->base.base.resv = bo->exclusive_vm_root_gem->resv; } +/* If this is a write-combine mapping, we query the sgt to force a CPU +* cache flush (dma_map_sgtable() is called when the sgt is created). +* This ensures the zero-ing is visible to any uncached mapping created +* by vmap/mmap. +* FIXME: Ideally this should be done when pages are allocated, not at +* BO creation time. +*/ +if (shmem->map_wc) { +struct sg_table *sgt; + + sgt =drm_gem_shmem_get_pages_sgt (shmem); +if (IS_ERR (sgt)) { + ret =PTR_ERR (sgt); + goto out_put_gem; + } + } +/* * Allocate an id of idr table where the obj is registered * and handle has the id what user can see.
@@ -222,6 +239,7 @@ panthor_gem_create_with_handle(struct drif (!ret) *size = bo->base.base.size; +out_put_gem:/* drop reference from allocate - handle holds it now. */ drm_gem_object_put (&shmem->base);
Greg Kroah-Hartman
maintainerPATCH 561/567 media: amphion: Remove vpu_vb_is_codecconfig
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Qian <[email protected]>
[ Upstream commit 634c2cd17bd021487c57b95973bddb14be8002ff ]
Currently the function vpu_vb_is_codecconfig() always returns 0. Delete it and its related code.
--- drivers/media/platform/amphion/vpu_malone.c | 23 +++-------------------- drivers/media/platform/amphion/vpu_v4l2.c | 10 ---------- drivers/media/platform/amphion/vpu_v4l2.h | 10 ---------- 3 files changed, 3 insertions(+), 40 deletions(-)
drivers/media/platform/amphion/vpu_malone.c +3 -20
@@ -1315,22 +1315,18 @@ static int vpu_malone_insert_scode_vc1_g {if (!scode->inst->total_input_count)return 0 ; -if (vpu_vb_is_codecconfig (to_vb2_v4l2_buffer (scode->vb))) - scode->need_data =0 ;return 0 ; }static int vpu_malone_insert_scode_vc1_g_pic (struct malone_scode_t *scode) { -struct vb2_v4l2_buffer *vbuf;u8 nal_hdr[MALONE_VC1_NAL_HEADER_LEN ];u32 *data =NULL ;int ret; - vbuf =to_vb2_v4l2_buffer (scode->vb); data =vb2_plane_vaddr (scode->vb,0 ); -if (scode->inst->total_input_count ==0 ||vpu_vb_is_codecconfig (vbuf)) +if (scode->inst->total_input_count ==0 )return 0 ;if (MALONE_VC1_CONTAIN_NAL (*data))return 0 ;
@@ -1351,8 +1347,6 @@ static int vpu_malone_insert_scode_vc1_lint size =0 ;u8 rcv_seqhdr[MALONE_VC1_RCV_SEQ_HEADER_LEN ]; -if (vpu_vb_is_codecconfig (to_vb2_v4l2_buffer (scode->vb))) - scode->need_data =0 ;if (scode->inst->total_input_count)return 0 ; scode->need_data =0 ;
@@ -1538,7 +1532,7 @@ static int vpu_malone_input_frame_data(s scode.vb = vb; scode.wptr = wptr; scode.need_data =1 ; -if (vbuf->sequence ==0 ||vpu_vb_is_codecconfig (vbuf)) +if (vbuf->sequence ==0 ) ret =vpu_malone_insert_scode (&scode,SCODE_SEQUENCE );if (ret <0 )
@@ -1574,7 +1568,7 @@ static int vpu_malone_input_frame_data(s* This module is currently only supported for the H264 and HEVC formats, * for other formats, vpu_malone_add_scode() will return 0. */ -if ((disp_imm || low_latency) && !vpu_vb_is_codecconfig (vbuf)) { +if (disp_imm || low_latency) { ret = vpu_malone_add_scode(inst->core->iface, inst->id, &inst->stream_buffer,
@@ -1621,7 +1615,6 @@ int vpu_malone_input_frame(struct vpu_sh struct vpu_inst *inst, struct vb2_buffer *vb) { struct vpu_dec_ctrl *hc = shared->priv; -struct vb2_v4l2_buffer *vbuf;struct vpu_malone_str_buffer __iomem *str_buf = hc->str_buf[inst->id];u32 disp_imm = hc->codec_param[inst->id].disp_imm;u32 size;
@@ -1635,16 +1628,6 @@ int vpu_malone_input_frame(struct vpu_shreturn ret; size = ret; -/* -* if buffer only contain codec data, and the timestamp is invalid, -* don't put the invalid timestamp to resync -* merge the data to next frame -*/ - vbuf =to_vb2_v4l2_buffer (vb); -if (vpu_vb_is_codecconfig (vbuf)) { - inst->extra_size += size; -return 0 ; - }if (inst->extra_size) { size += inst->extra_size; inst->extra_size =0 ;
drivers/media/platform/amphion/vpu_v4l2.c +0 -10
@@ -349,16 +349,6 @@ struct vb2_v4l2_buffer *vpu_next_src_bufif (!src_buf ||vpu_get_buffer_state (src_buf) ==VPU_BUF_STATE_IDLE )return NULL ; -while (vpu_vb_is_codecconfig (src_buf)) { -v4l2_m2m_src_buf_remove (inst->fh.m2m_ctx); -vpu_set_buffer_state (src_buf,VPU_BUF_STATE_IDLE ); -v4l2_m2m_buf_done (src_buf,VB2_BUF_STATE_DONE ); - - src_buf =v4l2_m2m_next_src_buf (inst->fh.m2m_ctx); -if (!src_buf ||vpu_get_buffer_state (src_buf) ==VPU_BUF_STATE_IDLE ) -return NULL ; - } -return src_buf; }
drivers/media/platform/amphion/vpu_v4l2.h +0 -10
@@ -39,14 +39,4 @@ static inline struct vpu_format *vpu_get else return &inst->cap_format; } - -static inline int vpu_vb_is_codecconfig (struct vb2_v4l2_buffer *vbuf) -{ -#ifdef V4L2_BUF_FLAG_CODECCONFIG -return (vbuf->flags &V4L2_BUF_FLAG_CODECCONFIG ) ?1 :0 ; -#else -return 0 ; -#endif -} -#endif
Greg Kroah-Hartman
maintainerPATCH 562/567 vfio/pci: Disable qword access to the PCI ROM bar
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kevin Tian <[email protected]>
[ Upstream commit dc85a46928c41423ad89869baf05a589e2975575 ]
Commit 2b938e3db335 ("vfio/pci: Enable iowrite64 and ioread64 for vfio pci") enables qword access to the PCI bar resources. However certain devices (e.g. Intel X710) are observed with problem upon qword accesses to the rom bar, e.g. triggering PCI aer errors.
This is triggered by Qemu which caches the rom content by simply does a pread() of the remaining size until it gets the full contents. The other bars would only perform operations at the same access width as their guest drivers.
Instead of trying to identify all broken devices, universally disable qword access to the rom bar i.e. going back to the old way which worked reliably for years.
--- drivers/vfio/pci/nvgrace-gpu/main.c | 4 ++-- drivers/vfio/pci/vfio_pci_rdwr.c | 24 ++++++++++++++++++------ include/linux/vfio_pci_core.h | 10 +++++++++- 3 files changed, 29 insertions(+), 9 deletions(-)
drivers/vfio/pci/nvgrace-gpu/main.c +2 -2
@@ -482,7 +482,7 @@ nvgrace_gpu_map_and_read(struct nvgrace_ ret =vfio_pci_core_do_io_rw (&nvdev->core_device, false, nvdev->resmem.ioaddr, buf, offset, mem_count, -0 ,0 , false); +0 ,0 , false,VFIO_PCI_IO_WIDTH_8 ); }return ret;
@@ -600,7 +600,7 @@ nvgrace_gpu_map_and_write(struct nvgrace ret =vfio_pci_core_do_io_rw (&nvdev->core_device, false, nvdev->resmem.ioaddr, (char __user *)buf, pos, mem_count, -0 ,0 , true); +0 ,0 , true,VFIO_PCI_IO_WIDTH_8 ); }return ret;
drivers/vfio/pci/vfio_pci_rdwr.c +18 -6
@@ -141,7 +141,8 @@ VFIO_IORDWR(64)ssize_t vfio_pci_core_do_io_rw (struct vfio_pci_core_device *vdev,bool test_mem,void __iomem *io,char __user *buf,loff_t off,size_t count,size_t x_start, -size_t x_end,bool iswrite) +size_t x_end,bool iswrite, +enum vfio_pci_io_width max_width) {ssize_t done =0 ;int ret;
@@ -157,7 +158,7 @@ ssize_t vfio_pci_core_do_io_rw(struct vf fillable =0 ;#if defined(ioread64) && defined(iowrite64) -if (fillable >=8 && !(off %8 )) { +if (fillable >=8 && !(off %8 ) && max_width >=8 ) { ret =vfio_pci_iordwr64 (vdev, iswrite, test_mem, io, buf, off, &filled);if (ret)
@@ -165,13 +166,13 @@ ssize_t vfio_pci_core_do_io_rw(struct vf } else#endif -if (fillable >=4 && !(off %4 )) { +if (fillable >=4 && !(off %4 ) && max_width >=4 ) { ret =vfio_pci_iordwr32 (vdev, iswrite, test_mem, io, buf, off, &filled);if (ret)return ret; - }else if (fillable >=2 && !(off %2 )) { + }else if (fillable >=2 && !(off %2 ) && max_width >=2 ) { ret =vfio_pci_iordwr16 (vdev, iswrite, test_mem, io, buf, off, &filled);if (ret)
@@ -242,6 +243,7 @@ ssize_t vfio_pci_bar_rw(struct vfio_pci_void __iomem *io;struct resource *res = &vdev->pdev->resource[bar];ssize_t done; +enum vfio_pci_io_width max_width =VFIO_PCI_IO_WIDTH_8 ;if (pci_resource_start (pdev, bar)) end =pci_resource_len (pdev, bar);
@@ -268,6 +270,16 @@ ssize_t vfio_pci_bar_rw(struct vfio_pci_ goto out; } x_end = end; + +/* +* Certain devices (e.g. Intel X710) don't support qword +* access to the ROM bar. Otherwise PCI AER errors might be +* triggered. +* +* Disable qword access to the ROM bar universally, which +* worked reliably for years before qword access is enabled. +*/ + max_width =VFIO_PCI_IO_WIDTH_4 ; }else {int ret =vfio_pci_core_setup_barmap (vdev, bar);if (ret) {
@@ -284,7 +296,7 @@ ssize_t vfio_pci_bar_rw(struct vfio_pci_ } done =vfio_pci_core_do_io_rw (vdev, res->flags &IORESOURCE_MEM , io, buf, pos, - count, x_start, x_end, iswrite); + count, x_start, x_end, iswrite, max_width);if (done >=0 ) *ppos += done;
@@ -353,7 +365,7 @@ ssize_t vfio_pci_vga_rw(struct vfio_pci_* to the memory enable bit in the command register. */ done =vfio_pci_core_do_io_rw (vdev, false, iomem, buf, off, count, -0 ,0 , iswrite); +0 ,0 , iswrite,VFIO_PCI_IO_WIDTH_8 );vga_put (vdev->pdev, rsrc);
include/linux/vfio_pci_core.h +9 -1
@@ -102,6 +102,13 @@ struct vfio_pci_core_device {struct rw_semaphore memory_lock; }; +enum vfio_pci_io_width { +VFIO_PCI_IO_WIDTH_1 =1 , +VFIO_PCI_IO_WIDTH_2 =2 , +VFIO_PCI_IO_WIDTH_4 =4 , +VFIO_PCI_IO_WIDTH_8 =8 , +}; +/* Will be exported for vfio pci drivers usage */ int vfio_pci_core_register_dev_region(struct vfio_pci_core_device *vdev, unsigned int type, unsigned int subtype,
@@ -137,7 +144,8 @@ pci_ers_result_t vfio_pci_core_aer_err_dssize_t vfio_pci_core_do_io_rw (struct vfio_pci_core_device *vdev,bool test_mem,void __iomem *io,char __user *buf,loff_t off,size_t count,size_t x_start, -size_t x_end,bool iswrite); +size_t x_end,bool iswrite, +enum vfio_pci_io_width max_width); bool vfio_pci_core_range_intersect_range(loff_t buf_start, size_t buf_cnt, loff_t reg_start, size_t reg_cnt, loff_t *buf_offset,
Greg Kroah-Hartman
maintainerPATCH 563/567 mm/damon/tests/core-kunit: handle alloc failures on damon_test_split_regions_of()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SeongJae Park <[email protected]>
commit eded254cb69044bd4abde87394ea44909708d7c0 upstream.
damon_test_split_regions_of() is assuming all dynamic memory allocation in it will succeed. Those are indeed likely in the real use cases since those allocations are too small to fail, but theoretically those could fail. In the case, inappropriate memory access can happen. Fix it by appropriately cleanup pre-allocated memory and skip the execution of the remaining tests in the failure cases.
--- mm/damon/tests/core-kunit.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
mm/damon/tests/core-kunit.h +20 -0
@@ -278,15 +278,35 @@ static void damon_test_split_regions_of(struct damon_target *t;struct damon_region *r; +if (!c) +kunit_skip (test,"ctx alloc fail" ); t =damon_new_target (); +if (!t) { +damon_destroy_ctx (c); +kunit_skip (test,"target alloc fail" ); + } r =damon_new_region (0 ,22 ); +if (!r) { +damon_destroy_ctx (c); +damon_free_target (t); +kunit_skip (test,"region alloc fail" ); + }damon_add_region (r, t);damon_split_regions_of (t,2 );KUNIT_EXPECT_LE (test,damon_nr_regions (t),2u );damon_free_target (t); t =damon_new_target (); +if (!t) { +damon_destroy_ctx (c); +kunit_skip (test,"second target alloc fail" ); + } r =damon_new_region (0 ,220 ); +if (!r) { +damon_destroy_ctx (c); +damon_free_target (t); +kunit_skip (test,"second region alloc fail" ); + }damon_add_region (r, t);damon_split_regions_of (t,4 );KUNIT_EXPECT_LE (test,damon_nr_regions (t),4u );
Greg Kroah-Hartman
maintainerPATCH 564/567 mm/damon/tests/core-kunit: handle alloc failres in damon_test_new_filter()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SeongJae Park <[email protected]>
commit 28ab2265e9422ccd81e4beafc0ace90f78de04c4 upstream.
damon_test_new_filter() is assuming all dynamic memory allocation in it will succeed. Those are indeed likely in the real use cases since those allocations are too small to fail, but theoretically those could fail. In the case, inappropriate memory access can happen. Fix it by appropriately cleanup pre-allocated memory and skip the execution of the remaining tests in the failure cases.
--- mm/damon/tests/core-kunit.h | 2 ++ 1 file changed, 2 insertions(+)
mm/damon/tests/core-kunit.h +2 -0
@@ -505,6 +505,8 @@ static void damos_test_new_filter(structstruct damos_filter *filter; filter =damos_new_filter (DAMOS_FILTER_TYPE_ANON , true); +if (!filter) +kunit_skip (test,"filter alloc fail" );KUNIT_EXPECT_EQ (test, filter->type,DAMOS_FILTER_TYPE_ANON );KUNIT_EXPECT_EQ (test, filter->matching, true);KUNIT_EXPECT_PTR_EQ (test, filter->list.prev, &filter->list);
Greg Kroah-Hartman
maintainerPATCH 565/567 mm/damon/tests/vaddr-kunit: handle alloc failures on damon_do_test_apply_three_regions()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SeongJae Park <[email protected]>
commit 2b22d0fcc6320ba29b2122434c1d2f0785fb0a25 upstream.
damon_do_test_apply_three_regions() is assuming all dynamic memory allocation in it will succeed. Those are indeed likely in the real use cases since those allocations are too small to fail, but theoretically those could fail. In the case, inappropriate memory access can happen. Fix it by appropriately cleanup pre-allocated memory and skip the execution of the remaining tests in the failure cases.
--- mm/damon/tests/vaddr-kunit.h | 6 ++++++ 1 file changed, 6 insertions(+)
mm/damon/tests/vaddr-kunit.h +6 -0
@@ -136,8 +136,14 @@ static void damon_do_test_apply_three_reint i; t =damon_new_target (); +if (!t) +kunit_skip (test,"target alloc fail" );for (i =0 ; i < nr_regions /2 ; i++) { r =damon_new_region (regions[i *2 ], regions[i *2 +1 ]); +if (!r) { +damon_destroy_target (t); +kunit_skip (test,"region alloc fail" ); + }damon_add_region (r, t); }
Greg Kroah-Hartman
maintainerPATCH 566/567 iomap: allocate s_dio_done_wq for async reads as well
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <[email protected]>
commit 7fd8720dff2d9c70cf5a1a13b7513af01952ec02 upstream.
Since commit 222f2c7c6d14 ("iomap: always run error completions in user context"), read error completions are deferred to s_dio_done_wq. This means the workqueue also needs to be allocated for async reads.
--- fs/iomap/direct-io.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
fs/iomap/direct-io.c +5 -5
@@ -674,12 +674,12 @@ __iomap_dio_rw(struct kiocb *iocb, struc } goto out_free_dio; } + } -if (!wait_for_completion && !inode->i_sb->s_dio_done_wq) { - ret =sb_init_dio_done_wq (inode->i_sb); -if (ret <0 ) - goto out_free_dio; - } +if (!wait_for_completion && !inode->i_sb->s_dio_done_wq) { + ret =sb_init_dio_done_wq (inode->i_sb); +if (ret <0 ) + goto out_free_dio; }inode_dio_begin (inode);
Greg Kroah-Hartman
maintainerPATCH 567/567 block: fix NULL pointer dereference in blk_zone_reset_all_bio_endio()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Damien Le Moal <[email protected]>
commit c2b8d20628ca789640f64074a642f9440eefc623 upstream.
For zoned block devices that do not need zone write plugs (e.g. most device mapper devices that support zones), the disk hash table of zone write plugs is NULL. For such devices, blk_zone_reset_all_bio_endio() should not attempt to scan this has table as that causes a NULL pointer dereference.
Fix this by checking that the disk does have zone write plugs using the atomic counter. This is equivalent to checking for a non-NULL hash table but has the advantage to also speed up the execution of blk_zone_reset_all_bio_endio() for devices that do use zone write plugs but do not have any plug in the hash table (e.g. a disk with only full zones).
--- block/blk-zoned.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
block/blk-zoned.c +12 -9
@@ -746,17 +746,20 @@ static void blk_zone_reset_all_bio_endiounsigned long flags;unsigned int i; -/* Update the condition of all zone write plugs. */ -rcu_read_lock (); -for (i =0 ; i <disk_zone_wplugs_hash_size (disk); i++) { -hlist_for_each_entry_rcu (zwplug, &disk->zone_wplugs_hash[i], - node) { -spin_lock_irqsave (&zwplug->lock, flags); -disk_zone_wplug_set_wp_offset (disk, zwplug,0 ); -spin_unlock_irqrestore (&zwplug->lock, flags); +if (atomic_read (&disk->nr_zone_wplugs)) { +/* Update the condition of all zone write plugs. */ +rcu_read_lock (); +for (i =0 ; i <disk_zone_wplugs_hash_size (disk); i++) { +hlist_for_each_entry_rcu (zwplug, + &disk->zone_wplugs_hash[i], + node) { +spin_lock_irqsave (&zwplug->lock, flags); +disk_zone_wplug_set_wp_offset (disk, zwplug,0 ); +spin_unlock_irqrestore (&zwplug->lock, flags); + } } +rcu_read_unlock (); } -rcu_read_unlock (); }static void blk_zone_finish_bio_endio (struct bio *bio)
Greg Kroah-Hartman
maintainerPATCH 560/567 media: amphion: Make some vpu_v4l2 functions static
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laurent Pinchart <[email protected]>
[ Upstream commit 5d1e54bb4dc6741284a3ed587e994308ddee2f16 ]
Some functions defined in vpu_v4l2.c are never used outside of that compilation unit. Make them static.
Stable-dep-of: 634c2cd17bd0 ("media: amphion: Remove vpu_vb_is_codecconfig")
--- drivers/media/platform/amphion/vpu_v4l2.c | 12 +++++++++--- drivers/media/platform/amphion/vpu_v4l2.h | 8 -------- 2 files changed, 9 insertions(+), 11 deletions(-)
drivers/media/platform/amphion/vpu_v4l2.c +9 -3
@@ -24,6 +24,11 @@#include "vpu_msgs.h" #include "vpu_helpers.h" +static char *vpu_type_name (u32 type) +{ +return V4L2_TYPE_IS_OUTPUT (type) ?"output" :"capture" ; +} +void vpu_inst_lock (struct vpu_inst *inst) {mutex_lock (&inst->lock);
@@ -42,7 +47,7 @@ dma_addr_t vpu_get_vb_phy_addr(struct vb vb->planes[plane_no].data_offset; } -unsigned int vpu_get_vb_length (struct vb2_buffer *vb,u32 plane_no) +static unsigned int vpu_get_vb_length (struct vb2_buffer *vb,u32 plane_no) {if (plane_no >= vb->num_planes)return 0 ;
@@ -81,7 +86,7 @@ void vpu_v4l2_set_error(struct vpu_instvpu_inst_unlock (inst); } -int vpu_notify_eos (struct vpu_inst *inst) +static int vpu_notify_eos (struct vpu_inst *inst) {static const struct v4l2_event ev = { .id =0 ,
@@ -562,7 +567,8 @@ static void vpu_vb2_buf_finish(struct vbcall_void_vop (inst, on_queue_empty, q->type); } -void vpu_vb2_buffers_return (struct vpu_inst *inst,unsigned int type,enum vb2_buffer_state state) +static void vpu_vb2_buffers_return (struct vpu_inst *inst,unsigned int type, +enum vb2_buffer_state state) {struct vb2_v4l2_buffer *buf;
drivers/media/platform/amphion/vpu_v4l2.h +0 -8
@@ -26,15 +26,12 @@ void vpu_skip_frame(struct vpu_inst *insstruct vb2_v4l2_buffer *vpu_find_buf_by_sequence (struct vpu_inst *inst,u32 type,u32 sequence);struct vb2_v4l2_buffer *vpu_find_buf_by_idx (struct vpu_inst *inst,u32 type,u32 idx);void vpu_v4l2_set_error (struct vpu_inst *inst); -int vpu_notify_eos (struct vpu_inst *inst);int vpu_notify_source_change (struct vpu_inst *inst);int vpu_set_last_buffer_dequeued (struct vpu_inst *inst,bool eos); -void vpu_vb2_buffers_return (struct vpu_inst *inst,unsigned int type,enum vb2_buffer_state state);int vpu_get_num_buffers (struct vpu_inst *inst,u32 type);bool vpu_is_source_empty (struct vpu_inst *inst);dma_addr_t vpu_get_vb_phy_addr (struct vb2_buffer *vb,u32 plane_no); -unsigned int vpu_get_vb_length (struct vb2_buffer *vb,u32 plane_no);static inline struct vpu_format *vpu_get_format (struct vpu_inst *inst,u32 type) {if (V4L2_TYPE_IS_OUTPUT (type))
@@ -43,11 +40,6 @@ static inline struct vpu_format *vpu_getreturn &inst->cap_format; } -static inline char *vpu_type_name (u32 type) -{ -return V4L2_TYPE_IS_OUTPUT (type) ?"output" :"capture" ; -} -static inline int vpu_vb_is_codecconfig (struct vb2_v4l2_buffer *vbuf) {#ifdef V4L2_BUF_FLAG_CODECCONFIG
# Librecast Test Results
020/020 [ OK ] liblcrq
010/010 [ OK ] libmld
120/120 [ OK ] liblibrecast
CPU/kernel: Linux auntie 6.12.64-rc1-g98ddcf2ac4d1 #1 SMP PREEMPT_DYNAMIC Tue Jan 6 19:09:11 -00 2026 x86_64 AMD Ryzen 9 9950X 16-Core Processor AuthenticAMD GNU/Linux
Hi1
Quoted 4 lines
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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.
Could you update my email address? I'd like to keep testing and @denx.de address is no longer suitable.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.12.y
Thanks and best regards,
Pavel
Signature · 1 line
In cooperation with Nabla.
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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 Thu, 08 Jan 2026 17:03:16 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.64-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Re: [PATCH 6.12 493/567] xhci: dbgtty: fix device unregister: fixup
In reply to Greg Kroah-HartmanQuoted 29 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Łukasz Bartosik <[email protected]>
[ Upstream commit
74098cc06e753d3ffd8398b040a3a1dfb65260c0]This fixup replaces
tty_vhangup()call with call totty_port_tty_vhangup(). Both calls hangup tty device synchronously howevertty_port_tty_vhangup()increases reference count during the hangup operation usingscoped_guard(tty_port_tty).Cc stable <[email protected]>Fixes 1f73b8b56cf3 ("xhci: dbgtty: fix device unregister")Signed-off-by Łukasz Bartosik <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Signed-off-by Sasha Levin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/usb/host/xhci-dbgtty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-dbgtty.c static void xhci_dbc_tty_unregister_devi · line 525
Quoted 5 lines
drivers/usb/host/xhci-dbgtty.c +1
-1@@ -522,7 +522,7 @@ static void xhci_dbc_tty_unregister_devi* Hang up the TTY. This wakes up any blocked * writers and causes subsequent writes to fail. */ -tty_vhangup (port->port.tty); +tty_port_tty_vhangup (&port->port);
The function tty_port_tty_vhangup does not exist in the 6.12 kernel. It was added later.
I sent updated patch
https://lore.kernel.org/stable/[email protected]/T/#mb46d870145474d04aaabeccc76aaf949b34bbf86
Thanks,
Łukasz
Quoted 5 lines
drivers/usb/host/xhci-dbgtty.c +0
-0tty_unregister_device (dbc_tty_driver, port->minor);xhci_dbc_tty_exit_port (port);
Am 06.01.2026 um 17:56 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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.
Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.
Beste Grüße,
Peter Schneider
Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge, enjoy the air and behold the view. Climb it so you can see the world, not so the world can see you. -- David McCullough Jr. OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244 Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc https://keys.mailvelope.com/pks/lookup?op=get&[email protected] https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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 Thu, 08 Jan 2026 17:03:16 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.64-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.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:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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 Thu, 08 Jan 2026 17:03:16 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.64-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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.
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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.
Compiled and tested on
- Verdin AM62
- Verdin iMX8MP
- Toradex SMARC iMX8MP
Francesco
hello
Compiled and booted 6.12.64-rc1+
No typical new regressions from dmesg.
As per the dmidecode command.
Version: AMD Ryzen 3 3250U with Radeon Graphics
Processor Information
Socket Designation: FP5
Type: Central Processor
Family: Zen
Manufacturer: Advanced Micro Devices, Inc.
ID: 81 0F 81 00 FF FB 8B 17
Signature: Family 23, Model 24, Stepping 1
--
software engineer
rajagiri school of engineering and technology
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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 Thu, 08 Jan 2026 17:03:16 +0000. Anything received after that time might be too late.
No problems seen on x86_64 and aarch64 with our testing.
Thanks,
Harshit
Quoted 8 lines · On Tue, 06 Jan 2026 17:56:22 +0100 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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 Thu, 08 Jan 2026 17:03:16 +0000. Anything received after that time might be too late.
Boot-tested under QEMU for Rust x86_64, arm64 and riscv64; built-tested for loongarch64:
Thanks!
Cheers,
Miguel
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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 Thu, 08 Jan 2026 17:03:16 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.64-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
Builds successfully. Boots and works on qemu and Intel Core i7-10810U
Thanks,
Brett
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.12.64 release. There are 567 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 Thu, 08 Jan 2026 17:03:16 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.64-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.12.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.12:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
120 tests: 120 pass, 0 failLinux version: 6.12.64-rc1-g98ddcf2ac4d1
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Jon
The kernel, bpf tool, perf tool, and kselftest builds fine for v6.12.64-rc1 on x86 and arm64 Azure VM.
Thanks,
Hardik
Greg Kroah-Hartman
maintainerRe: [PATCH 6.12 493/567] xhci: dbgtty: fix device unregister: fixup
In reply to Łukasz BartosikQuoted 40 lines · Łukasz Bartosik
Quoted 29 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Łukasz Bartosik <[email protected]>
[ Upstream commit
74098cc06e753d3ffd8398b040a3a1dfb65260c0]This fixup replaces
tty_vhangup()call with call totty_port_tty_vhangup(). Both calls hangup tty device synchronously howevertty_port_tty_vhangup()increases reference count during the hangup operation usingscoped_guard(tty_port_tty).Cc stable <[email protected]>Fixes 1f73b8b56cf3 ("xhci: dbgtty: fix device unregister")Signed-off-by Łukasz Bartosik <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Signed-off-by Sasha Levin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/usb/host/xhci-dbgtty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/host/xhci-dbgtty.c static void xhci_dbc_tty_unregister_devi · line 525
Quoted 5 lines
drivers/usb/host/xhci-dbgtty.c +1
-1@@ -522,7 +522,7 @@ static void xhci_dbc_tty_unregister_devi* Hang up the TTY. This wakes up any blocked * writers and causes subsequent writes to fail. */ -tty_vhangup (port->port.tty); +tty_port_tty_vhangup (&port->port);The function
tty_port_tty_vhangupdoes not exist in the 6.12 kernel. It was added later.
Quoted 2 lines
I sent updated patch
https://lore.kernel.org/stable/[email protected]/T/#mb46d870145474d04aaabeccc76aaf949b34bbf86
The patch before this one added that new api, so all is fine here.
thanks,
greg k-h
Re: [PATCH 6.12 493/567] xhci: dbgtty: fix device unregister: fixup
Quoted 42 lines · Greg Kroah-Hartman
Quoted 40 lines · Łukasz Bartosik
Quoted 29 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Łukasz Bartosik <[email protected]>
[ Upstream commit
74098cc06e753d3ffd8398b040a3a1dfb65260c0]This fixup replaces
tty_vhangup()call with call totty_port_tty_vhangup(). Both calls hangup tty device synchronously howevertty_port_tty_vhangup()increases reference count during the hangup operation usingscoped_guard(tty_port_tty).Cc stable <[email protected]>Fixes 1f73b8b56cf3 ("xhci: dbgtty: fix device unregister")Signed-off-by Łukasz Bartosik <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Signed-off-by Sasha Levin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/usb/host/xhci-dbgtty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/host/xhci-dbgtty.c static void xhci_dbc_tty_unregister_devi · line 525
Quoted 5 lines
drivers/usb/host/xhci-dbgtty.c +1
-1@@ -522,7 +522,7 @@ static void xhci_dbc_tty_unregister_devi* Hang up the TTY. This wakes up any blocked * writers and causes subsequent writes to fail. */ -tty_vhangup (port->port.tty); +tty_port_tty_vhangup (&port->port);The function
tty_port_tty_vhangupdoes not exist in the 6.12 kernel. It was added later.
Quoted 5 lines
Quoted 2 lines
I sent updated patch
https://lore.kernel.org/stable/[email protected]/T/#mb46d870145474d04aaabeccc76aaf949b34bbf86The patch before this one added that new api, so all is fine here.
Thank you for pointing that out.
Thanks,
Łukasz
Quoted 3 lines
thanks,
greg k-h
Re: [PATCH 6.12 519/567] gpiolib: acpi: Move quirks to a separate file
In reply to Greg Kroah-HartmanQuoted 4 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
Quoted 8 lines
From: Andy Shevchenko <[email protected]>
[ Upstream commit
92dc572852ddcae687590cb159189004d58e382e]The
gpiolib-acpi.cis huge enough even without DMI quirks. Move them to a separate file for a better maintenance.No functional change intended.
[...]
However, this did cause some documentation breakage. Please cherry-pick commit ec0c0aab1524 ("gpiolib-acpi: Update file references in the Documentation and MAINTAINERS") to fix that.
Ben.
Signature · 2 lines
Ben Hutchings It's easier to fight for one's principles than to live up to them.
Greg Kroah-Hartman
maintainerRe: [PATCH 6.12 519/567] gpiolib: acpi: Move quirks to a separate file
Quoted 12 lines · Ben Hutchings
Quoted 11 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit
92dc572852ddcae687590cb159189004d58e382e]The
gpiolib-acpi.cis huge enough even without DMI quirks. Move them to a separate file for a better maintenance.
Quoted 6 lines
Quoted 1 line
No functional change intended.
[...]
However, this did cause some documentation breakage. Please cherry-pick commit
ec0c0aab1524("gpiolib-acpi: Update file references in the Documentation andMAINTAINERS") to fix that.
Thanks, the Fixes: tag in that commit is invalid, which is why I didn't see it to pick this up, nice catch!
greg k-h