summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/locks.h
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-02-24 12:00:41 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-02-24 13:38:26 -0800
commitc57d117f2b2f2a19b570c36f2819ef8d8210af20 (patch)
tree29a3faffdac9b809290b4688e38535c5a79e9a33 /fs/ocfs2/locks.h
parent95e126d650391696f7ba8d318634cc018df10ef9 (diff)
downloadlinux-c57d117f2b2f2a19b570c36f2819ef8d8210af20.tar.bz2
ocfs2: fix a use after free on error
The error handling in this function frees "reg" but it is still on the "o2hb_all_regions" list so it will lead to a use after freew. Joseph Qi points out that we need to clear the bit in the "o2hb_region_bitmap" as well Link: https://lkml.kernel.org/r/YBk4M6HUG8jB/jc7@mwanda Fixes: 1cf257f51191 ("ocfs2: fix memory leak") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/locks.h')
0 files changed, 0 insertions, 0 deletions