Re: [PATCH] fs/btrfs: init csum_list before possible free

2019-02-22 Thread Dan Robertson
Got it. Thanks for the clarification. signature.asc Description: Digital signature

Re: [PATCH] fs/btrfs: init csum_list before possible free

2019-02-22 Thread David Sterba
On Thu, Feb 21, 2019 at 02:57:27PM +, Dan Robertson wrote: > > Thanks, it's been there since the first merge of scrub, but hard to hit. > > Yeah, very hard to hit. Debated submitting a patch, but the fix seemed > simple enough, so figured I'd send one in. > > Side note: I noticed most of the

Re: [PATCH] fs/btrfs: init csum_list before possible free

2019-02-21 Thread Dan Robertson
> Thanks, it's been there since the first merge of scrub, but hard to hit. Yeah, very hard to hit. Debated submitting a patch, but the fix seemed simple enough, so figured I'd send one in. Side note: I noticed most of the time ENOMEM is hit in fs/btrfs BUG or BUG_ON is called. Would it be better

Re: [PATCH] fs/btrfs: init csum_list before possible free

2019-02-19 Thread David Sterba
On Tue, Feb 19, 2019 at 02:56:43AM +, Dan Robertson wrote: > The scrub_ctx csum_list member must be initialized before > scrub_free_ctx is called. If the csum_list is not initialized > beforehand, the list_empty call in scrub_free_csums will result > in a null deref. > > Signed-off-by: Dan Rob

Re: [PATCH] fs/btrfs: init csum_list before possible free

2019-02-18 Thread Nikolay Borisov
On 19.02.19 г. 4:56 ч., Dan Robertson wrote: > The scrub_ctx csum_list member must be initialized before > scrub_free_ctx is called. If the csum_list is not initialized > beforehand, the list_empty call in scrub_free_csums will result > in a null deref. > > Signed-off-by: Dan Robertson Review

[PATCH] fs/btrfs: init csum_list before possible free

2019-02-18 Thread Dan Robertson
The scrub_ctx csum_list member must be initialized before scrub_free_ctx is called. If the csum_list is not initialized beforehand, the list_empty call in scrub_free_csums will result in a null deref. Signed-off-by: Dan Robertson --- fs/btrfs/scrub.c | 2 +- 1 file changed, 1 insertion(+), 1 del