diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2013-06-28 06:37:45 +0200 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-07-02 17:50:59 +0200 |
commit | 35f0399db6658f465b00893bdd13b992a0acfef0 (patch) | |
tree | 85d5f041076bb95561f904dba8ac3dc56c19fe42 /ipc | |
parent | Btrfs: fix several potential problems in copy_nocow_pages_for_inode (diff) | |
download | linux-35f0399db6658f465b00893bdd13b992a0acfef0.tar.xz linux-35f0399db6658f465b00893bdd13b992a0acfef0.zip |
Btrfs: fix crash regarding to ulist_add_merge
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>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions