Bug 194251 - fs/inode.c find_inode_fast inode data structure NULL
Summary: fs/inode.c find_inode_fast inode data structure NULL
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-07 05:21 UTC by Michael
Modified: 2017-02-07 05:21 UTC (History)
0 users

See Also:
Kernel Version: 4.10
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Michael 2017-02-07 05:21:42 UTC
in find_inode_fast:
-->	        struct inode *inode = NULL;

repeat:
        hlist_for_each_entry(inode, head, i_hash) {
-->			if (inode->i_ino != ino)
                        continue;

	The data structure is initialized as NULL, is there any guarantee that the head of the list it points to after hlist_for_each_entry() won't be a null value?  The assignment seems to assume that the head will always have a struct available to assign to the pointer.

Based on static analysis tool

Note You need to log in before you can comment on or make changes to this bug.