On Thu, Oct 18, 2018 at 03:22:45PM +0300, Dan Carpenter wrote: [...] > c2e53b2ce1 Yishai Hadas 2017-06-08 1836 > e126ba97db Eli Cohen 2013-07-07 1837 qp->has_rq = qp_has_rq(init_attr); > e126ba97db Eli Cohen 2013-07-07 1838 err = set_rq_size(dev, &init_attr->cap, qp->has_rq, > f643bd9130 Shamir Rabinovitch 2018-10-14 @1839 qp, udata ? &ucmd : NULL); > ^^^^^^^ > The patch adds a check for NULL. if udata is not null then the function was called from uverbs. if we are called from uverbs then ucmd is valid. infect the original test that use pd->uobject is less correct because if pd has uobject it it was created from uverbs but it is actually property of the pd and not the flow. [...] > > b11a4f9cde Haggai Eran 2016-02-29 1863 return -EINVAL; > b11a4f9cde Haggai Eran 2016-02-29 1864 } > 0fb2ed66a1 majd@xxxxxxxxxxxx 2016-01-14 @1865 err = create_user_qp(dev, pd, qp, udata, init_attr, &in, > ^^^^^ > Does this need to be checked as well? no. the only purpose of this patch is to remove some incorrect tests arounfd pd->uobject that later patch will have to deal with them. this line is not falling under the patch definition. > > 0fb2ed66a1 majd@xxxxxxxxxxxx 2016-01-14 1866 &resp, &inlen, base); > e126ba97db Eli Cohen 2013-07-07 1867 if (err) > e126ba97db Eli Cohen 2013-07-07 1868 mlx5_ib_dbg(dev, "err %d\n", err); > e126ba97db Eli Cohen 2013-07-07 1869 } else {