mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 03:40:52 +07:00
UBIFS: fix error handling in dump_lpt_leb()
This patch checks the return value of 'ubifs_unpack_nnode()'. If this function returns an error, 'nnode' may not be initialized, so just print an error message and break. Signed-off-by: hujianyang <hujianyang@huawei.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
This commit is contained in:
parent
033ead8230
commit
5a95741a57
@ -1941,6 +1941,11 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
|
||||
pr_err("LEB %d:%d, nnode, ",
|
||||
lnum, offs);
|
||||
err = ubifs_unpack_nnode(c, p, &nnode);
|
||||
if (err) {
|
||||
pr_err("failed to unpack_node, error %d\n",
|
||||
err);
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < UBIFS_LPT_FANOUT; i++) {
|
||||
pr_cont("%d:%d", nnode.nbranch[i].lnum,
|
||||
nnode.nbranch[i].offs);
|
||||
|
Loading…
Reference in New Issue
Block a user