summaryrefslogtreecommitdiff
path: root/fs/gfs2/bmap.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2022-01-17 10:25:07 -0500
committerAndreas Gruenbacher <agruenba@redhat.com>2022-02-15 15:01:10 +0100
commit428f651cb80b227af47fc302e4931791f2fb4741 (patch)
treee68ffcee4b1df3b378463ed63785a37a72de9c14 /fs/gfs2/bmap.c
parent754e0b0e35608ed5206d6a67a791563c631cec07 (diff)
gfs2: assign rgrp glock before compute_bitstructs
Before this patch, function read_rindex_entry called compute_bitstructs before it allocated a glock for the rgrp. But if compute_bitstructs found a problem with the rgrp, it called gfs2_consist_rgrpd, and that called gfs2_dump_glock for rgd->rd_gl which had not yet been assigned. read_rindex_entry compute_bitstructs gfs2_consist_rgrpd gfs2_dump_glock <---------rgd->rd_gl was not set. This patch changes read_rindex_entry so it assigns an rgrp glock before calling compute_bitstructs so gfs2_dump_glock does not reference an unassigned pointer. If an error is discovered, the glock must also be put, so a new goto and label were added. Reported-by: syzbot+c6fd14145e2f62ca0784@syzkaller.appspotmail.com Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
0 files changed, 0 insertions, 0 deletions