diff options
author | Bob Peterson <rpeterso@redhat.com> | 2017-07-18 20:15:01 +0300 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2017-07-21 16:20:42 +0300 |
commit | 4d7c18c7df89ef549f2de79b0faf873b49dea57a (patch) | |
tree | d1ae15098ea5fa6eeaaa03ec0e3a8c1d44c20455 /scripts/gdb/linux/utils.py | |
parent | df3d87bde121213560fde0edb71bc46f0f75692c (diff) | |
download | linux-4d7c18c7df89ef549f2de79b0faf873b49dea57a.tar.xz |
GFS2: Set gl_object in inode lookup only after block type check
Before this patch, the inode glock's gl_object was set after a
reference was acquired, but before the block type was verified.
In cases where the block was unlinked, then freed and reused on
another node, a residule delete callback (delete_work) would try
to look up the inode, eventually failing the block check, but
only after it overwrites gl_object with a pointer to the wrong
inode. This patch moves the assignment of gl_object after the
block check so it won't be improperly overwritten.
Likewise, at the end of the function, gfs2_inode_lookup was
clearing gl_object after it unlocked the glock, which meant
another process might free the glock in the meantime. This
patch guards against that case.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions