Re: [staging:staging-next 446/587] drivers/staging/lustre/lnet/lnet/lib-socket.c:212:16-19: ERROR: reference preceded by free on line 198 (fwd)

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

 




On Sat, 27 Jan 2018, Dan Carpenter wrote:

> On Sat, Jan 27, 2018 at 02:37:49PM +0100, Julia Lawall wrote:
> > Please check whether line 212 is reachable from line 198.
> >
>
> No.  It's not.
>
> > d7e09d039 drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c Peng Tao           2013-05-02  192  		nfound = ifc.ifc_len / sizeof(*ifr);
> > d7e09d039 drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c Peng Tao           2013-05-02  193  		LASSERT(nfound <= nalloc);
> > d7e09d039 drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c Peng Tao           2013-05-02  194
> > d7e09d039 drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c Peng Tao           2013-05-02  195  		if (nfound < nalloc || toobig)
> > d7e09d039 drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c Peng Tao           2013-05-02  196  			break;
>                                                                                                                                 ^^^^^
> The only place where the loop breaks is here.

I saw that, but does it imply that nfound is 0?

julia

>
> > d7e09d039 drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c Peng Tao           2013-05-02  197
> > 464dbfcaa drivers/staging/lustre/lnet/lnet/lib-socket.c            NeilBrown          2018-01-09 @198  		kfree(ifr);
> > d7e09d039 drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c Peng Tao           2013-05-02  199  		nalloc *= 2;
> > d7e09d039 drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c Peng Tao           2013-05-02  200  	}
>
> regards,
> dan carpenter
>
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux