Re: [PATCH 2/2] osm_gi_rcv_process: OSM_LOG_ENTER should before CL_ASSERT

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

 



On Tue, Nov 13, 2018 at 07:52:26AM -0500, Hal Rosenstock wrote:
> On 11/13/2018 1:31 AM, Honggang LI wrote:
> > From: Honggang Li <honli@xxxxxxxxxx>
> > 
> > Signed-off-by: Honggang Li <honli@xxxxxxxxxx>
> > ---
> >  opensm/osm_guid_info_rcv.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/opensm/osm_guid_info_rcv.c b/opensm/osm_guid_info_rcv.c
> > index f4d0592e..ea3c2c56 100644
> > --- a/opensm/osm_guid_info_rcv.c
> > +++ b/opensm/osm_guid_info_rcv.c
> > @@ -74,10 +74,9 @@ void osm_gi_rcv_process(IN void *context, IN void *data)
> >  	ib_net64_t port_guid, node_guid;
> >  	uint8_t block_num;
> >  
> > -	CL_ASSERT(sm);
> > -
> >  	OSM_LOG_ENTER(sm->p_log);
> >  
> > +	CL_ASSERT(sm);
> >  	CL_ASSERT(p_madw);
> >  
> >  	p_smp = osm_madw_get_smp_ptr(p_madw);
> > 
> 
> The CL_ASSERT needs to come before the OSM_LOG_ENTER here. Otherwise,
> OSM_LOG_ENTER can chase a null pointer in accessing sm->p_log.

Yes, you are right.

thanks



[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