Re: [PATCH v3] Btrfs: fix crash regarding to ulist_add_merge

2013-07-29 Thread Liu Bo
On Mon, Jul 29, 2013 at 10:23:34AM +0200, Jan Schmidt wrote: > On Fri, June 28, 2013 at 06:37 (+0200), Liu Bo wrote: > > Several users reported this crash of NULL pointer or general protection, > > the story is that we add a rbtree for speedup ulist iteration, and we > > use krealloc() to address u

Re: [PATCH v3] Btrfs: fix crash regarding to ulist_add_merge

2013-07-29 Thread Jan Schmidt
On Fri, June 28, 2013 at 06:37 (+0200), Liu Bo wrote: > Several users reported this crash of NULL pointer or general protection, > the story is that we add a rbtree for speedup ulist iteration, and we > use krealloc() to address ulist growth, and krealloc() use memcpy to copy > old data to new memo

Re: [PATCH v3] Btrfs: fix crash regarding to ulist_add_merge

2013-06-29 Thread Liu Bo
On Fri, Jun 28, 2013 at 12:43:14PM -0700, Zach Brown wrote: > On Fri, Jun 28, 2013 at 12:37:45PM +0800, Liu Bo wrote: > > Several users reported this crash of NULL pointer or general protection, > > the story is that we add a rbtree for speedup ulist iteration, and we > > use krealloc() to address

Re: [PATCH v3] Btrfs: fix crash regarding to ulist_add_merge

2013-06-28 Thread Zach Brown
On Fri, Jun 28, 2013 at 12:37:45PM +0800, Liu Bo wrote: > Several users reported this crash of NULL pointer or general protection, > the story is that we add a rbtree for speedup ulist iteration, and we > use krealloc() to address ulist growth, and krealloc() use memcpy to copy > old data to new me

[PATCH v3] Btrfs: fix crash regarding to ulist_add_merge

2013-06-27 Thread Liu Bo
Several users reported this crash of NULL pointer or general protection, the story is that we add a rbtree for speedup ulist iteration, and we use krealloc() to address ulist growth, and krealloc() use memcpy to copy old data to new memory area, so it's OK for an array as it doesn't use pointers wh