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

Yevgeny Kliteynik kliteyn at mellanox.co.il
Mon Aug 21 08:27:53 PDT 2006


Hi Hal.

My answers below. 
I did check the code using the setup that discovered it.

This patch should make its way into both trunk and OFED 1.1 branch.
Please let me know if there is anything else required for it.

Thanks,

Yevgeny

On Thu, 2006-08-17 at 09:35 -0400, Hal Rosenstock wrote:
> 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 ?

Yes, I did.

> > 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.

Right, I will try to clean these areas once I get to read them.

> -- 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.
> 
-- 
  
Regards,
 
Yevgeny Kliteynik

Mellanox Technologies LTD
Tel: +972-4-909-7200 ext: 394
Fax: +972-4-959-3245
P.O. Box 586 Yokneam 20692 ISRAEL 




More information about the general mailing list