Re: [PATCH] IB/rxe: Warn when objects are invalid

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

 



On Thu, Dec 06, 2018 at 09:44:41AM -0800, Bart Van Assche wrote:
> On Thu, 2018-12-06 at 13:09 +0200, Yuval Shaia wrote:
> > Since callers never validates return value let's make sure objects are
> > valid here and do not return NULL.
> 
> This is not sufficient as motivation to make this change. A better motivation
> would e.g. be that you have audited all callers and verified that none of the
> callers passes a NULL pointer. Another possible motivation could be that you
> have tested these code paths extensively and that none of the removed warning
> statements has been triggered.

Hmm...that i couldn't say.

What i could say though is that i covered all places that uses these
inlines and none of them checks the return value.
So, with the current code we will hit NULL pointer exception when the
return value will be used (e.x rxe object in the case of to_rdev) where the
source of error is that dev is NULL.

I guess that this patch does not bring such improvement, isn't it.

Let's drop it then.

> 
> Bart.



[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