Files
android_kernel_xiaomi_sm8450/drivers/infiniband/hw/hfi1
Mike Marciniszyn 8fac4bd367 IB/hfi1: Use kzalloc() for mmu_rb_handler allocation
[ Upstream commit ca5f72568e034e1295a7ae350b1f786fcbfb2848 ]

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: 06e0ffa693 ("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 <adam.goldman@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:34 +02:00
..
2019-06-28 22:34:26 -03:00
2019-06-28 22:34:26 -03:00
2016-05-26 11:35:14 -04:00
2016-05-26 11:35:14 -04:00
2018-05-24 09:39:25 -06:00
2020-05-21 11:23:56 -03:00
2020-07-24 16:59:55 -03:00
2020-05-21 11:23:56 -03:00
2020-05-21 11:23:56 -03:00
2020-05-21 11:23:56 -03:00
2019-02-05 18:07:43 -05:00
2019-04-24 11:31:49 -03:00
2020-07-24 16:59:55 -03:00
2020-07-24 16:59:55 -03:00
2020-07-24 16:59:55 -03:00
2019-03-28 11:03:49 -03:00
2019-11-27 07:44:25 +01:00
2019-11-27 07:44:25 +01:00
2019-01-31 11:37:40 -05:00
2020-07-24 16:59:55 -03:00
2020-09-18 10:31:24 -03:00
2019-12-09 10:36:44 -08:00
2019-07-30 14:21:32 -07:00
2020-05-21 11:23:56 -03:00