Re: [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-23 Thread NeilBrown
On Tue, Jan 23 2018, Dan Carpenter wrote: > On Tue, Jan 23, 2018 at 09:25:41AM +, Zhen, Liang wrote: >> Hi, I just realized the “free_conn” parameter is unused in kernel source, >> but it’s actually used in the original patch: >> https://review.whamcloud.com/#/c/17892 , so I think it

Re: [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-23 Thread Dan Carpenter
On Tue, Jan 23, 2018 at 09:25:41AM +, Zhen, Liang wrote: > Hi, I just realized the “free_conn” parameter is unused in kernel source, but > it’s actually used in the original patch: > https://review.whamcloud.com/#/c/17892 , so I think it should be fixed in > the kernel. > Dmitry already

Re: [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-23 Thread Zhen, Liang
Hi, I just realized the “free_conn” parameter is unused in kernel source, but it’s actually used in the original patch: https://review.whamcloud.com/#/c/17892 , so I think it should be fixed in the kernel. Regards Liang On 23/01/2018, 4:02 PM, "Zhen, Liang" wrote:

Re: [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-23 Thread Zhen, Liang
Hi there, probably the function name is misleading, but L3317: kiblnd_destroy_conn(conn, !peer); This function will NOT free the connection if peer is NULL, and… L3320:if (!peer) L3321 continue; It means the connection is not freed in L3322 and later. Regards Liang On

Re: [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-22 Thread NeilBrown
On Mon, Jan 15 2018, Dan Carpenter wrote: > [ This code was already buggy, it's just that Neil's change made it >show up in static analysis. - dan ] Thanks! This bug was introduced by Commit: 4d99b2581eff ("staging: lustre: avoid intensive reconnecting for ko2iblnd") which added a

Re: [lustre-devel] [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-16 Thread Dan Carpenter
On Mon, Jan 15, 2018 at 06:27:26PM +, Eremin, Dmitry wrote: > Hello Dan, > > The function kiblnd_destroy_conn() is conditionally free the conn pointer. > > void kiblnd_destroy_conn(kib_conn_t *conn, bool free_conn) > { > […] > if (free_conn) >

RE: [lustre-devel] [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-15 Thread Eremin, Dmitry
osuosl.org; lustre-de...@lists.lustre.org > Subject: RE: [lustre-devel] [bug report] staging: lustre: replace simple cases > of LIBCFS_ALLOC with kzalloc. > > Hello Dan, > > The function kiblnd_destroy_conn() is conditionally free the conn pointer. > > void kiblnd_

RE: [lustre-devel] [bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-15 Thread Eremin, Dmitry
ubject: [lustre-devel] [bug report] staging: lustre: replace simple cases of > LIBCFS_ALLOC with kzalloc. > > [ This code was already buggy, it's just that Neil's change made it >show up in static analysis. - dan ] > > Hello NeilBrown, > > The patch 3c88bdbbf919: &

[bug report] staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.

2018-01-15 Thread Dan Carpenter
[ This code was already buggy, it's just that Neil's change made it show up in static analysis. - dan ] Hello NeilBrown, The patch 3c88bdbbf919: "staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc." from Jan 9, 2018, leads to the following static checker warning: