Skip to content

Commit 26cfe7e

Browse files
committed
Merge: Updates for xive papr bit map allocation
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6540 Description: Updates for xive papr bit map allocation JIRA: https://issues.redhat.com/browse/RHEL-80803 CVE: CVE-2022-49623 Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=66908454 Tested: Verified Brew build test kernel RPMs Signed-off-by: Mamatha Inamdar <minamdar@redhat.com> Approved-by: Steve Best <sbest@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents 054776f + 1f14e75 commit 26cfe7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/powerpc/sysdev/xive/spapr.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/of_fdt.h>
1616
#include <linux/slab.h>
1717
#include <linux/spinlock.h>
18+
#include <linux/bitmap.h>
1819
#include <linux/cpumask.h>
1920
#include <linux/mm.h>
2021
#include <linux/delay.h>
@@ -57,7 +58,7 @@ static int xive_irq_bitmap_add(int base, int count)
5758
spin_lock_init(&xibm->lock);
5859
xibm->base = base;
5960
xibm->count = count;
60-
xibm->bitmap = kzalloc(xibm->count, GFP_KERNEL);
61+
xibm->bitmap = bitmap_zalloc(xibm->count, GFP_KERNEL);
6162
if (!xibm->bitmap) {
6263
kfree(xibm);
6364
return -ENOMEM;
@@ -75,7 +76,7 @@ static void xive_irq_bitmap_remove_all(void)
7576

7677
list_for_each_entry_safe(xibm, tmp, &xive_irq_bitmaps, list) {
7778
list_del(&xibm->list);
78-
kfree(xibm->bitmap);
79+
bitmap_free(xibm->bitmap);
7980
kfree(xibm);
8081
}
8182
}

0 commit comments

Comments
 (0)