Re: [Cluster-devel] [PATCH] gfs2: Add check for mempool_alloc

2022-03-31 Thread Christoph Hellwig
On Fri, Apr 01, 2022 at 11:37:55AM +0800, Jiasheng Jiang wrote: > >> Fixes: e8c92ed76900 ("GFS2: Clean up log write code path") > >> Signed-off-by: Jiasheng Jiang > > > > Please explain how it could fail to start with. > > I think that for safety, the cost of redundant and harmless > check is ac

Re: [Cluster-devel] [PATCH] gfs2: Add check for mempool_alloc

2022-03-31 Thread Jiasheng Jiang
On Wed, 30 Mar 2022 11:56:41 +0800 Christoph Hellwig wrote: >> As the potential failure of mempool_alloc(), >> it could return NULL pointer. >> Therefore, it should be better to check it >> in order to avoid the dereference of the NULL >> pointer. >> >> Fixes: e8c92ed76900 ("GFS2: Clean up log wri

Re: [Cluster-devel] [PATCH] gfs2: Add check for mempool_alloc

2022-03-30 Thread Christoph Hellwig
On Fri, Mar 11, 2022 at 04:36:16PM +0800, Jiasheng Jiang wrote: > As the potential failure of mempool_alloc(), > it could return NULL pointer. > Therefore, it should be better to check it > in order to avoid the dereference of the NULL > pointer. > > Fixes: e8c92ed76900 ("GFS2: Clean up log write

[Cluster-devel] [PATCH] gfs2: Add check for mempool_alloc

2022-03-11 Thread Jiasheng Jiang
As the potential failure of mempool_alloc(), it could return NULL pointer. Therefore, it should be better to check it in order to avoid the dereference of the NULL pointer. Fixes: e8c92ed76900 ("GFS2: Clean up log write code path") Signed-off-by: Jiasheng Jiang --- fs/gfs2/log.c | 3 +++ 1 file