[PATCH OLK-6.6 0/1] backport soc cache patches from linux mainline
From: Hongye Lin <linhongye@h-partners.com> driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9262 ---------------------------------------------------------------------- Yushan Wang (1): soc cache: Fix unsafe shift left .../soc/hisilicon/hisi_soc_cache_framework.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- 2.33.0
driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9262 ---------------------------------------------------------------------- Width of instant number is default to 32, shift left with theoretically max order (bigger than 32) may make the number overflow. Change the declaration of the number to unsigned long, aligning with the parameter type declaration of the funcion. Signed-off-by: Yushan Wang <wangyushan12@huawei.com> Signed-off-by: Hongye Lin <linhongye@h-partners.com> --- drivers/soc/hisilicon/hisi_soc_cache_framework.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/hisilicon/hisi_soc_cache_framework.c b/drivers/soc/hisilicon/hisi_soc_cache_framework.c index e4a8d597449a..b7e489b8c12b 100644 --- a/drivers/soc/hisilicon/hisi_soc_cache_framework.c +++ b/drivers/soc/hisilicon/hisi_soc_cache_framework.c @@ -305,7 +305,7 @@ static int hisi_soc_cache_aligned_alloc(struct hisi_soc_cache_lock_region *clr, unsigned long arena_start; struct page *pg; - pg = alloc_contig_pages(1 << order, GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO, + pg = alloc_contig_pages(1UL << order, GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO, cpu_to_node(smp_processor_id()), NULL); if (!pg) return -ENOMEM; -- 2.33.0
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://atomgit.com/openeuler/kernel/merge_requests/23045 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/WFT... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://atomgit.com/openeuler/kernel/merge_requests/23045 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/WFT...
participants (2)
-
patchwork bot -
Yushan Wang