powerpc: Remove alloc_maybe_bootmem for zalloc version
Replace all remaining callers of alloc_maybe_bootmem with zalloc_maybe_bootmem. The callsite in pci_dn is followed with a memset to clear the memory, and not zeroing at the other callsites in the celleb fake pci code could lead to following uninitialized memory as pointers or even freeing said pointers on error paths. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
7ca8aa0924
commit
a56555e573
4 changed files with 4 additions and 15 deletions
|
@ -43,10 +43,9 @@ void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
|
|||
const u32 *regs;
|
||||
struct pci_dn *pdn;
|
||||
|
||||
pdn = alloc_maybe_bootmem(sizeof(*pdn), GFP_KERNEL);
|
||||
pdn = zalloc_maybe_bootmem(sizeof(*pdn), GFP_KERNEL);
|
||||
if (pdn == NULL)
|
||||
return NULL;
|
||||
memset(pdn, 0, sizeof(*pdn));
|
||||
dn->data = pdn;
|
||||
pdn->node = dn;
|
||||
pdn->phb = phb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue