From: Greg Kroah-Hartman Date: Tue, 8 Apr 2025 10:29:07 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v5.4.292~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f55e66849fd51c43164652b2162393fb91da5de;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: mm-slab-remove-duplicate-kernel-doc-comment-for-ksize.patch mmc-sdhci-brcmstb-use-clk_get_rate-base_clk-in-pm-resume.patch --- diff --git a/queue-5.15/mm-slab-remove-duplicate-kernel-doc-comment-for-ksize.patch b/queue-5.15/mm-slab-remove-duplicate-kernel-doc-comment-for-ksize.patch new file mode 100644 index 0000000000..cace3dcbd0 --- /dev/null +++ b/queue-5.15/mm-slab-remove-duplicate-kernel-doc-comment-for-ksize.patch @@ -0,0 +1,58 @@ +From c18c20f16219516b12a4f2fd29c25e06be97e064 Mon Sep 17 00:00:00 2001 +From: Vlastimil Babka +Date: Mon, 7 Nov 2022 17:11:27 +0100 +Subject: mm, slab: remove duplicate kernel-doc comment for ksize() + +From: Vlastimil Babka + +commit c18c20f16219516b12a4f2fd29c25e06be97e064 upstream. + +Akira reports: + +> "make htmldocs" reports duplicate C declaration of ksize() as follows: + +> /linux/Documentation/core-api/mm-api:43: ./mm/slab_common.c:1428: WARNING: Duplicate C declaration, also defined at core-api/mm-api:212. +> Declaration is '.. c:function:: size_t ksize (const void *objp)'. + +> This is due to the kernel-doc comment for ksize() declaration added in +> include/linux/slab.h by commit 05a940656e1e ("slab: Introduce +> kmalloc_size_roundup()"). + +There is an older kernel-doc comment for ksize() definition in +mm/slab_common.c, which is not only duplicated, but also contradicts the +new one - the additional storage discovered by ksize() should not be +used by callers anymore. Delete the old kernel-doc. + +Reported-by: Akira Yokosawa +Link: https://lore.kernel.org/all/d33440f6-40cf-9747-3340-e54ffaf7afb8@gmail.com/ +Fixes: 05a940656e1e ("slab: Introduce kmalloc_size_roundup()") +Cc: Kees Cook +Signed-off-by: Vlastimil Babka +Signed-off-by: Greg Kroah-Hartman +--- + mm/slab_common.c | 14 -------------- + 1 file changed, 14 deletions(-) + +--- a/mm/slab_common.c ++++ b/mm/slab_common.c +@@ -1305,20 +1305,6 @@ void kfree_sensitive(const void *p) + } + EXPORT_SYMBOL(kfree_sensitive); + +-/** +- * ksize - get the actual amount of memory allocated for a given object +- * @objp: Pointer to the object +- * +- * kmalloc may internally round up allocations and return more memory +- * than requested. ksize() can be used to determine the actual amount of +- * memory allocated. The caller may use this additional memory, even though +- * a smaller amount of memory was initially specified with the kmalloc call. +- * The caller must guarantee that objp points to a valid object previously +- * allocated with either kmalloc() or kmem_cache_alloc(). The object +- * must not be freed during the duration of the call. +- * +- * Return: size of the actual memory used by @objp in bytes +- */ + size_t ksize(const void *objp) + { + size_t size; diff --git a/queue-5.15/mmc-sdhci-brcmstb-use-clk_get_rate-base_clk-in-pm-resume.patch b/queue-5.15/mmc-sdhci-brcmstb-use-clk_get_rate-base_clk-in-pm-resume.patch new file mode 100644 index 0000000000..b49d900252 --- /dev/null +++ b/queue-5.15/mmc-sdhci-brcmstb-use-clk_get_rate-base_clk-in-pm-resume.patch @@ -0,0 +1,42 @@ +From 886201c70a1cab34ef96f867c2b2dd6379ffa7b9 Mon Sep 17 00:00:00 2001 +From: Kamal Dasu +Date: Thu, 14 Jul 2022 13:41:32 -0400 +Subject: mmc: sdhci-brcmstb: use clk_get_rate(base_clk) in PM resume + +From: Kamal Dasu + +commit 886201c70a1cab34ef96f867c2b2dd6379ffa7b9 upstream. + +Use clk_get_rate for base_clk on resume before setting new rate. +This change ensures that the clock api returns current rate +and sets the clock to the desired rate and honors CLK_GET_NO_CACHE +attribute used by clock api. + +Fixes: 97904a59855c (mmc: sdhci-brcmstb: Add ability to increase max clock rate for 72116b0) +Signed-off-by: Kamal Dasu +Acked-by: Florian Fainelli +Link: https://lore.kernel.org/r/20220714174132.18541-1-kdasu.kdev@gmail.com +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/sdhci-brcmstb.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/mmc/host/sdhci-brcmstb.c ++++ b/drivers/mmc/host/sdhci-brcmstb.c +@@ -414,7 +414,14 @@ static int sdhci_brcmstb_resume(struct d + ret = sdhci_pltfm_resume(dev); + if (!ret && priv->base_freq_hz) { + ret = clk_prepare_enable(priv->base_clk); +- if (!ret) ++ /* ++ * Note: using clk_get_rate() below as clk_get_rate() ++ * honors CLK_GET_RATE_NOCACHE attribute, but clk_set_rate() ++ * may do implicit get_rate() calls that do not honor ++ * CLK_GET_RATE_NOCACHE. ++ */ ++ if (!ret && ++ (clk_get_rate(priv->base_clk) != priv->base_freq_hz)) + ret = clk_set_rate(priv->base_clk, priv->base_freq_hz); + } + diff --git a/queue-5.15/series b/queue-5.15/series index ae6cec8d8b..fdc2df0b27 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -275,3 +275,5 @@ jfs-fix-slab-out-of-bounds-read-in-ea_get.patch jfs-add-index-corruption-check-to-dt_getpage.patch nfsd-put-dl_stid-if-fail-to-queue-dl_recall.patch nfsd-skip-sending-cb_recall_any-when-the-backchannel-isn-t-up.patch +mmc-sdhci-brcmstb-use-clk_get_rate-base_clk-in-pm-resume.patch +mm-slab-remove-duplicate-kernel-doc-comment-for-ksize.patch