Re: [PATCH] xfs: check the return value of krealloc() in xfs_uuid_mount

2020-11-25 Thread Gao Xiang
On Thu, Nov 26, 2020 at 11:05:03AM +0800, Qinglang Miao wrote: ... > > > > I'm not sure if Hulk CI is completely broken or not on this, also if > > such CI can now generate trivial patch (?) since the subject, commit > > message and even the variable name is quite similiar to > >

Re: [PATCH] xfs: check the return value of krealloc() in xfs_uuid_mount

2020-11-25 Thread Qinglang Miao
在 2020/11/26 10:16, Gao Xiang 写道: Hi Qinglang, On Thu, Nov 26, 2020 at 09:21:11AM +0800, Qinglang Miao wrote: 在 2020/11/25 23:55, Eric Sandeen 写道: On 11/25/20 12:50 AM, Qinglang Miao wrote: krealloc() may fail to expand the memory space. Even with __GFP_NOFAIL? * ``GFP_KERNEL |

Re: [PATCH] xfs: check the return value of krealloc() in xfs_uuid_mount

2020-11-25 Thread Gao Xiang
Hi Qinglang, On Thu, Nov 26, 2020 at 09:21:11AM +0800, Qinglang Miao wrote: > > > 在 2020/11/25 23:55, Eric Sandeen 写道: > > On 11/25/20 12:50 AM, Qinglang Miao wrote: > > > krealloc() may fail to expand the memory space. > > > > Even with __GFP_NOFAIL? > > > >* ``GFP_KERNEL |

Re: [PATCH] xfs: check the return value of krealloc() in xfs_uuid_mount

2020-11-25 Thread Qinglang Miao
在 2020/11/25 23:55, Eric Sandeen 写道: On 11/25/20 12:50 AM, Qinglang Miao wrote: krealloc() may fail to expand the memory space. Even with __GFP_NOFAIL? * ``GFP_KERNEL | __GFP_NOFAIL`` - overrides the default allocator behavior and all allocation requests will loop endlessly until

Re: [PATCH] xfs: check the return value of krealloc() in xfs_uuid_mount

2020-11-25 Thread Eric Sandeen
On 11/25/20 12:50 AM, Qinglang Miao wrote: > krealloc() may fail to expand the memory space. Even with __GFP_NOFAIL? * ``GFP_KERNEL | __GFP_NOFAIL`` - overrides the default allocator behavior and all allocation requests will loop endlessly until they succeed. This might be really

[PATCH] xfs: check the return value of krealloc() in xfs_uuid_mount

2020-11-24 Thread Qinglang Miao
krealloc() may fail to expand the memory space. Add sanity checks to it, and WARN() if that really happened. Fixes: 771915c4f688 ("xfs: remove kmem_realloc()") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao --- fs/xfs/xfs_mount.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)