ehea: Fix mem allocations which require page alignment
PAGE_SIZE allocations via slab are not guaranteed to be page-aligned. Fixed all memory allocations where page alignment is required by firmware. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
086c1b2c52
commit
3faf2693bd
@@ -1005,7 +1005,7 @@ void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle)
|
||||
unsigned long ret;
|
||||
u64 *rblock;
|
||||
|
||||
rblock = kzalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
rblock = (void *)get_zeroed_page(GFP_KERNEL);
|
||||
if (!rblock) {
|
||||
ehea_error("Cannot allocate rblock memory.");
|
||||
return;
|
||||
@@ -1022,5 +1022,5 @@ void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle)
|
||||
else
|
||||
ehea_error("Error data could not be fetched: %llX", res_handle);
|
||||
|
||||
kfree(rblock);
|
||||
free_page((unsigned long)rblock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user