aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/free-space-cache.h
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2013-06-28 12:37:45 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-11 18:35:24 -0700
commit98ad9de66428f3dedb2081c7e0a505489d6feaf4 (patch)
tree2c071bbb346f7289cfb02f265930adb4c9970c4b /fs/btrfs/free-space-cache.h
parent62fda513d368032d8f6b0375004032d5c0c6060d (diff)
Btrfs: fix crash regarding to ulist_add_merge
commit 35f0399db6658f465b00893bdd13b992a0acfef0 upstream. 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 while it's not OK for a rbtree as it uses pointers. So krealloc() will mess up our rbtree and it ends up with crash. Reviewed-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com> Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Cc: BJ Quinn <bj@placs.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs/free-space-cache.h')
0 files changed, 0 insertions, 0 deletions