mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 15:14:18 +08:00
powerpc/vdso: Remove NULL termination element in vdso_pagelist
No need of a NULL last element in pagelists, install_special_mapping() knows how long the list is. Remove that element. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/e58d95ab859e3cbc9bae3c9ce2959e17d2864f5d.1601197618.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
abcdbd039e
commit
35c1c7c0bc
@ -743,7 +743,7 @@ static int __init vdso_init(void)
|
||||
|
||||
#ifdef CONFIG_VDSO32
|
||||
/* Make sure pages are in the correct state */
|
||||
vdso32_pagelist = kcalloc(vdso32_pages + 2, sizeof(struct page *),
|
||||
vdso32_pagelist = kcalloc(vdso32_pages + 1, sizeof(struct page *),
|
||||
GFP_KERNEL);
|
||||
BUG_ON(vdso32_pagelist == NULL);
|
||||
for (i = 0; i < vdso32_pages; i++) {
|
||||
@ -752,11 +752,10 @@ static int __init vdso_init(void)
|
||||
vdso32_pagelist[i] = pg;
|
||||
}
|
||||
vdso32_pagelist[i++] = virt_to_page(vdso_data);
|
||||
vdso32_pagelist[i] = NULL;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
vdso64_pagelist = kcalloc(vdso64_pages + 2, sizeof(struct page *),
|
||||
vdso64_pagelist = kcalloc(vdso64_pages + 1, sizeof(struct page *),
|
||||
GFP_KERNEL);
|
||||
BUG_ON(vdso64_pagelist == NULL);
|
||||
for (i = 0; i < vdso64_pages; i++) {
|
||||
@ -765,7 +764,6 @@ static int __init vdso_init(void)
|
||||
vdso64_pagelist[i] = pg;
|
||||
}
|
||||
vdso64_pagelist[i++] = virt_to_page(vdso_data);
|
||||
vdso64_pagelist[i] = NULL;
|
||||
#endif /* CONFIG_PPC64 */
|
||||
|
||||
smp_wmb();
|
||||
|
Loading…
Reference in New Issue
Block a user