diff options
author | Mike Marciniszyn <[email protected]> | 2021-03-29 09:54:14 -0400 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2021-04-07 20:19:01 -0300 |
commit | ca5f72568e034e1295a7ae350b1f786fcbfb2848 (patch) | |
tree | e66ca6616eac837879665590b65924415c0fe4a3 /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 6b13215df1d37f5be23fc4a01a915a287b25ce15 (diff) |
IB/hfi1: Use kzalloc() for mmu_rb_handler allocation
The code currently assumes that the mmu_notifier struct
embedded in mmu_rb_handler only contains two fields.
There are now extra fields:
struct mmu_notifier {
struct hlist_node hlist;
const struct mmu_notifier_ops *ops;
struct mm_struct *mm;
struct rcu_head rcu;
unsigned int users;
};
Given that there in no init for the mmu_notifier, a kzalloc() should
be used to insure that any newly added fields are given a predictable
initial value of zero.
Fixes: 06e0ffa69312 ("IB/hfi1: Re-factor MMU notification code")
Link: https://lore.kernel.org/r/1617026056-50483-9-git-send-email-dennis.dalessandro@cornelisnetworks.com
Reviewed-by: Adam Goldman <[email protected]>
Signed-off-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions