mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
Merge tag 'vfs-6.19-rc1.minix' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull minix fixes from Christian Brauner:
"Fix two syzbot corruption bugs in the minix filesystem.
Syzbot fuzzes filesystems by trying to mount and manipulate
deliberately corrupted images. This should not lead to BUG_ONs and
WARN_ONs for easy to detect corruptions.
- Add error handling to minix filesystem for inode corruption
detection, enabling the filesystem to report such corruptions
cleanly.
- Fix a drop_nlink warning in minix_rmdir() triggered by corrupted
directory link counts.
- Fix a drop_nlink warning in minix_rename() triggered by corrupted
inode link counts"
* tag 'vfs-6.19-rc1.minix' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
Fix a drop_nlink warning in minix_rename
Fix a drop_nlink warning in minix_rmdir
Add error handling to minix filesystem for inode corruption detection
This commit is contained in:
@@ -26,6 +26,22 @@ static int minix_write_inode(struct inode *inode,
|
||||
struct writeback_control *wbc);
|
||||
static int minix_statfs(struct dentry *dentry, struct kstatfs *buf);
|
||||
|
||||
void __minix_error_inode(struct inode *inode, const char *function,
|
||||
unsigned int line, const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
printk(KERN_CRIT "minix-fs error (device %s): %s:%d: "
|
||||
"inode #%lu: comm %s: %pV\n",
|
||||
inode->i_sb->s_id, function, line, inode->i_ino,
|
||||
current->comm, &vaf);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
static void minix_evict_inode(struct inode *inode)
|
||||
{
|
||||
truncate_inode_pages_final(&inode->i_data);
|
||||
|
||||
Reference in New Issue
Block a user