Re: [PATCH rdma-next 00/15] Convert drivers to use kzalloc instead of kmalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 13, 2018 at 04:59:56PM +0800, oulijun wrote:
> 在 2018/3/12 22:16, Leon Romanovsky 写道:
> > From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >
> > Hi,
> >
> > The reason to this patchset is described in "RDMA/mlx4: Clear all
> > allocated memory by default" accommodated with relevant crash report.
> >
> Hi, leon
>   I have noted your patchset and know the patch RDMA/mlx4: Clear all allocated memory by default
>   how to test the crash on others?  I want to know if all places need to use kzalloc instead of
>   kmalloc and use kcalloc instead of kmalloc_array?

I'm working on new version of this fix which won't require from driver authors
such changes from kmalloc to kzalloc.

In meantime, you can take latest rdma-next compile with KASAN enabled
and run ibv_rc_pingpong, if the server's memory is dirty, you will get crash
for PD object.

 59 struct ib_pd *hns_roce_alloc_pd(struct ib_device *ib_dev,
 60                                 struct ib_ucontext *context,
 61                                 struct ib_udata *udata)
 62 {
 63         struct hns_roce_dev *hr_dev = to_hr_dev(ib_dev);
 64         struct device *dev = hr_dev->dev;
 65         struct hns_roce_pd *pd;
 66         int ret;
 67
 68         pd = kmalloc(sizeof(*pd), GFP_KERNEL);
 69         if (!pd)
 70                 return ERR_PTR(-ENOMEM);

Thanks

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux