Commit e918bda
fs/ext2: Fix NULL dereference when fs_stat queries root.
When fs_stat() queries the root / mountpoint it should return its root
i_node but instead it tries to return the parent i_node which does not
exist. Fix this by checking if parent is set otherwise return the root
i_node.
Fixes #94000.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
(cherry picked from commit 1dcf123)1 parent 8b5e038 commit e918bda
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
602 | | - | |
| 601 | + | |
603 | 602 | | |
604 | 603 | | |
605 | 604 | | |
606 | | - | |
| 605 | + | |
607 | 606 | | |
608 | 607 | | |
609 | 608 | | |
| |||
0 commit comments