[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)

Dan Carpenter dan.carpenter at oracle.com
Sat Jan 27 13:57:32 UTC 2018


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.

> 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



More information about the devel mailing list