Re: [PATCH] infiniband: sw: rxe: Add NULL checks for qp->resp.mr

From: Leon Romanovsky
Date: Sun Jan 15 2023 - 07:09:32 EST


On Fri, Jan 13, 2023 at 03:53:46PM +0800, Zhu Yanjun wrote:
> 在 2023/1/13 10:35, Jia-Ju Bai 写道:
> > In a previous commit 3282a549cf9b, qp->resp.mr could be NULL. Moreover,
> > in many functions, qp->resp.mr is checked before its dereferences.
> > However, in some functions, this variable is not checked, and thus NULL
> > checks should be added.
>
> IMO, we should analyze the code snippet one by one.
> And it is not good to add "NULL check" without futher investigations.

+1