Unverified Commit a7969c72 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12420 nilfs2: fix NULL pointer dereference in nilfs_palloc_commit_free_entry()

parents 15ac0ed2 f181bb28
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -111,6 +111,13 @@ static void nilfs_dat_commit_free(struct inode *dat,
	kunmap_atomic(kaddr);

	nilfs_dat_commit_entry(dat, req);

	if (unlikely(req->pr_desc_bh == NULL || req->pr_bitmap_bh == NULL)) {
		nilfs_error(dat->i_sb,
			    "state inconsistency probably due to duplicate use of vblocknr = %llu",
			    (unsigned long long)req->pr_entry_nr);
		return;
	}
	nilfs_palloc_commit_free_entry(dat, req);
}