Haimin Zhang a530462910 jfs: prevent NULL deref in diFree
Add validation check for JFS_IP(ipimap)->i_imap to prevent a NULL deref
in diFree since diFree uses it without do any validations.
When function jfs_mount calls diMount to initialize fileset inode
allocation map, it can fail and JFS_IP(ipimap)->i_imap won't be
initialized. Then it calls diFreeSpecial to close fileset inode allocation
map inode and it will flow into jfs_evict_inode. Function jfs_evict_inode
just validates JFS_SBI(inode->i_sb)->ipimap, then calls diFree. diFree use
JFS_IP(ipimap)->i_imap directly, then it will cause a NULL deref.

Reported-by: TCS Robot <tcs_robot@tencent.com>
Signed-off-by: Haimin Zhang <tcs_kernel@tencent.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
2022-03-22 10:09:19 -05:00
..
2022-01-30 22:13:37 +09:00
2021-08-19 09:02:55 +09:00
2022-03-21 16:48:55 -07:00
2021-11-09 10:02:51 -08:00
2022-01-12 11:11:34 -08:00
2021-12-03 18:44:06 +01:00
2022-03-21 16:48:55 -07:00
2022-03-21 17:21:05 -07:00
2022-03-21 17:21:05 -07:00
2022-03-21 16:48:55 -07:00
2022-02-02 07:49:59 -07:00
2022-03-21 16:48:55 -07:00
2022-03-22 10:09:19 -05:00
2022-03-21 16:48:55 -07:00
2022-02-02 10:14:31 -08:00
2022-03-21 16:48:55 -07:00
2022-03-21 16:48:55 -07:00
2022-03-21 16:48:55 -07:00
2022-02-01 11:23:02 -08:00
2021-08-19 09:02:55 +09:00
2022-03-21 16:48:55 -07:00
2022-01-22 08:33:34 +02:00
2021-11-17 09:26:09 +01:00
2022-03-21 19:16:02 -07:00
2022-02-02 07:49:59 -07:00
2022-03-01 16:16:27 -08:00
2022-01-22 08:33:35 +02:00
2022-03-10 09:33:55 -07:00
2022-03-21 16:29:24 -07:00
2022-02-04 00:12:22 -06:00
2022-03-21 19:16:02 -07:00
2022-02-27 14:50:07 -07:00
\n
2022-01-28 17:51:31 +02:00
2022-03-10 09:33:55 -07:00
2021-08-10 17:57:22 +02:00