VfsJffs2Lookup中VfsHashGet获取的vnode未判断data字段的有效性

This commit is contained in:
zhangfanfan2 2021-04-09 19:30:40 +08:00 committed by Gitee
parent cd9c1d9789
commit 78a6bd9416
1 changed files with 3 additions and 0 deletions

View File

@ -202,6 +202,9 @@ int VfsJffs2Lookup(struct Vnode *parentVnode, const char *path, int len, struct
(void)VfsHashGet(parentVnode->originMount, node->i_ino, &newVnode, NULL, NULL);
LOS_MuxUnlock(&g_jffs2FsLock);
if (newVnode) {
if (newVnode->data == NULL) {
LOS_Panic("#####VfsHashGet error#####\n");
}
*ppVnode = newVnode;
return 0;
}