[openib-general] [PATCHv2] osm: OSM crash TRIVIAL bug fix

Hal Rosenstock halr at voltaire.com
Thu Aug 17 06:35:31 PDT 2006


Hi Yevgeny,

On Thu, 2006-08-17 at 09:28, Yevgeny Kliteynik wrote:
> Hi Hal.
> 
> > This line wrapped so there is something wrong with your mailer.
> 
> I'm using a different mailer now, so I hope that it's ok now.

Guess we'll see with your next patch with a long line...

> > > +  m->v = NULL; /* just make sure we do not point tofree'd madw */
> > 
> > Also, is this line really needed (and if so why) ? I know you did say 
> > "it cleans up old pointers to retrieved madw" but this shouldn't be 
> > accessed, right ?
> 
> You're right, it shouldn't be accessed.

Does the fix checked in work as is now ? Did you reverify ?

> But generally, it's a good practice to assign a null to 
> any pointer that points to a freed memory, and should not
> be in use any more.

It's also good practice that when an issue is found in one place to look
for other occurences of the same issue.

I'm also not sure this is the general approach that OpenSM takes.

-- Hal

> > Also, if this is added here, there are other places where the same
> > thing should be done ?
> 
> I just examined this area of code, so this is what I saw.





More information about the general mailing list